This commit is contained in:
2025-02-25 15:58:46 +03:30
parent a47f4cac48
commit c4a50de162
4 changed files with 18 additions and 16 deletions

View File

@@ -21,7 +21,7 @@ class RoadItemTableService
if ($user->hasPermissionTo('show-road-item-supervise-cartable')) {
$query = RoadItemsProject::query()
->select(['id', 'province_fa', 'edarat_name', 'item_fa', 'sub_item_fa', 'sub_item_data', 'unit_fa', 'start_lat', 'start_lng',
->select(['id', 'province_fa', 'edarat_name', 'item_id', 'item_fa', 'sub_item_id', 'sub_item_fa', 'sub_item_data', 'unit_fa', 'start_lat', 'start_lng',
'end_lat', 'end_lng', 'activity_date_time', 'created_at', 'status_fa', 'status'])
->where('is_new', 1)
->when($loadRelations, fn ($query) => $query->with(['rahdaran:id,name,code', 'cmmsMachines:id,machine_code,car_name,plak_number']));
@@ -31,7 +31,7 @@ class RoadItemTableService
return $this->errorResponse('استانی برای شما در سامانه ثبت نشده است!');
}
$query = RoadItemsProject::query()
->select(['id', 'province_fa', 'edarat_name', 'item_fa', 'sub_item_fa', 'sub_item_data', 'unit_fa', 'start_lat', 'start_lng',
->select(['id', 'province_fa', 'edarat_name', 'item_id', 'item_fa', 'sub_item_id', 'sub_item_fa', 'sub_item_data', 'unit_fa', 'start_lat', 'start_lng',
'end_lat', 'end_lng', 'activity_date_time', 'created_at', 'status_fa', 'status'])
->where('is_new', 1)
->where('province_id', auth()->user()->province_id)
@@ -53,7 +53,7 @@ class RoadItemTableService
$allowedSortings = ['*'];
$query = RoadItemsProject::query()
->select(['id', 'supervisor_description', 'item_fa', 'sub_item_fa', 'sub_item_data', 'unit_fa', 'start_lat', 'start_lng',
->select(['id', 'supervisor_description', 'item_id', 'item_fa', 'sub_item_id', 'sub_item_fa', 'sub_item_data', 'unit_fa', 'start_lat', 'start_lng',
'end_lat', 'end_lng', 'activity_date_time', 'created_at', 'status_fa', 'status'])
->where('is_new', 1)
->where('user_id', auth()->user()->id)