1
0
forked from poc/pds

Sort work centers by name in get_data method of MachineController

This commit is contained in:
dhanabalan
2025-11-15 17:29:45 +05:30
parent a6d8d57fd5
commit 95e18838ca

View File

@@ -158,7 +158,7 @@ class MachineController extends Controller
$test[] = [
'group_work_center' => WorkGroupMaster::where('id', $curWorkGroupId)->first()->name ?? "",
'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() ?? [],
];
}