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
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
This commit is contained in:
@@ -71,44 +71,8 @@ class WireMasterPackingResource extends Resource
|
||||
})
|
||||
->required()
|
||||
->afterStateUpdated(function ($state, callable $set) {
|
||||
if (!$state) {
|
||||
$set('item_id', null);
|
||||
return;
|
||||
}
|
||||
|
||||
$set('item_id', 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')
|
||||
->label('Scan Wire Packing No')
|
||||
->reactive()
|
||||
|
||||
Reference in New Issue
Block a user