wip season

This commit is contained in:
salam committed 2026-08-31 07:40:24 +02:00
1 parent bfcb7230af
commit 713da3b266
1 file changed
+37 -5
+37 -5
View File
@@ -349,7 +349,7 @@ class Statistic extends BaseDashboard
]), ]),
/************************ /************************
* SEASON * SEASON fulltime
************************/ ************************/
Select::make('season') Select::make('season')
->live() ->live()
@@ -359,14 +359,46 @@ class Statistic extends BaseDashboard
->placeholder('Current Season') ->placeholder('Current Season')
->prefixIconColor('success') ->prefixIconColor('success')
// ->prefixIconColor(fn(Get $get): string => $get('season') ? 'success' : 'primary') // ->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') ->prefixIcon('phosphor-calendar-star-fill')
->options(function (Get $get) { ->options([
return LoadSeasons::load($get('seasonmode')); '2026' => '2026',
}) '2025' => '2025',
'2024' => '2024',
])
// ->options(function (Get $get) {
// return LoadSeasons::load($get('seasonmode'));
// })
->afterStateUpdated(function (callable $set) { ->afterStateUpdated(function (callable $set) {
$set('ss_player_id', null); $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') DatePicker::make('start_date')
->live() ->live()
->hiddenLabel() ->hiddenLabel()