From 4bce04cd64ca3317f4ac07873a648bfea16ab537 Mon Sep 17 00:00:00 2001 From: salam Date: Tue, 28 Apr 2026 18:18:31 +0200 Subject: [PATCH] wip --- app/Filament/Pages/Statistic.php | 16 +++++----- app/Filament/Widgets/StatisticFilters.php | 36 ----------------------- 2 files changed, 7 insertions(+), 45 deletions(-) delete mode 100644 app/Filament/Widgets/StatisticFilters.php diff --git a/app/Filament/Pages/Statistic.php b/app/Filament/Pages/Statistic.php index d203afdc..da07cbe9 100644 --- a/app/Filament/Pages/Statistic.php +++ b/app/Filament/Pages/Statistic.php @@ -3,7 +3,6 @@ namespace App\Filament\Pages; use App\Actions\LoadStatisticFixturesLeaguesOptions; -use App\Models\CompetitionGroup; use App\Models\Element; use App\Models\StatisticFixtures; use BackedEnum; @@ -38,7 +37,10 @@ class Statistic extends BaseDashboard ->preload() ->searchable() ->live() - ->label('League'), + ->label('League') + ->afterStateUpdated(function (callable $set) { + $set('team_id', null); + }), Select::make('team_id') ->prefixIcon('icon-team') ->options(function (Get $get) { @@ -67,13 +69,9 @@ class Statistic extends BaseDashboard Select::make('palyer_id') ->label('Player') ->prefixIcon('icon-player') - ->options(function () { - $res = StatisticFixtures::where('sport_id', 1) - ->groupBy('league_id') - ->pluck('league_id')->toArray(); - - return CompetitionGroup::query()->whereIn('id', $res)->orderBy('name')->pluck('name', 'id'); - }) + ->options([ + 'draft' => 'Sep Maier', + ]) ->preload() ->searchable() ->live(), diff --git a/app/Filament/Widgets/StatisticFilters.php b/app/Filament/Widgets/StatisticFilters.php deleted file mode 100644 index 248ec25b..00000000 --- a/app/Filament/Widgets/StatisticFilters.php +++ /dev/null @@ -1,36 +0,0 @@ -statePath('data') - ->schema([ - Grid::make() - ->schema([ - DatePicker::make('from'), - DatePicker::make('to'), - ]), - ]); - } -}