add new column for filtering
This commit is contained in:
@@ -14,7 +14,7 @@ class CMMSMachinesController extends Controller
|
||||
|
||||
public function list(): JsonResponse
|
||||
{
|
||||
$machinesList = CMMSMachine::query()->get(['machine_code']);
|
||||
$machinesList = CMMSMachine::query()->get(['machine_code', 'id']);
|
||||
|
||||
return $this->successResponse($machinesList);
|
||||
}
|
||||
@@ -23,7 +23,7 @@ class CMMSMachinesController extends Controller
|
||||
{
|
||||
$matchedSearchedMachines = CMMSMachine::query()
|
||||
->where('machine_code', 'LIKE', "%{$request->machine_code}%")
|
||||
->get(['machine_code']);
|
||||
->get(['machine_code', 'id']);
|
||||
|
||||
return $this->successResponse($matchedSearchedMachines);
|
||||
}
|
||||
|
||||
@@ -39,7 +39,8 @@ class RoadItemsProjectController extends Controller
|
||||
'end_lng', 'project_distance', 'item', 'item_fa', 'sub_item_fa',
|
||||
'sub_item_data', 'created_at', 'updated_at', 'province_id', 'province_fa',
|
||||
'unit_fa', 'status', 'status_fa', 'supervisor_description', 'supervising_time',
|
||||
'supervisor_name', 'edarat_id', 'edarat_name', 'activity_date_time'
|
||||
'supervisor_name', 'edarat_id', 'edarat_name', 'activity_date_time',
|
||||
'cmms_machine_id', 'cmms_machine_code', 'rahdar_id', 'rahdar_code'
|
||||
);
|
||||
|
||||
$allowedFilters = $columns;
|
||||
@@ -146,7 +147,8 @@ class RoadItemsProjectController extends Controller
|
||||
'end_lng', 'project_distance', 'item', 'item_fa', 'sub_item_fa',
|
||||
'sub_item_data', 'created_at', 'updated_at', 'province_id', 'province_fa',
|
||||
'unit_fa', 'status', 'status_fa', 'supervisor_description', 'supervising_time',
|
||||
'supervisor_name', 'edarat_id', 'edarat_name', 'activity_date_time'
|
||||
'supervisor_name', 'edarat_id', 'edarat_name', 'activity_date_time',
|
||||
'cmms_machine_id', 'cmms_machine_code', 'rahdar_id', 'rahdar_code'
|
||||
);
|
||||
|
||||
$allowedFilters = $columns;
|
||||
|
||||
Reference in New Issue
Block a user