ImportPlayer add cars and penalty

This commit is contained in:
salam committed 2026-05-22 14:52:33 +02:00
1 parent d7d4ab9ea1
commit 314ab7885b
14 files changed
+308 -37

No files matched your search

+21 -8
View File
@@ -3,9 +3,11 @@
namespace App\Filament\Pages;
use App\Actions\LoadStatisticFixturesLeaguesOptions;
use App\Filament\Widgets\MedianAverageWidget;
use App\Filament\Widgets\MedianAverage;
use App\Filament\Widgets\MovingAverageChart;
use App\Filament\Widgets\MovingAverageChartPlayer;
use App\Filament\Widgets\PunctualChart;
use App\Filament\Widgets\PunctualChartPlayer;
use App\Models\Element;
use App\Models\StatisticFixtures;
use App\Models\StatistikoDetail;
@@ -13,7 +15,6 @@ use BackedEnum;
use Filament\Actions\Action;
use Filament\Forms\Components\DatePicker;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\Slider;
use Filament\Pages\Dashboard as BaseDashboard;
use Filament\Pages\Dashboard\Concerns\HasFiltersForm;
use Filament\Schemas\Components\Grid;
@@ -75,6 +76,16 @@ class Statistic extends BaseDashboard
->searchable()
->live()
->label('Team'),
Select::make('team_position')
->prefixIcon('phosphor-map-pin')
->default('all')
->selectablePlaceholder(false)
->options([
'all' => 'All',
'home' => 'Home',
'away' => 'Away',
]),
DatePicker::make('start_date')
->native(false)
->prefixIcon('phosphor-calendar')
@@ -93,7 +104,7 @@ class Statistic extends BaseDashboard
->color('gray')
->action(fn (Set $set) => $set('end_date', null))
),
])->columns(4)
])->columns(5)
->columnSpanFull(),
Grid::make()
->schema([
@@ -106,14 +117,14 @@ class Statistic extends BaseDashboard
return StatistikoDetail::where('txodds_id', $get('team_id'))->pluck('name', 'tm_player_id');
})
->live(),
Select::make('team_position')
->prefixIcon('phosphor-map-pin')
Select::make('player_on_field')
->prefixIcon('phosphor-watch')
->default('all')
->selectablePlaceholder(false)
->options([
'all' => 'All',
'home' => 'Home',
'away' => 'Away',
'lineup' => 'Lineup',
'substituted' => 'Substituted',
]),
Select::make('statistic_type')
->prefixIcon('phosphor-cell-signal-full')
@@ -178,9 +189,11 @@ class Statistic extends BaseDashboard
protected function getFooterWidgets(): array
{
return [
MedianAverageWidget::make(),
MedianAverage::make(),
PunctualChart::make(),
MovingAverageChart::make(),
PunctualChartPlayer::make(),
// MovingAverageChartPlayer::make(),
];
}