wip fix
This commit is contained in:
1 parent
9bcd4432c6
commit
6f92f9e1d5
1209 files changed
+220940
No files matched your search
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Exports;
|
||||
|
||||
use App\Models\Event;
|
||||
use Filament\Actions\Exports\ExportColumn;
|
||||
use Filament\Actions\Exports\Exporter;
|
||||
use Filament\Actions\Exports\Models\Export;
|
||||
use Illuminate\Support\Number;
|
||||
|
||||
class BetfairExporter extends Exporter
|
||||
{
|
||||
protected static ?string $model = Event::class;
|
||||
|
||||
public static function getColumns(): array
|
||||
{
|
||||
return [
|
||||
ExportColumn::make('id')
|
||||
->label('TxOdds id'),
|
||||
ExportColumn::make('betsapi_id'),
|
||||
ExportColumn::make('betradar_id'),
|
||||
ExportColumn::make('bet365_id'),
|
||||
ExportColumn::make('starttime'),
|
||||
ExportColumn::make('sport_id'),
|
||||
ExportColumn::make('country_id'),
|
||||
ExportColumn::make('country.name'),
|
||||
ExportColumn::make('competition_group_id')
|
||||
->label('Group id'),
|
||||
ExportColumn::make('competition_group.name')
|
||||
->label('Group'),
|
||||
ExportColumn::make('home_id'),
|
||||
ExportColumn::make('home.name'),
|
||||
ExportColumn::make('away_id'),
|
||||
ExportColumn::make('away.name'),
|
||||
ExportColumn::make('odds_3ways_bf.h3w')
|
||||
->label('1'),
|
||||
ExportColumn::make('odds_3ways_bf.d3w')
|
||||
->label('X'),
|
||||
ExportColumn::make('odds_3ways_bf.a3w')
|
||||
->label('2'),
|
||||
ExportColumn::make('odds_totals_bf.over')
|
||||
->label('Over'),
|
||||
ExportColumn::make('odds_totals_bf.under')
|
||||
->label('Under'),
|
||||
ExportColumn::make('odds_totals_bf.total')
|
||||
->label('Total'),
|
||||
];
|
||||
}
|
||||
|
||||
public static function getCompletedNotificationBody(Export $export): string
|
||||
{
|
||||
$body = 'Your event 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.';
|
||||
}
|
||||
|
||||
return $body;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Exports;
|
||||
|
||||
use App\Models\CompetitionGroup;
|
||||
use Filament\Actions\Exports\ExportColumn;
|
||||
use Filament\Actions\Exports\Exporter;
|
||||
use Filament\Actions\Exports\Models\Export;
|
||||
use Illuminate\Support\Number;
|
||||
|
||||
class CompetitionGroupExporter extends Exporter
|
||||
{
|
||||
protected static ?string $model = CompetitionGroup::class;
|
||||
|
||||
public static function getColumns(): array
|
||||
{
|
||||
return [
|
||||
ExportColumn::make('id')->label('ID'),
|
||||
ExportColumn::make('name'),
|
||||
ExportColumn::make('sport_id'),
|
||||
ExportColumn::make('country_id'),
|
||||
ExportColumn::make('country.name'),
|
||||
];
|
||||
}
|
||||
|
||||
public static function getCompletedNotificationBody(Export $export): string
|
||||
{
|
||||
$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.';
|
||||
}
|
||||
|
||||
return $body;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Exports;
|
||||
|
||||
use App\Models\Country;
|
||||
use Filament\Actions\Exports\ExportColumn;
|
||||
use Filament\Actions\Exports\Exporter;
|
||||
use Filament\Actions\Exports\Models\Export;
|
||||
use Illuminate\Support\Number;
|
||||
|
||||
class CountryExporter extends Exporter
|
||||
{
|
||||
protected static ?string $model = Country::class;
|
||||
|
||||
public static function getColumns(): array
|
||||
{
|
||||
return [
|
||||
ExportColumn::make('id'),
|
||||
ExportColumn::make('name'),
|
||||
];
|
||||
}
|
||||
|
||||
public static function getCompletedNotificationBody(Export $export): string
|
||||
{
|
||||
$body = 'Your countries 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.';
|
||||
}
|
||||
|
||||
return $body;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Exports;
|
||||
|
||||
use App\Models\StatistikoDetail;
|
||||
use Filament\Actions\Exports\ExportColumn;
|
||||
use Filament\Actions\Exports\Exporter;
|
||||
use Filament\Actions\Exports\Models\Export;
|
||||
use Illuminate\Support\Number;
|
||||
|
||||
class DetailsExporter extends Exporter
|
||||
{
|
||||
protected static ?string $model = StatistikoDetail::class;
|
||||
|
||||
public static function getColumns(): array
|
||||
{
|
||||
return [
|
||||
ExportColumn::make('ss_player_id'),
|
||||
ExportColumn::make('ss_team_id'),
|
||||
ExportColumn::make('player_name'),
|
||||
ExportColumn::make('ss_national_team_id'),
|
||||
ExportColumn::make('height'),
|
||||
ExportColumn::make('nationality'),
|
||||
ExportColumn::make('position'),
|
||||
ExportColumn::make('preferred_foot'),
|
||||
ExportColumn::make('last_update'),
|
||||
ExportColumn::make('is_active'),
|
||||
];
|
||||
}
|
||||
|
||||
public static function getCompletedNotificationBody(Export $export): string
|
||||
{
|
||||
$body = 'Your StatistikoDetail 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.';
|
||||
}
|
||||
|
||||
return $body;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Exports;
|
||||
|
||||
use App\Models\Element;
|
||||
use Filament\Actions\Exports\ExportColumn;
|
||||
use Filament\Actions\Exports\Exporter;
|
||||
use Filament\Actions\Exports\Models\Export;
|
||||
use Illuminate\Support\Number;
|
||||
|
||||
class ElementExporter extends Exporter
|
||||
{
|
||||
protected static ?string $model = Element::class;
|
||||
|
||||
public static function getColumns(): array
|
||||
{
|
||||
return [
|
||||
ExportColumn::make('id')->label('ID'),
|
||||
ExportColumn::make('name'),
|
||||
ExportColumn::make('sport_id'),
|
||||
ExportColumn::make('country_id'),
|
||||
ExportColumn::make('country.name'),
|
||||
];
|
||||
}
|
||||
|
||||
public static function getCompletedNotificationBody(Export $export): string
|
||||
{
|
||||
$body = 'Your element 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.';
|
||||
}
|
||||
|
||||
return $body;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Exports;
|
||||
|
||||
use App\Models\StatistikoEvent;
|
||||
use Filament\Actions\Exports\ExportColumn;
|
||||
use Filament\Actions\Exports\Exporter;
|
||||
use Filament\Actions\Exports\Models\Export;
|
||||
use Illuminate\Support\Number;
|
||||
|
||||
class EventsHistoryExporter extends Exporter
|
||||
{
|
||||
protected static ?string $model = StatistikoEvent::class;
|
||||
|
||||
public static function getColumns(): array
|
||||
{
|
||||
return [
|
||||
ExportColumn::make('match_id'),
|
||||
ExportColumn::make('sport_id'),
|
||||
ExportColumn::make('league_id'),
|
||||
ExportColumn::make('home_id'),
|
||||
ExportColumn::make('away_id'),
|
||||
ExportColumn::make('starttime'),
|
||||
ExportColumn::make('season'),
|
||||
ExportColumn::make('gls_h'),
|
||||
ExportColumn::make('gls_a'),
|
||||
ExportColumn::make('crn_h'),
|
||||
ExportColumn::make('crn_a'),
|
||||
ExportColumn::make('fls_h'),
|
||||
ExportColumn::make('fls_a'),
|
||||
ExportColumn::make('ofs_h'),
|
||||
ExportColumn::make('ofs_a'),
|
||||
ExportColumn::make('snt_h'),
|
||||
ExportColumn::make('snt_a'),
|
||||
ExportColumn::make('tsh_h'),
|
||||
ExportColumn::make('tsh_a'),
|
||||
ExportColumn::make('crd_h'),
|
||||
ExportColumn::make('crd_a'),
|
||||
ExportColumn::make('exp_home'),
|
||||
ExportColumn::make('exp_away'),
|
||||
ExportColumn::make('exp_handicap'),
|
||||
ExportColumn::make('exp_total'),
|
||||
ExportColumn::make('result_code'),
|
||||
];
|
||||
}
|
||||
|
||||
public static function getCompletedNotificationBody(Export $export): string
|
||||
{
|
||||
$body = 'Your events history 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.';
|
||||
}
|
||||
|
||||
return $body;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Exports;
|
||||
|
||||
use App\Models\PlayerHistory;
|
||||
use Filament\Actions\Exports\ExportColumn;
|
||||
use Filament\Actions\Exports\Exporter;
|
||||
use Filament\Actions\Exports\Models\Export;
|
||||
use Illuminate\Support\Number;
|
||||
|
||||
class PlayerHistoryExporter extends Exporter
|
||||
{
|
||||
protected static ?string $model = PlayerHistory::class;
|
||||
|
||||
public static function getColumns(): array
|
||||
{
|
||||
return [
|
||||
ExportColumn::make('match_id'),
|
||||
ExportColumn::make('ss_player_id'),
|
||||
ExportColumn::make('tm_player_id'),
|
||||
ExportColumn::make('sport_id'),
|
||||
ExportColumn::make('activeteam_id'),
|
||||
ExportColumn::make('assists'),
|
||||
ExportColumn::make('bcc'),
|
||||
ExportColumn::make('bcm'),
|
||||
ExportColumn::make('blocked_shots'),
|
||||
ExportColumn::make('card_red'),
|
||||
ExportColumn::make('card_yellow'),
|
||||
ExportColumn::make('card_yellowred'),
|
||||
ExportColumn::make('clearance_off_line'),
|
||||
ExportColumn::make('clearances'),
|
||||
ExportColumn::make('cross_done'),
|
||||
ExportColumn::make('description_event_during_the_match'),
|
||||
ExportColumn::make('dispossessed'),
|
||||
ExportColumn::make('dribbled_past'),
|
||||
ExportColumn::make('dribbles_won'),
|
||||
ExportColumn::make('errors_lead_to_a_goal'),
|
||||
ExportColumn::make('errors_lead_to_a_shot'),
|
||||
ExportColumn::make('fouls'),
|
||||
ExportColumn::make('goals'),
|
||||
ExportColumn::make('good_high_claim'),
|
||||
ExportColumn::make('hit_woodwork'),
|
||||
ExportColumn::make('ingamepenalty_missed'),
|
||||
ExportColumn::make('interceptions'),
|
||||
ExportColumn::make('key_pass'),
|
||||
ExportColumn::make('last_man_tackle'),
|
||||
ExportColumn::make('lineup'),
|
||||
ExportColumn::make('long_balls'),
|
||||
ExportColumn::make('minute_event_during_the_match'),
|
||||
ExportColumn::make('minutes_played'),
|
||||
ExportColumn::make('offsides'),
|
||||
ExportColumn::make('own_goals'),
|
||||
ExportColumn::make('pass'),
|
||||
ExportColumn::make('penalty_committed'),
|
||||
ExportColumn::make('penalty_miss'),
|
||||
ExportColumn::make('penalty_save'),
|
||||
ExportColumn::make('penalty_won'),
|
||||
ExportColumn::make('penaltyshoutout_missed'),
|
||||
ExportColumn::make('penaltyshoutout_scored'),
|
||||
ExportColumn::make('player_position'),
|
||||
ExportColumn::make('playerrating_value'),
|
||||
ExportColumn::make('playersubstitute_id'),
|
||||
ExportColumn::make('possessions_lost'),
|
||||
ExportColumn::make('punches'),
|
||||
ExportColumn::make('runs_out'),
|
||||
ExportColumn::make('saves'),
|
||||
ExportColumn::make('saves_from_in_box'),
|
||||
ExportColumn::make('shots_blocked'),
|
||||
ExportColumn::make('shots_off_target'),
|
||||
ExportColumn::make('shots_on_target'),
|
||||
ExportColumn::make('subtype_event_during_the_match'),
|
||||
ExportColumn::make('total_aerial_duels'),
|
||||
ExportColumn::make('total_cross'),
|
||||
ExportColumn::make('total_dribbles'),
|
||||
ExportColumn::make('total_duels_aerial_won'),
|
||||
ExportColumn::make('total_ground_duels'),
|
||||
ExportColumn::make('total_ground_duels_won'),
|
||||
ExportColumn::make('total_long_balls'),
|
||||
ExportColumn::make('total_pass'),
|
||||
ExportColumn::make('total_runs_out'),
|
||||
ExportColumn::make('total_tackles'),
|
||||
ExportColumn::make('touches'),
|
||||
ExportColumn::make('type_event_during_the_match'),
|
||||
ExportColumn::make('updated_at'),
|
||||
ExportColumn::make('was_fouled'),
|
||||
];
|
||||
}
|
||||
|
||||
public static function getCompletedNotificationBody(Export $export): string
|
||||
{
|
||||
$body = 'Your player history 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.';
|
||||
}
|
||||
|
||||
return $body;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user