Forms\Components\Select::make('inventory_id')
->label('Inventory Name')
->distinct()
->required()
->live()
->options(Inventory::all()->pluck('asset_name', 'id'))
->searchable()
->afterStateUpdated(function (Livewire $livewire) {
$livewire->reset('qty');
}),
\LaraZeus\Quantity\Components\Quantity::make('qty')
->minValue(1)
->maxValue(function($record){
if(!empty($record))
$record->inventory->qty-$record->inventory->inventory_location_list->count();
else return '1';
})
->required(),
Forms\Components\Select::make('inventory_id')
->label('Inventory Name')
->distinct()
->required()
->live()
->options(Inventory::all()->pluck('asset_name', 'id'))
->searchable()
->afterStateUpdated(function (Livewire $livewire) {
$livewire->reset('qty');
}),
\LaraZeus\Quantity\Components\Quantity::make('qty')
->minValue(1)
->maxValue(function($record){
if(!empty($record))
$record->inventory->qty-$record->inventory->inventory_location_list->count();
else return '1';
})
->required(),