Added reprint functionality in pallet validation

This commit is contained in:
dhanabalan
2025-07-07 17:35:58 +05:30
parent bd0eed07ac
commit 74c3243c06

View File

@@ -481,16 +481,21 @@ class PalletValidationResource extends Resource
Tables\Actions\Action::make('reprint_pallet')
->label('Re-Print Pallet QR')
->form([
Select::make('plant')
->options(Plant::pluck('name', 'id')->toArray())
Forms\Components\Section::make()
->schema([
Forms\Components\Select::make('plant')
->label('Select Plant')
->options(Plant::pluck('name', 'id')->toArray())
->required()
->reactive(),
Select::make('pallet_list')
->reactive()
->columnSpan(2),
Forms\Components\Select::make('pallet_list')
->label('Select Pallet')
->searchable()
->required()
->reactive()
->columnSpan(1)
->options(function (callable $get) {
$plantId = $get('plant');
@@ -508,7 +513,8 @@ class PalletValidationResource extends Resource
->pluck('pallet_number', 'pallet_number')
->toArray();
}),
])
->columns(['default' => 1, 'sm' => 3]),
])
->action(function (array $data) {
$selectedPalletNumber = $data['pallet_list'];