From e6129fbdf62f69cda4b31b37910ff8c5952b01f7 Mon Sep 17 00:00:00 2001 From: salam Date: Sun, 14 Jun 2026 17:52:58 +0200 Subject: [PATCH] wip bug 7 --- BUGS.md | 4 ++-- .../Widgets/Data/HelperMoveingAveragePerformens.php | 6 +++--- app/Filament/Widgets/Data/LoadPerformance.php | 7 +------ 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/BUGS.md b/BUGS.md index 5819a798..0a968985 100644 --- a/BUGS.md +++ b/BUGS.md @@ -16,8 +16,8 @@ ## 3) RIEPILOGO DATI: sostituire HOME con IN FAVOUR e AWAY con AGAINST ## 4) CALCOLO SBAGLIATO di CARDS AWAY di qualsiasi squadra. Viene visualizzato sempre 0 ma i dati sono presenti nel DB ## 5) Aggiungere, nel caso l'operatore scelga di visualizzare i dati statistici GOALS a livello di EVENTS, anche il grafico relativo alle Aspettative Goals Fatte e Subite che possiamo denominare EG-In Favour e EG-Against -6) Aggiungere nel Grafico Performance anche i dati della partita (Data / Home / Away / Risultato) come per gli altri grafici -7) Il Grafico della Moving Average per Events Performance secondo me è sbagliato quindi probabilmnete c'è un errore nel calcolo della Moving Average +## 6) Aggiungere nel Grafico Performance anche i dati della partita (Data / Home / Away / Risultato) come per gli altri grafici +## 7) Il Grafico della Moving Average per Events Performance secondo me è sbagliato quindi probabilmnete c'è un errore nel calcolo della Moving Average 8) Nel Riepilogo in verde, quando si seleziona SIMILAR PAST MATCHES sono invertiti WIN con LOST 9) Nel Riepilogo in verde, quando si seleziona SIMILAR PAST MATCHES è opportuno sostituire Win con 1, Draw con X e Lost con 2 10) Nel Riepilogo in verde, quando si seleziona SIMILAR PAST MATCHES sono sbagliate le Average Goals diff --git a/app/Filament/Widgets/Data/HelperMoveingAveragePerformens.php b/app/Filament/Widgets/Data/HelperMoveingAveragePerformens.php index a40b2e79..71fa6a81 100644 --- a/app/Filament/Widgets/Data/HelperMoveingAveragePerformens.php +++ b/app/Filament/Widgets/Data/HelperMoveingAveragePerformens.php @@ -16,15 +16,15 @@ class HelperMoveingAveragePerformens foreach ($datasets as $k => $dataset) { $arr = $dataset['data']; - self::fillHoles($arr); + // dd($arr); $new = []; $last = count($arr); foreach ($arr as $key => $value) { if ($key == 1 && $last > 2) { - $new[] = round(($arr[0] + $value + $arr[2]) / 3, 1); + $new[] = round(($arr[0] + $value + $arr[2]) / 3, 2); } elseif ($key > 1 && $key < $last - 1) { - $new[] = round(($arr[$key - 1] + $value + $arr[$key + 1]) / 3, 1); + $new[] = round(($arr[$key - 1] + $value + $arr[$key + 1]) / 3, 2); } } $data['datasets'][$k]['data'] = $new; diff --git a/app/Filament/Widgets/Data/LoadPerformance.php b/app/Filament/Widgets/Data/LoadPerformance.php index 655f4790..9cfe6d06 100644 --- a/app/Filament/Widgets/Data/LoadPerformance.php +++ b/app/Filament/Widgets/Data/LoadPerformance.php @@ -31,6 +31,7 @@ class LoadPerformance } $match = StatisticFixtures::with('home')->with('away')->where('id', $match_id)->first(); + $home_id = $match->home_id; $away_id = $match->away_id; @@ -55,19 +56,13 @@ class LoadPerformance if ($val->home_id == $home_id or $val->away_id == $home_id) { $home_matches[] = $val->match_id; - } else { - $home_matches[] = null; } if ($val->home_id == $away_id or $val->away_id == $away_id) { $away_matches[] = $val->match_id; - } else { - $away_matches[] = null; } } } - // dd($away_matches); - $res = StatistikoPlayer::whereIn('match_id', $home_matches)->select('match_id', 'minutes_played', 'playerrating_value', 'player_position')->get(); $homes = self::filterMatches($res, $home_matches);