From e84a2e87b20cbf26b5137334e6798f4f4a14469a Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Sun, 6 Apr 2025 17:53:56 +0530 Subject: [PATCH] Unwanted comments removed --- .../Resources/ProductionLineStopResource.php | 22 ------------------- 1 file changed, 22 deletions(-) diff --git a/app/Filament/Resources/ProductionLineStopResource.php b/app/Filament/Resources/ProductionLineStopResource.php index 9e4cb11..396aeb3 100644 --- a/app/Filament/Resources/ProductionLineStopResource.php +++ b/app/Filament/Resources/ProductionLineStopResource.php @@ -126,28 +126,11 @@ class ProductionLineStopResource extends Resource ->relationship('shift', 'name') ->required() // ->nullable() - // ->options(fn (callable $get) => - // \App\Models\Shift::where('plant_id', $get('plant_id')) - // ->pluck('name', 'id') - // ->toArray() // Convert collection to array - // ) ->options(function (callable $get) { if (!$get('plant_id') || !$get('block_name')) { return []; } - // // Get the block ID based on plant_id and block_name - // $block = \App\Models\Block::where('plant_id', $get('plant_id')) - // ->where('name', $get('block_name')) - // ->first(); - // if (!$block) { - // return []; - // } - - // return \App\Models\Shift::where('plant_id', $get('plant_id')) - // ->pluck('name', 'id') - // ->toArray(); - // return \App\Models\Shift::where('plant_id', $get('plant_id')) return Shift::where('plant_id', $get('plant_id')) ->where('block_id', $get('block_name')) ->pluck('name', 'id') @@ -187,11 +170,6 @@ class ProductionLineStopResource extends Resource ->relationship('line', 'name') ->required() // ->nullable() - // ->options(fn (callable $get) => - // \App\Models\Line::where('plant_id', $get('plant_id')) - // ->pluck('name', 'id') - // ->toArray() // Convert collection to array - // ) ->options(function (callable $get) { if (!$get('plant_id') || !$get('block_name') || !$get('shift_id')) { return [];