Skip to content

Commit

Permalink
feat: Updated app/Filament/Resources/GedcomResourc
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-ai[bot] committed Mar 10, 2024
1 parent 504c55a commit b0c0516
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions app/Filament/Resources/GedcomResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
use Filament\Tables\Table;

class GedcomResource extends Resource
use Filament\Forms\Components\FileUpload;
use App\Jobs\ImportGedcom;
use Illuminate\Support\Facades\Storage;
{
protected static bool $isScopedToTenant = false;

Expand All @@ -26,9 +29,13 @@ public static function form(Form $form): Form
->maxSize(100000)
->directory('gedcom-form-imports')
->visibility('private')
->afterStateUpdated(
ImportGedcom::dispatch($request->user(), $manager->storagePath($path), $state)
),
->afterStateUpdated(function ($state, $set, $livewire) {
if ($state === null) {
return;
}
$path = $state->store('gedcom-form-imports', 'private');
ImportGedcom::dispatch($livewire->user(), Storage::path($path));
}),
]);
}

Expand Down

0 comments on commit b0c0516

Please sign in to comment.