diff --git a/app/Filament/Pages/Statistic.php b/app/Filament/Pages/Statistic.php index 5197bf84..38664cc0 100644 --- a/app/Filament/Pages/Statistic.php +++ b/app/Filament/Pages/Statistic.php @@ -83,8 +83,9 @@ class Statistic extends BaseDashboard ->live() ->label('Events'), Select::make('team_id') - ->prefixIconColor('primary') + ->prefixIconColor(fn (Get $get): string => $get('similar_past_matches') == 'none' ? 'primary' : '') ->prefixIcon('phosphor-users-three') + ->disabled(fn (Get $get) => $get('similar_past_matches') != 'none') ->options(function (Get $get) { if ($get('match_id')) { $res = StatisticFixtures::where('id', $get('match_id'))->get(); @@ -104,8 +105,9 @@ class Statistic extends BaseDashboard ->label('Team'), Select::make('team_position') - ->prefixIconColor('primary') + ->prefixIconColor(fn (Get $get): string => $get('similar_past_matches') == 'none' ? 'primary' : '') ->prefixIcon('phosphor-map-pin') + ->disabled(fn (Get $get) => $get('similar_past_matches') != 'none') ->default('all') ->selectablePlaceholder(false) ->options([ @@ -142,7 +144,6 @@ class Statistic extends BaseDashboard 'xl' => 2, ]) ->prefixIconColor('primary') - ->prefixIconColor('primary') ->prefixIcon('phosphor-dots-three-outline') ->default('none') ->selectablePlaceholder(false) @@ -190,7 +191,7 @@ class Statistic extends BaseDashboard Select::make('tm_player_id') ->label('Player') ->disabled(fn (Get $get) => $get('similar_past_matches') != 'none') - ->prefixIconColor(fn (Get $get): string => $get('similar_past_matches') == 'none' ? 'primary' : 'gray') + ->prefixIconColor(fn (Get $get): string => $get('similar_past_matches') == 'none' ? 'primary' : '') ->prefixIcon('icon-player') ->suffixAction( Action::make('copyCostToPrice')