add form request to start and finish api
This commit is contained in:
@@ -16,14 +16,10 @@ class ControlUnitService
|
||||
|
||||
public function dataTable(Request $request)
|
||||
{
|
||||
$fields = [
|
||||
'id', 'user_id', 'username', 'state_name', 'province_name', 'edare_shahri_name',
|
||||
'description', 'requested_machines', 'type', 'type_fa', 'start_date',
|
||||
'end_date', 'request_date', 'end_point', 'area', 'zone', 'zone_fa'
|
||||
];
|
||||
|
||||
$query = Mission::query()
|
||||
->where('state_id', '=', MissionStates::PENDING_CONFIRMATION->value)
|
||||
->whereIn('state_id', [
|
||||
MissionStates::PENDING_CONFIRMATION->value, MissionStates::START_MISSION->value
|
||||
])
|
||||
->where('edare_shahri_name', '=', Auth::user()->edarate_shahri_id);
|
||||
|
||||
return DataTableFacade::run(
|
||||
@@ -31,7 +27,11 @@ class ControlUnitService
|
||||
$request,
|
||||
allowedFilters: ['*'],
|
||||
allowedSortings: ['*'],
|
||||
allowedSelects: $fields
|
||||
allowedSelects: [
|
||||
'id', 'user_id', 'username', 'state_name', 'province_name', 'edare_shahri_name',
|
||||
'description', 'requested_machines', 'type', 'type_fa', 'start_date', 'state_id',
|
||||
'end_date', 'request_date', 'end_point', 'area', 'zone', 'zone_fa'
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user