diff --git a/app/Filament/Pages/PlayerProps.php b/app/Filament/Pages/PlayerProps.php index f1897c21..78ee27cb 100644 --- a/app/Filament/Pages/PlayerProps.php +++ b/app/Filament/Pages/PlayerProps.php @@ -414,7 +414,7 @@ class PlayerProps extends Page implements HasForms if ($this->season_mode == 'halfyear') { return ['26/27' => '26/27', '25/26' => '25/26', '24/25' => '24/25']; } else { - return ['2026' => '2026', '2025' => '2025', '2024' => '2024']; + return [2026 => 2026, 2025 => 2025, 2024 => 2024]; } }) ->afterStateUpdated(function (callable $set, $state) { diff --git a/app/Traits/PlayerProps/PlayerAspg.php b/app/Traits/PlayerProps/PlayerAspg.php index a879c576..c6961beb 100644 --- a/app/Traits/PlayerProps/PlayerAspg.php +++ b/app/Traits/PlayerProps/PlayerAspg.php @@ -4,7 +4,6 @@ namespace App\Traits\PlayerProps; use App\Models\StatisticFixtures; use App\Models\StatistikoDetail; -use Illuminate\Support\Facades\Log; trait PlayerAspg { @@ -63,14 +62,10 @@ trait PlayerAspg $collection_2 = $this->loadPartsPlayer(2, $players); - // dd($collection_1, $collection_2); - $filtered_part_1 = $this->filterPlayer($collection_1); $filtered_part_2 = $this->filterPlayer($collection_2); - // Log::debug('calculationVariables', [$filtered_part_1, $filtered_part_2]); - $this->mergeData($filtered_part_1, $filtered_part_2); $this->dispatch('update-players', players: $this->players); diff --git a/app/Traits/PlayerProps/PlayerQuery.php b/app/Traits/PlayerProps/PlayerQuery.php index 3717f7f3..98fced7b 100644 --- a/app/Traits/PlayerProps/PlayerQuery.php +++ b/app/Traits/PlayerProps/PlayerQuery.php @@ -5,9 +5,6 @@ namespace App\Traits\PlayerProps; use App\Models\StatistikoDetail; use App\Models\StatistikoPlayer; use Illuminate\Support\Carbon; -use Illuminate\Support\Facades\Log; - -// use Illuminate\Support\Facades\Log; trait PlayerQuery { @@ -27,6 +24,7 @@ trait PlayerQuery $arr = []; $res = $this->getPlayers($part, $player_ids); + foreach ($res as $val) { $ss_player_id = (int) $val->ss_player_id; $activeteam_id = (int) $val->activeteam_id; @@ -69,6 +67,8 @@ trait PlayerQuery } } + // Log::debug('loadPartsPlayer '.$part, $arr); + return $arr; } @@ -179,18 +179,15 @@ trait PlayerQuery { switch ($this->season_or_date) { case 'season': + if (! $this->season_selected) { $this->season_selected = $this->getCurrentSeason(); } - if ($this->season_mode == 'halftime') { - $this->season_selected = array_map('strval', $this->season_selected); - } else { + if ($this->season_mode == 'fullyear') { $this->season_selected = array_map('intval', $this->season_selected); } - // Log::debug('season_selected',[$this->season_selected]); - return match ($part) { 1 => StatistikoPlayer::with('details') ->whereIn('ss_player_id', $player_ids)