create complaints blade

This commit is contained in:
2025-02-25 15:03:30 +03:30
parent 2adf091f7d
commit d0c9908e6c
6 changed files with 204 additions and 24 deletions

View File

@@ -21,7 +21,7 @@ class RoadPatrolTableService
$query = RoadPatrol::query()
->select([
'province_fa', 'province_id', 'id', 'edare_id', 'edare_name', 'start_time', 'end_time', 'created_at', 'description',
'distance', 'vehicle_runtime', 'fuel_consumption', 'stop_points,'
'distance', 'vehicle_runtime', 'fuel_consumption', 'stop_points'
])
->when($loadRelations, fn ($query) => $query->with(['rahdaran:id,name,code', 'cmmsMachines:id,machine_code,car_name,plak_number']));
}
@@ -32,7 +32,7 @@ class RoadPatrolTableService
$query = RoadPatrol::query()
->select([
'province_fa', 'province_id', 'id', 'edare_id', 'edare_name', 'start_time', 'end_time', 'created_at', 'description',
'distance', 'vehicle_runtime', 'fuel_consumption', 'stop_points,'
'distance', 'vehicle_runtime', 'fuel_consumption', 'stop_points'
])
->where('province_id', '=', $user->province_id)
->when($loadRelations, fn ($query) => $query->with(['rahdaran:id,name,code', 'cmmsMachines:id,machine_code,car_name,plak_number']));
@@ -55,7 +55,7 @@ class RoadPatrolTableService
$query = RoadPatrol::query()
->select([
'province_fa', 'province_id', 'id', 'edare_id', 'edare_name', 'start_time', 'end_time', 'created_at', 'description',
'distance', 'vehicle_runtime', 'fuel_consumption', 'stop_points,'
'distance', 'vehicle_runtime', 'fuel_consumption', 'stop_points'
])
->where('operator_id', '=', auth()->user()->id)
->when($loadRelations, fn ($query) => $query->with(['rahdaran:id,name,code', 'cmmsMachines:id,machine_code,car_name,plak_number']));