wip
This commit is contained in:
1 parent
356dabb0c1
commit
8b67b7ce9e
3 files changed
+4
-5
No files matched your search
+2
-2
@@ -89,14 +89,14 @@ class CompetitionGroupsTable
|
|||||||
])
|
])
|
||||||
->headerActions([
|
->headerActions([
|
||||||
ExportAction::make()
|
ExportAction::make()
|
||||||
->modalHeading('Download Groups')
|
->modalHeading('Download Tournaments')
|
||||||
->label('Export')
|
->label('Export')
|
||||||
->icon('phosphor-download')
|
->icon('phosphor-download')
|
||||||
->modalDescription('This will download the TxOdds tournaments with "sport_id" and "country_id" for the sport selected.')
|
->modalDescription('This will download the TxOdds tournaments with "sport_id" and "country_id" for the sport selected.')
|
||||||
->modalIcon('phosphor-microsoft-excel-logo')
|
->modalIcon('phosphor-microsoft-excel-logo')
|
||||||
->exporter(CompetitionGroupExporter::class)
|
->exporter(CompetitionGroupExporter::class)
|
||||||
->columnMapping(false)
|
->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([
|
->formats([
|
||||||
ExportFormat::Xlsx,
|
ExportFormat::Xlsx,
|
||||||
ExportFormat::Csv,
|
ExportFormat::Csv,
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ class ElementsTable
|
|||||||
->modalIcon('phosphor-microsoft-excel-logo')
|
->modalIcon('phosphor-microsoft-excel-logo')
|
||||||
->exporter(ElementExporter::class)
|
->exporter(ElementExporter::class)
|
||||||
->columnMapping(false)
|
->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([
|
->formats([
|
||||||
ExportFormat::Xlsx,
|
ExportFormat::Xlsx,
|
||||||
ExportFormat::Csv,
|
ExportFormat::Csv,
|
||||||
|
|||||||
@@ -18,7 +18,6 @@ class CompetitionGroupExporter extends Exporter
|
|||||||
ExportColumn::make('id')
|
ExportColumn::make('id')
|
||||||
->label('ID'),
|
->label('ID'),
|
||||||
ExportColumn::make('name'),
|
ExportColumn::make('name'),
|
||||||
ExportColumn::make('level'),
|
|
||||||
ExportColumn::make('sport_id'),
|
ExportColumn::make('sport_id'),
|
||||||
ExportColumn::make('country_id'),
|
ExportColumn::make('country_id'),
|
||||||
];
|
];
|
||||||
@@ -26,7 +25,7 @@ class CompetitionGroupExporter extends Exporter
|
|||||||
|
|
||||||
public static function getCompletedNotificationBody(Export $export): string
|
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()) {
|
if ($failedRowsCount = $export->getFailedRowsCount()) {
|
||||||
$body .= ' '.Number::format($failedRowsCount).' '.str('row')->plural($failedRowsCount).' failed to export.';
|
$body .= ' '.Number::format($failedRowsCount).' '.str('row')->plural($failedRowsCount).' failed to export.';
|
||||||
|
|||||||
Reference in new issue
Block a user