wip download details as csv and excel

This commit is contained in:
salam committed 2026-08-12 11:52:38 +02:00
1 parent 5b5fdc9321
commit 23a04dd7e1
4 files changed
+54 -4

No files matched your search

@@ -32,11 +32,11 @@ class ListStatisticFixtures extends ListRecords
->action(function () {
StatisticFixtures::truncate();
}),
Action::make('delete')
Action::make('remove_started')
->icon('phosphor-trash')
->tooltip('Delete events already started')
->requiresConfirmation()
->color('danger')
->color('info')
->action(function () {
StatisticFixtures::where('starttime', '<', now())->delete();
}),
@@ -3,9 +3,12 @@
namespace App\Filament\Clusters\StaticData\Resources\StatistikoDetails\Pages;
use App\Filament\Clusters\StaticData\Resources\StatistikoDetails\StatistikoDetailResource;
use App\Filament\Exports\DetailsExporter;
use App\Models\StatistikoDetail;
use Filament\Actions\Action;
use Filament\Actions\CreateAction;
use Filament\Actions\ExportAction;
use Filament\Actions\Exports\Models\Export;
use Filament\Resources\Pages\ListRecords;
class ListStatistikoDetails extends ListRecords
@@ -15,6 +18,12 @@ class ListStatistikoDetails extends ListRecords
protected function getHeaderActions(): array
{
return [
ExportAction::make('download_all')
->columnMapping(false)
->exporter(DetailsExporter::class)
->label('Download')
->fileName(fn(Export $export): string => 'details-' . date('d.m.Y-H.i') . "-{$export->getKey()}")
->icon('phosphor-download'),
Action::make('is_active')
->label('Disable All')
->icon('phosphor-pause')
@@ -19,11 +19,11 @@ class ListStatistikoEvents extends ListRecords
protected function getHeaderActions(): array
{
return [
ExportAction::make('download_betfair')
ExportAction::make('download_all')
->columnMapping(false)
->exporter(EventsHistoryExporter::class)
->label('Download')
->fileName(fn (Export $export): string => 'events-history-'.date('d.m.Y-H.i')."-{$export->getKey()}")
->fileName(fn(Export $export): string => 'events-history-' . date('d.m.Y-H.i') . "-{$export->getKey()}")
->icon('phosphor-download'),
Action::make('starttime')
->color('gray')