create and fix code
This commit is contained in:
@@ -12,8 +12,8 @@ class OperatorService
|
||||
public function dataTable(Request $request, $loadRelations = false)
|
||||
{
|
||||
$query = RoadPatrol::query()
|
||||
->where('operator_id', '=', auth()->user()->id)
|
||||
->when($loadRelations, fn ($query) => $query->with(['rahdaran:id,name,code', 'cmmsMachines:id,machine_code,car_name,plak_number']));
|
||||
->with('mission:id')
|
||||
->where('operator_id', '=', auth()->user()->id);
|
||||
|
||||
return DataTableFacade::run(
|
||||
$query,
|
||||
@@ -23,7 +23,7 @@ class OperatorService
|
||||
allowedSelects: [
|
||||
'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', 'mission_id'
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user