Added invoice upload directory creation logic #291

Merged
jothi merged 1 commits from ranjith-dev into master 2026-02-03 06:49:45 +00:00

View File

@@ -52,7 +52,15 @@ class TestingTempResource extends Resource
$set('attachment', null);
if (! $plantId) {
$set('ivPlantError', 'Please select a plant first.');
} else {
$plantCode = Plant::find($plantId)?->code ?? null;
$directory = "uploads/temp/{$plantCode}";
if (! Storage::disk('local')->exists($directory)) {
Storage::disk('local')->makeDirectory($directory);
}
}
$set('updated_by', Filament::auth()->user()?->name);
})
->extraAttributes(fn ($get) => [