From dacef6fff04908cb95c7e7e95e15f6926515ad65 Mon Sep 17 00:00:00 2001 From: salam Date: Wed, 27 May 2026 11:31:59 +0200 Subject: [PATCH] wip --- app/Filament/Pages/Statistic.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/Filament/Pages/Statistic.php b/app/Filament/Pages/Statistic.php index 1b3ac4fc..7ab57dfb 100644 --- a/app/Filament/Pages/Statistic.php +++ b/app/Filament/Pages/Statistic.php @@ -126,6 +126,7 @@ class Statistic extends BaseDashboard ), DatePicker::make('end_date') ->native(false) + ->prefixIconColor('primary') ->prefixIcon('phosphor-calendar') ->live() ->suffixAction( @@ -140,6 +141,7 @@ class Statistic extends BaseDashboard 'xl' => 2, ]) ->prefixIconColor('primary') + ->prefixIconColor('primary') ->prefixIcon('phosphor-dots-three-outline') ->default('none') ->selectablePlaceholder(false) @@ -153,6 +155,7 @@ class Statistic extends BaseDashboard 'tsh' => 'Total shots', ]), Select::make('similar_past_matches') + ->prefixIconColor('primary') ->prefixIcon('phosphor-approximate-equals') ->suffixAction( Action::make('iconInfo') @@ -181,6 +184,8 @@ class Statistic extends BaseDashboard ->live(), 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') ->prefixIcon('icon-player') ->suffixAction( Action::make('copyCostToPrice') @@ -192,7 +197,6 @@ class Statistic extends BaseDashboard ->icon('phosphor-x'), ) ->preload() - // ->searchable() ->options(function (Get $get) { return StatistikoDetail::where('txodds_id', $get('team_id'))->pluck('name', 'tm_player_id'); }) @@ -201,7 +205,8 @@ class Statistic extends BaseDashboard ->label('Time on field') ->prefixIcon('phosphor-watch') ->default('all') - ->disabled(fn (Get $get) => ! $get('tm_player_id')) + ->disabled(fn (Get $get) => ! $get('tm_player_id') or $get('similar_past_matches') != 'none') + ->prefixIconColor(fn (Get $get): string => ($get('tm_player_id') and $get('similar_past_matches') == 'none') ? 'primary' : '') ->selectablePlaceholder(false) ->options([ 'all' => 'All',