Added more imports

This commit is contained in:
Constantin Graf
2024-03-11 19:12:51 +01:00
parent 77e7a63b83
commit 66a1d8a38b
52 changed files with 1646 additions and 56 deletions

View File

@@ -74,7 +74,7 @@ class OrganizationResource extends Resource
// TODO: different disk!
try {
/** @var ReportDto $report */
$report = app(ImportService::class)->import($record, $data['type'], Storage::disk('public')->get($data['file']), []);
$report = app(ImportService::class)->import($record, $data['type'], Storage::disk('public')->get($data['file']));
Notification::make()
->title('Import successful')
->success()
@@ -98,9 +98,10 @@ class OrganizationResource extends Resource
->send();
}
})
->tooltip(fn (Organization $record): string => "Import into {$record->name}")
->tooltip(fn (Organization $record): string => 'Import into '.$record->name)
->form([
Forms\Components\FileUpload::make('file')
// TODO: disk!
->label('File')
->required(),
Select::make('type')