add download button for evenrs and players history

This commit is contained in:
salam committed 2026-08-10 17:01:20 +02:00
1 parent db027c4238
commit 10baadb780
4 files changed
+175

No files matched your search

@@ -3,10 +3,13 @@
namespace App\Filament\Clusters\StaticData\Resources\StatistikoPlayers\Pages;
use App\Filament\Clusters\StaticData\Resources\StatistikoPlayers\StatistikoPlayerResource;
use App\Filament\Exports\PlayerHistoryExporter;
use App\Models\StatistikoPlayer;
use DateTime;
use Filament\Actions\Action;
use Filament\Actions\CreateAction;
use Filament\Actions\ExportAction;
use Filament\Actions\Exports\Models\Export;
use Filament\Resources\Pages\ListRecords;
class ListStatistikoPlayers extends ListRecords
@@ -16,6 +19,12 @@ class ListStatistikoPlayers extends ListRecords
protected function getHeaderActions(): array
{
return [
ExportAction::make('download_betfair')
->columnMapping(false)
->exporter(PlayerHistoryExporter::class)
->label('Download')
->fileName(fn (Export $export): string => 'player-history-'.date('d.m.Y-H.i')."-{$export->getKey()}")
->icon('phosphor-download'),
Action::make('starttime')
->color('gray')
->tooltip('Find events with wrong starttime')