From d7d4ab9ea175f8a74795a196352aa26237c12ed9 Mon Sep 17 00:00:00 2001 From: salam Date: Fri, 22 May 2026 07:42:29 +0200 Subject: [PATCH] wip filter statstik --- app/Filament/Pages/Statistic.php | 42 ++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/app/Filament/Pages/Statistic.php b/app/Filament/Pages/Statistic.php index 1737d408..bf73be57 100644 --- a/app/Filament/Pages/Statistic.php +++ b/app/Filament/Pages/Statistic.php @@ -16,7 +16,7 @@ use Filament\Forms\Components\Select; use Filament\Forms\Components\Slider; use Filament\Pages\Dashboard as BaseDashboard; use Filament\Pages\Dashboard\Concerns\HasFiltersForm; -use Filament\Schemas\Components\Section; +use Filament\Schemas\Components\Grid; use Filament\Schemas\Components\Utilities\Get; use Filament\Schemas\Components\Utilities\Set; use Filament\Schemas\Schema; @@ -40,9 +40,7 @@ class Statistic extends BaseDashboard { return $schema ->components([ - Section::make() - ->compact() - ->collapsible() + Grid::make() ->schema([ Select::make('league_id') ->prefixIcon('phosphor-trophy') @@ -97,9 +95,7 @@ class Statistic extends BaseDashboard ), ])->columns(4) ->columnSpanFull(), - Section::make() - ->compact() - ->collapsible() + Grid::make() ->schema([ Select::make('tm_player_id') ->label('Player') @@ -148,15 +144,31 @@ class Statistic extends BaseDashboard 'league' => 'League', 'all' => 'All Database', ]), - Slider::make('accuracy') + Select::make('accuracy') ->disabled(fn (Get $get) => $get('similar_past_matches') == 'none') - ->fillTrack() - ->default(5) - ->step(0.1) - ->decimalPlaces(1) - ->tooltips() - ->range(minValue: 0, maxValue: 1) - ->pips(), + ->default(0.5) + ->options([ + '0.1' => '0.1', + '0.2' => '0.2', + '0.3' => '0.3', + '0.4' => '0.4', + '0.5' => '0.5', + '0.6' => '0.6', + '0.7' => '0.7', + '0.8' => '0.8', + '0.9' => '0.9', + '1' => '1.0', + ]) + ->native(false), + // Slider::make('accuracy') + // ->disabled(fn (Get $get) => $get('similar_past_matches') == 'none') + // ->fillTrack() + // ->default(5) + // ->step(0.1) + // ->decimalPlaces(1) + // ->tooltips() + // ->range(minValue: 0, maxValue: 1) + // ->pips(), ])->columns(5) ->columnSpanFull(),