From a794f6a384dc89a2e9bb02c49ea8c758d92a4674 Mon Sep 17 00:00:00 2001 From: salam Date: Sun, 30 Aug 2026 17:17:44 +0200 Subject: [PATCH] wip --- app/Filament/Pages/Selections/Helper/GetSeason.php | 5 ++++- app/Filament/Pages/Selections/LoadPlayer.php | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/Filament/Pages/Selections/Helper/GetSeason.php b/app/Filament/Pages/Selections/Helper/GetSeason.php index 6a8c1488..0145efc1 100644 --- a/app/Filament/Pages/Selections/Helper/GetSeason.php +++ b/app/Filament/Pages/Selections/Helper/GetSeason.php @@ -8,7 +8,7 @@ class GetSeason { public static function load(array $season, int|null $sofascore_category_id) { - if (!$season) { + if (!is_array($season) || !count($season)) { if ($sofascore_category_id) { $season_mode = SofaScoreCategory::where('id', $sofascore_category_id)->value('season_mode'); if ($season_mode == 'halfyear') { @@ -17,6 +17,9 @@ class GetSeason else $season[] = date('y', strtotime('-1 year')) . '/' . date('y'); } + else { + $season[] = date('Y'); + } } } diff --git a/app/Filament/Pages/Selections/LoadPlayer.php b/app/Filament/Pages/Selections/LoadPlayer.php index 6ce4b866..63d2afc1 100644 --- a/app/Filament/Pages/Selections/LoadPlayer.php +++ b/app/Filament/Pages/Selections/LoadPlayer.php @@ -13,11 +13,9 @@ class LoadPlayer public static function load(Get $get) { $team_id = $get('team_id'); - $team_position = $get('team_position'); $sofascore_category_id = $get('sofascore_category_id'); $season = $get('season'); - $season = GetSeason::load($season, $sofascore_category_id); $matches = StatistikoEvent::whereIn('season', $season) @@ -33,6 +31,7 @@ class LoadPlayer } })->pluck('match_id')->toArray(); + $matches_count = count($matches); $positions_map = LoadPositions::load();