Sort work centers by name in get_data method of MachineController
This commit is contained in:
@@ -158,7 +158,7 @@ class MachineController extends Controller
|
|||||||
$test[] = [
|
$test[] = [
|
||||||
'group_work_center' => WorkGroupMaster::where('id', $curWorkGroupId)->first()->name ?? "",
|
'group_work_center' => WorkGroupMaster::where('id', $curWorkGroupId)->first()->name ?? "",
|
||||||
'operation_number' => WorkGroupMaster::where('id', $curWorkGroupId)->first()->operation_number ?? "",
|
'operation_number' => WorkGroupMaster::where('id', $curWorkGroupId)->first()->operation_number ?? "",
|
||||||
'work_centers' => Machine::where('plant_id', $plantId)->where('work_group_master_id', $curWorkGroupId)->pluck('work_center')->toArray() ?? [],
|
'work_centers' => Machine::where('plant_id', $plantId)->where('work_group_master_id', $curWorkGroupId)->orderBy('work_center')->pluck('work_center')->toArray() ?? [],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user