From c143dcf727efcb4d888202e66c628dc960f8c0d5 Mon Sep 17 00:00:00 2001 From: salam Date: Mon, 27 Jul 2026 19:11:09 +0200 Subject: [PATCH] wip --- app/Filament/Widgets/Data/LoadEvents.php | 11 +++++++---- app/Filament/Widgets/StatsMedianAverage.php | 5 +---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/Filament/Widgets/Data/LoadEvents.php b/app/Filament/Widgets/Data/LoadEvents.php index fea5fd7f..f868401d 100644 --- a/app/Filament/Widgets/Data/LoadEvents.php +++ b/app/Filament/Widgets/Data/LoadEvents.php @@ -111,10 +111,9 @@ class LoadEvents } })->pluck('match_id')->toArray(); - $matches_played = StatistikoPlayer::query() ->whereIn('match_id', $matches_season) - ->where('tm_player_id', '=', (int) $tm_player_id) + ->where('tm_player_id', $tm_player_id) ->when($player_on_field, function ($query) use ($player_on_field) { // 'all' => 'All', // 'lineup' => 'Lineup', @@ -133,7 +132,6 @@ class LoadEvents }) ->pluck('match_id')->toArray(); - $description = ' with ' . StatistikoDetail::where('tm_player_id', (int) $tm_player_id)->value('name') . ' (' . \count($matches_played) . ')'; if (! $matches_played) { @@ -257,7 +255,6 @@ class LoadEvents break; } } else { - if ($team_position == 'home') { switch ($value['result_code']) { case '1': @@ -354,6 +351,9 @@ class LoadEvents break; } } else { + + // dd($team_id, $value['home_id'], $value['away_id']); + switch ($value['result_code']) { case '1': if ($team_id == $value['home_id']) { @@ -532,6 +532,9 @@ class LoadEvents ]; } + // Log::debug($results); + + /** * LEAGUE AVERAGES */ diff --git a/app/Filament/Widgets/StatsMedianAverage.php b/app/Filament/Widgets/StatsMedianAverage.php index b9f27a94..e30a8178 100644 --- a/app/Filament/Widgets/StatsMedianAverage.php +++ b/app/Filament/Widgets/StatsMedianAverage.php @@ -35,7 +35,7 @@ class StatsMedianAverage extends StatsOverviewWidget { $data = LoadEvents::load($this->filters, false); - // Log::debug($this->filters, $data); + // Log::debug($data['datasets']); $team_position = HelperTeamPosition::get($this->filters); @@ -43,9 +43,6 @@ class StatsMedianAverage extends StatsOverviewWidget return []; } - $arr_home = []; - $arr_away = []; - $statistic_type = HelperStatisticType::get($this->filters); if (! isset($data['datasets'][0])) {