download countries, teams/player and tournaments for txodds

This commit is contained in:
salam committed 2026-03-05 11:56:18 +01:00
1 parent cf37530dd2
commit 356dabb0c1
14 files changed
+294 -17

No files matched your search

@@ -2,6 +2,7 @@
namespace App\Filament\Clusters\DynamicData\Resources\Elements\Tables;
use App\Filament\Exports\ElementExporter;
use App\Models\CompetitionGroup;
use App\Models\Country;
use App\Models\ElementGroup;
@@ -13,6 +14,8 @@ use Filament\Actions\BulkActionGroup;
use Filament\Actions\DeleteAction;
use Filament\Actions\DeleteBulkAction;
use Filament\Actions\EditAction;
use Filament\Actions\ExportAction;
use Filament\Actions\Exports\Enums\ExportFormat;
use Filament\Forms\Components\Select;
use Filament\Notifications\Notification;
use Filament\Schemas\Components\Utilities\Get;
@@ -103,6 +106,21 @@ class ElementsTable
])->iconButton()
->icon('phosphor-dots-three-vertical'),
])
->headerActions([
ExportAction::make()
->modalHeading('Download Teams/Player')
->label('Export')
->icon('phosphor-download')
->modalDescription('This will download the TxOdds Teams/Player with "sport_id" and "country_id" for the sport selected.')
->modalIcon('phosphor-microsoft-excel-logo')
->exporter(ElementExporter::class)
->columnMapping(false)
->modifyQueryUsing(fn (Builder $query, Get $get) => $query->where('spoirt_id', $get('sport_id')))
->formats([
ExportFormat::Xlsx,
ExportFormat::Csv,
]),
])
->toolbarActions([
BulkActionGroup::make([
DeleteBulkAction::make(),