Skip to content

Commit

Permalink
Merge pull request #774 from JoshKisb/main
Browse files Browse the repository at this point in the history
update gedcom import
  • Loading branch information
curtisdelicata authored Jun 10, 2024
2 parents 471b982 + 1bb05d8 commit b7713d0
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions app/Filament/Resources/GedcomResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use Filament\Resources\Resource;
use Filament\Tables;
use Filament\Tables\Table;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Storage;

class GedcomResource extends Resource
Expand Down Expand Up @@ -49,8 +50,7 @@ public static function form(Form $form): Form
return;
}
$path = $state->store('gedcom-form-imports', 'private');
$conn = Auth::user()->company()->database_name; // Get the tenant's database connection name
ImportGedcom::dispatch(Auth::user(), Storage::disk('private')->path($path), $conn);
ImportGedcom::dispatch(Auth::user(), Storage::disk('private')->path($path));
}),
]);
}
Expand Down
7 changes: 2 additions & 5 deletions app/Jobs/ImportGedcom.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,8 @@ class ImportGedcom implements ShouldQueue
public int $timeout = 0;
public int $tries = 1;

protected string $conn;

public function __construct(protected User $user, protected string $filePath, protected string $conn, protected ?string $slug = null)
public function __construct(protected User $user, protected string $filePath, protected ?string $slug = null)
{
$this->conn = $conn;
}

public function handle(): int
Expand All @@ -52,7 +49,7 @@ public function handle(): int
]);
$parser = new GedcomParser();

$parser->parse($this->conn, $this->filePath, $slug, false);
$parser->parse($job->getConnectionName(), $this->filePath, $slug, false);
// with(new GedcomParser())->parse($tenant->connectionName(), $this->filePath, $slug, true);

File::delete($this->filePath);
Expand Down
1 change: 1 addition & 0 deletions public/build/assets/app-CkNwwAZT.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions public/build/assets/dashboard-B7tka_NQ.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions public/build/manifest.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"resources/css/app.css": {
"file": "assets/app-DMCeC1nD.css",
"file": "assets/app-CkNwwAZT.css",
"src": "resources/css/app.css",
"isEntry": true
},
"resources/css/dashboard.css": {
"file": "assets/dashboard-WAznCSOB.css",
"file": "assets/dashboard-B7tka_NQ.css",
"src": "resources/css/dashboard.css",
"isEntry": true
},
Expand Down

0 comments on commit b7713d0

Please sign in to comment.