From 713da3b2664e78759a65ebdecf0c065867c3a1e1 Mon Sep 17 00:00:00 2001 From: salam Date: Mon, 31 Aug 2026 07:40:24 +0200 Subject: [PATCH] wip season --- app/Filament/Pages/Statistic.php | 42 ++++++++++++++++++++++++++++---- 1 file changed, 37 insertions(+), 5 deletions(-) diff --git a/app/Filament/Pages/Statistic.php b/app/Filament/Pages/Statistic.php index 2690104d..31bea3ae 100644 --- a/app/Filament/Pages/Statistic.php +++ b/app/Filament/Pages/Statistic.php @@ -349,7 +349,7 @@ class Statistic extends BaseDashboard ]), /************************ - * SEASON + * SEASON fulltime ************************/ Select::make('season') ->live() @@ -359,14 +359,46 @@ class Statistic extends BaseDashboard ->placeholder('Current Season') ->prefixIconColor('success') // ->prefixIconColor(fn(Get $get): string => $get('season') ? 'success' : 'primary') - ->hidden(fn(Get $get) => $get('season_or_date') == 'date' || $get('similar_past_matches') != 'none') + ->hidden(fn(Get $get) => $get('seasonmode') == 'halfyear' || $get('season_or_date') == 'date' || $get('similar_past_matches') != 'none') ->prefixIcon('phosphor-calendar-star-fill') - ->options(function (Get $get) { - return LoadSeasons::load($get('seasonmode')); - }) + ->options([ + '2026' => '2026', + '2025' => '2025', + '2024' => '2024', + ]) + // ->options(function (Get $get) { + // return LoadSeasons::load($get('seasonmode')); + // }) ->afterStateUpdated(function (callable $set) { $set('ss_player_id', null); }), + /************************ + * SEASON halftime + ************************/ + Select::make('season') + ->live() + ->columns(2) + ->hiddenLabel() + ->multiple() + ->placeholder('Current Season') + ->prefixIconColor('success') + // ->prefixIconColor(fn(Get $get): string => $get('season') ? 'success' : 'primary') + ->hidden(fn(Get $get) => $get('seasonmode') == 'fullyear' || $get('season_or_date') == 'date' || $get('similar_past_matches') != 'none') + ->prefixIcon('phosphor-calendar-star-fill') + ->options([ + '26/27' => '26/27', + '25/26' => '25/26', + '24/25' => '24/25', + ]) + // ->options(function (Get $get) { + // return LoadSeasons::load($get('seasonmode')); + // }) + ->afterStateUpdated(function (callable $set) { + $set('ss_player_id', null); + }), + /************************ + * DATE PICKER + ************************/ DatePicker::make('start_date') ->live() ->hiddenLabel()