removed select item_id box in wire master packing resource page
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s

This commit is contained in:
dhanabalan
2026-07-06 16:11:24 +05:30
parent 56656264c0
commit d24b4f35f4

View File

@@ -71,44 +71,8 @@ class WireMasterPackingResource extends Resource
}) })
->required() ->required()
->afterStateUpdated(function ($state, callable $set) { ->afterStateUpdated(function ($state, callable $set) {
if (!$state) {
$set('item_id', null);
return;
}
$set('item_id', null);
$set('wire_packing_number', null); $set('wire_packing_number', null);
// $customerPo = CustomerPoMaster::find($state);
// if ($customerPo && $customerPo->item_id) {
// $item = Item::find($customerPo->item_id);
// $set('item', $item?->code);
// } else {
// $set('item', null);
// }
}), }),
Forms\Components\Select::make('item_id')
->label('Item Code')
->reactive()
->searchable()
->options(function (callable $get) {
$customerPoId = $get('customer_po_master_id');
if (!$customerPoId) {
return [];
}
return Item::whereIn(
'id',
CustomerPoMaster::where('customer_po', $customerPoId)
->pluck('item_id')
)->pluck('code', 'id');
})
->required(),
Forms\Components\TextInput::make('wire_packing_number') Forms\Components\TextInput::make('wire_packing_number')
->label('Scan Wire Packing No') ->label('Scan Wire Packing No')
->reactive() ->reactive()