diff --git a/app/Filament/Resources/InvoiceValidationResource.php b/app/Filament/Resources/InvoiceValidationResource.php index 38b8ecf..9a0bed3 100644 --- a/app/Filament/Resources/InvoiceValidationResource.php +++ b/app/Filament/Resources/InvoiceValidationResource.php @@ -560,14 +560,13 @@ class InvoiceValidationResource extends Resource ->options(Plant::pluck('name', 'id')->toArray()) // Fetch plant names and IDs ->label('Select Plant') ->required() - ->reactive() ->default(function () { return optional(InvoiceValidation::latest()->first())->plant_id; }) ->afterStateUpdated(function ($state, callable $set, callable $get) { $set('invoice_material', null); - }), - + }) + ->reactive(), FileUpload::make('invoice_material') ->label('Invoice Material') @@ -577,8 +576,7 @@ class InvoiceValidationResource extends Resource ->storeFiles(false) // prevent auto-storing ->disk('local') ->visible(fn (Get $get) => !empty($get('plant_id'))) - ->directory('uploads/temp') - + ->directory('uploads/temp'), ]) ->action(function (array $data) {