wip import
This commit is contained in:
1 parent
048989fed8
commit
4fa4e1a611
11 files changed
+48902
-141
No files matched your search
+1
-1
@@ -40,7 +40,7 @@ class StatistikoImportForm
|
||||
->acceptedFileTypes([
|
||||
'application/vnd.ms-excel',
|
||||
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
||||
'text/csv', // Optional: include if you accept CSV too
|
||||
// 'text/csv', // Optional: include if you accept CSV too
|
||||
]),
|
||||
])->columns(1);
|
||||
}
|
||||
|
||||
+3
-14
@@ -60,25 +60,14 @@ class StatistikoImportsTable
|
||||
->recordActions([
|
||||
ActionGroup::make([
|
||||
Action::make('Import')
|
||||
->label('Import (fast)')
|
||||
->label('Import to DB')
|
||||
->icon('phosphor-database')
|
||||
->action(function ($record) {
|
||||
StatistikoImporter::run('import', $record);
|
||||
})->successNotification(
|
||||
->action(fn ($record) => StatistikoImporter::run($record))
|
||||
->successNotification(
|
||||
Notification::make()
|
||||
->info()
|
||||
->title('Import started')
|
||||
),
|
||||
Action::make('Update')
|
||||
->label('Update or Import (slow)')
|
||||
->icon('phosphor-database')
|
||||
->action(function ($record) {
|
||||
StatistikoImporter::run('update', $record);
|
||||
})->successNotification(
|
||||
Notification::make()
|
||||
->info()
|
||||
->title('Import & Update started')
|
||||
),
|
||||
DeleteAction::make()
|
||||
->label('Delete file'),
|
||||
]),
|
||||
|
||||
+10
-10
@@ -19,18 +19,18 @@ class StatistikoPlayersTable
|
||||
->paginationPageOptions([8, 16, 24, 36])
|
||||
->columns([
|
||||
Stack::make([
|
||||
TextColumn::make('id_giocatore')->prefix('Id: ')->searchable()->color('success')->icon('phosphor-copy')->copyable(),
|
||||
TextColumn::make('giocatore')->searchable()->prefix('Nome: ')->color('primary')->icon('phosphor-copy')->copyable(),
|
||||
TextColumn::make('nome_completo')->color('gray')->searchable(),
|
||||
TextColumn::make('data_di_nascita')->date()->prefix('Nascita: '),
|
||||
TextColumn::make('altezza')->prefix('Altezza: ')->suffix(' cm'),
|
||||
TextColumn::make('nazionalita')->prefix('Nazionalita: '),
|
||||
TextColumn::make('posizione')->prefix('Posizione: '),
|
||||
TextColumn::make('player_id')->prefix('Id: ')->searchable()->color('success')->icon('phosphor-copy')->copyable(),
|
||||
TextColumn::make('name')->searchable()->prefix('Name: ')->color('primary')->icon('phosphor-copy')->copyable(),
|
||||
TextColumn::make('full_name')->color('gray')->searchable(),
|
||||
TextColumn::make('birthdate')->date()->prefix('Birthdate: '),
|
||||
TextColumn::make('height')->prefix('Height: ')->suffix(' cm'),
|
||||
TextColumn::make('nationality')->prefix('Nationality: '),
|
||||
TextColumn::make('position')->prefix('Position: '),
|
||||
TextColumn::make('sport_radar_id')->searchable()->prefix('Sport Radar Id: ')->icon('phosphor-copy')->copyable(),
|
||||
TextColumn::make('id_squadra_tm')->prefix('Id Squadra TM: '),
|
||||
TextColumn::make('rigorista')->prefix('Rigorista: '),
|
||||
TextColumn::make('id_squadra_tm')->prefix('Team Id TM: '),
|
||||
TextColumn::make('rigorist')->prefix('Rigorist: '),
|
||||
TextColumn::make('national_team_id')->prefix('National Team Id: '),
|
||||
TextColumn::make('data_aggiornamento')->date()->prefix('Aggiornamento: '),
|
||||
TextColumn::make('last_update')->date()->prefix('Last Update: '),
|
||||
TextColumn::make('created_at')->date()->prefix('Created: '),
|
||||
TextColumn::make('updated_at')->date()->prefix('Updated: '),
|
||||
// TextColumn::make('league_code')->prefix('League: '),
|
||||
|
||||
Reference in new issue
Block a user