diff --git a/app/Filament/Pages/Statistic.php b/app/Filament/Pages/Statistic.php index b7fa50f7..caf1c563 100644 --- a/app/Filament/Pages/Statistic.php +++ b/app/Filament/Pages/Statistic.php @@ -245,7 +245,7 @@ class Statistic extends BaseDashboard ->placeholder('Time on field') ->prefixIcon('phosphor-watch') ->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' : '') ->selectablePlaceholder(false) ->options([ @@ -279,10 +279,12 @@ class Statistic extends BaseDashboard ]), ]), Select::make('season') + ->live() ->columns(2) ->hiddenLabel() ->multiple() ->placeholder('Season') + ->prefixIconColor(fn(Get $get): string => $get('season') ? 'success' : 'danger') ->hidden(fn(Get $get) => $get('season_or_date') == 'date') ->prefixIcon('phosphor-calendar-star') ->prefixIconColor('primary') @@ -293,8 +295,7 @@ class Statistic extends BaseDashboard ->afterStateUpdated(function (callable $set) { // $set('team_id', null); $set('tm_player_id', null); - }) - ->live(), + }), DatePicker::make('start_date') ->hiddenLabel() ->hidden(fn(Get $get) => $get('season_or_date') == 'season')