This commit is contained in:
salam committed 2026-06-25 16:07:21 +02:00
1 parent c4ef7514e3
commit e9823b1a68
1 file changed
+4 -3
+4 -3
View File
@@ -245,7 +245,7 @@ class Statistic extends BaseDashboard
->placeholder('Time on field') ->placeholder('Time on field')
->prefixIcon('phosphor-watch') ->prefixIcon('phosphor-watch')
->default('all') ->default('all')
->hidden(fn(Get $get) => ! $get('tm_player_id') or $get('similar_past_matches') != 'none') ->hidden(fn(Get $get) => ! $get('tm_player_id'))
->prefixIconColor(fn(Get $get): string => ($get('tm_player_id') and $get('similar_past_matches') == 'none') ? 'primary' : '') ->prefixIconColor(fn(Get $get): string => ($get('tm_player_id') and $get('similar_past_matches') == 'none') ? 'primary' : '')
->selectablePlaceholder(false) ->selectablePlaceholder(false)
->options([ ->options([
@@ -279,10 +279,12 @@ class Statistic extends BaseDashboard
]), ]),
]), ]),
Select::make('season') Select::make('season')
->live()
->columns(2) ->columns(2)
->hiddenLabel() ->hiddenLabel()
->multiple() ->multiple()
->placeholder('Season') ->placeholder('Season')
->prefixIconColor(fn(Get $get): string => $get('season') ? 'success' : 'danger')
->hidden(fn(Get $get) => $get('season_or_date') == 'date') ->hidden(fn(Get $get) => $get('season_or_date') == 'date')
->prefixIcon('phosphor-calendar-star') ->prefixIcon('phosphor-calendar-star')
->prefixIconColor('primary') ->prefixIconColor('primary')
@@ -293,8 +295,7 @@ class Statistic extends BaseDashboard
->afterStateUpdated(function (callable $set) { ->afterStateUpdated(function (callable $set) {
// $set('team_id', null); // $set('team_id', null);
$set('tm_player_id', null); $set('tm_player_id', null);
}) }),
->live(),
DatePicker::make('start_date') DatePicker::make('start_date')
->hiddenLabel() ->hiddenLabel()
->hidden(fn(Get $get) => $get('season_or_date') == 'season') ->hidden(fn(Get $get) => $get('season_or_date') == 'season')