Updated item selection logic in StickerMasterResource to return an empty array when no plant is selected
This commit is contained in:
@@ -620,9 +620,7 @@ class StickerMasterResource extends Resource
|
||||
->options(function (callable $get) {
|
||||
$plantId = $get('Plant');
|
||||
|
||||
return $plantId
|
||||
? Item::where('plant_id', $plantId)->pluck('code', 'id')
|
||||
: Item::pluck('code', 'id');
|
||||
return $plantId ? Item::where('plant_id', $plantId)->pluck('code', 'id') : [];
|
||||
})
|
||||
->searchable()
|
||||
->reactive(),
|
||||
|
||||
Reference in New Issue
Block a user