This commit is contained in:
salam committed 2026-03-05 12:04:21 +01:00
1 parent 356dabb0c1
commit 8b67b7ce9e
3 files changed
+4 -5

No files matched your search

@@ -89,14 +89,14 @@ class CompetitionGroupsTable
])
->headerActions([
ExportAction::make()
->modalHeading('Download Groups')
->modalHeading('Download Tournaments')
->label('Export')
->icon('phosphor-download')
->modalDescription('This will download the TxOdds tournaments with "sport_id" and "country_id" for the sport selected.')
->modalIcon('phosphor-microsoft-excel-logo')
->exporter(CompetitionGroupExporter::class)
->columnMapping(false)
->modifyQueryUsing(fn (Builder $query, Get $get) => $query->where('spoirt_id', $get('sport_id')))
->modifyQueryUsing(fn (Builder $query, Get $get) => $query->where('sport_id', $get('sport_id')))
->formats([
ExportFormat::Xlsx,
ExportFormat::Csv,
@@ -115,7 +115,7 @@ class ElementsTable
->modalIcon('phosphor-microsoft-excel-logo')
->exporter(ElementExporter::class)
->columnMapping(false)
->modifyQueryUsing(fn (Builder $query, Get $get) => $query->where('spoirt_id', $get('sport_id')))
->modifyQueryUsing(fn (Builder $query, Get $get) => $query->where('sport_id', $get('sport_id')))
->formats([
ExportFormat::Xlsx,
ExportFormat::Csv,
@@ -18,7 +18,6 @@ class CompetitionGroupExporter extends Exporter
ExportColumn::make('id')
->label('ID'),
ExportColumn::make('name'),
ExportColumn::make('level'),
ExportColumn::make('sport_id'),
ExportColumn::make('country_id'),
];
@@ -26,7 +25,7 @@ class CompetitionGroupExporter extends Exporter
public static function getCompletedNotificationBody(Export $export): string
{
$body = 'Your competition group export has completed and '.Number::format($export->successful_rows).' '.str('row')->plural($export->successful_rows).' exported.';
$body = 'Your tournaments export has completed and '.Number::format($export->successful_rows).' '.str('row')->plural($export->successful_rows).' exported.';
if ($failedRowsCount = $export->getFailedRowsCount()) {
$body .= ' '.Number::format($failedRowsCount).' '.str('row')->plural($failedRowsCount).' failed to export.';