From e94802334d8ed39c5e2206fc3b86783155b43464 Mon Sep 17 00:00:00 2001 From: salam Date: Thu, 18 Jun 2026 18:46:45 +0200 Subject: [PATCH] wip --- app/Actions/Selections/LoadPlayer.php | 7 ++++++- app/Filament/Pages/Statistic.php | 2 -- resources/css/filament/admin/theme.css | 3 ++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/Actions/Selections/LoadPlayer.php b/app/Actions/Selections/LoadPlayer.php index b807e6f1..8cb8218e 100644 --- a/app/Actions/Selections/LoadPlayer.php +++ b/app/Actions/Selections/LoadPlayer.php @@ -36,6 +36,11 @@ class LoadPlayer $counting[$tm_player_id]++; } } + + if (! $counting) { + return []; + } + $colorlevel = round(max($counting)/3); $arr = []; @@ -43,7 +48,7 @@ class LoadPlayer $tm_player_id = $val->tm_player_id; $matches_played = isset($counting[$tm_player_id]) ? $counting[$tm_player_id] : 0; if($matches_played < $colorlevel){ - $arr[$val->position][$val->tm_player_id] = ''.$val->name.' ('.$matches_played.')'; + $arr[$val->position][$val->tm_player_id] = ''.$val->name.' ('.$matches_played.')'; } else if($matches_played < $colorlevel*2){ $arr[$val->position][$val->tm_player_id] = ''.$val->name.' ('.$matches_played.')'; diff --git a/app/Filament/Pages/Statistic.php b/app/Filament/Pages/Statistic.php index 154d3c83..cf0d056e 100644 --- a/app/Filament/Pages/Statistic.php +++ b/app/Filament/Pages/Statistic.php @@ -8,7 +8,6 @@ use App\Actions\Selections\LoadPlayer; use App\Actions\Selections\LoadSeasons; use App\Models\Element; use App\Models\StatisticFixtures; -use App\Models\StatistikoDetail; use BackedEnum; use Filament\Actions\Action; use Filament\Forms\Components\DatePicker; @@ -288,7 +287,6 @@ class Statistic extends BaseDashboard ->columnSpan([ 'default' => 1, 'sm' => 2, - 'md' => 3, ]) ->inline() ->live() diff --git a/resources/css/filament/admin/theme.css b/resources/css/filament/admin/theme.css index 3b3c9e07..4fcda879 100644 --- a/resources/css/filament/admin/theme.css +++ b/resources/css/filament/admin/theme.css @@ -84,9 +84,10 @@ button[wire\:click="resetTableFiltersForm"] { } .fi-fo-radio-label { - @apply p-2 border border-gray-200 shadow rounded-md cursor-pointer has-checked:bg-blue-50 has-checked:text-blue-900 dark:has-checked:bg-blue-950 dark:has-checked:text-blue-200 + @apply p-2 border border-slate-200 dark dark:border-slate-600 shadow rounded-md cursor-pointer has-checked: bg-blue-50 has-checked:text-blue-900 dark:has-checked:bg-blue-950 dark:has-checked:text-blue-200 } + .fi-sc-component .fi-wi-stats-overview-stat { @apply bg-green-50 dark:bg-green-900 border border-green-300 dark:border-green-700 }