wip
This commit is contained in:
1 parent
550ea115f1
commit
c036814366
12 files changed
+481
-18891
No files matched your search
@@ -4,7 +4,9 @@ namespace App\Filament\Clusters\StaticData\Resources\UbEvents\Pages;
|
||||
|
||||
use App\Filament\Clusters\StaticData\Resources\UbEvents\UbEventResource;
|
||||
use App\Filament\Imports\UbEventImporter;
|
||||
use Filament\Actions\Action;
|
||||
use Filament\Actions\ImportAction;
|
||||
use Filament\Notifications\Notification;
|
||||
use Filament\Resources\Pages\ListRecords;
|
||||
|
||||
class ListUbEvents extends ListRecords
|
||||
@@ -16,9 +18,26 @@ class ListUbEvents extends ListRecords
|
||||
return [
|
||||
ImportAction::make('importPlayer')
|
||||
->icon('phosphor-upload')
|
||||
->label('Events')
|
||||
->modalDescription('Separator comma ";"')
|
||||
->importer(UbEventImporter::class),
|
||||
->label('Import')
|
||||
->modalIcon('phosphor-file-csv')
|
||||
->modalDescription('Separator ";"')
|
||||
->modalHeading('Import events with player')
|
||||
->importer(UbEventImporter::class)
|
||||
->csvDelimiter(';')
|
||||
->extraModalFooterActions([
|
||||
Action::make('copy')
|
||||
->tooltip('Copy header line')
|
||||
->color('success')
|
||||
->label('Copy csv header')
|
||||
->action(function ($livewire) {
|
||||
$livewire->js('window.navigator.clipboard.writeText("league_id;home_id;away_id;starttime;player_id;home_away;home_ft;away_ft;home_ht;away_ht;Goals;assists;tackles;total_passes;passes_done;total_duels;duels_won;total_ground_duels;ground_duels_won;total_aerial_duels;aerial_duels_won;minutes_played;shots_on_target;shots_off_target;shots_blocked;total_dribble;dribble_done;position;rating;bcm;hw;pw;pm;possession_lost;fouls;was_fouled;offsides;date_acquisition");');
|
||||
|
||||
Notification::make()
|
||||
->title('Header copied successfully')
|
||||
->success()
|
||||
->send();
|
||||
}),
|
||||
]),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user