diff --git a/app/Filament/Pages/Statistic.php b/app/Filament/Pages/Statistic.php index b600e26c..8f434130 100644 --- a/app/Filament/Pages/Statistic.php +++ b/app/Filament/Pages/Statistic.php @@ -624,6 +624,7 @@ class Statistic extends BaseDashboard ->hidden(fn (Get $get) => $get('season_or_date') == 'date' || $get('similar_past_matches') != 'none') ->prefixIcon('phosphor-calendar-star') ->options(function (Get $get) { + // dd($get('seasonmode')); if ($get('seasonmode') == 'halfyear') { return ['26/27' => '26/27', '25/26' => '25/26', '24/25' => '24/25']; } else { diff --git a/app/Filament/Widgets/Charts/LoadEvents/LoadEventsQuery.php b/app/Filament/Widgets/Charts/LoadEvents/LoadEventsQuery.php index c8edcbac..8472bf36 100644 --- a/app/Filament/Widgets/Charts/LoadEvents/LoadEventsQuery.php +++ b/app/Filament/Widgets/Charts/LoadEvents/LoadEventsQuery.php @@ -6,6 +6,7 @@ use App\Filament\Pages\Selections\Helper\GetSeason; use App\Models\SofaScoreRosa; use App\Models\StatistikoEvent; use App\Models\StatistikoPlayer; +use Illuminate\Support\Facades\Log; class LoadEventsQuery { @@ -94,6 +95,8 @@ class LoadEventsQuery * STATTISTIC DATA */ // dd($team_id, $home_id, $away_id); + Log::debug('res', [$team_id, $league_id, $season]); + $res = StatistikoEvent::where(function ($query) use ($league_id, $similar_past_matches) { switch ($similar_past_matches) { case 'none': diff --git a/app/Filament/Widgets/Charts/LoadPerformance.php b/app/Filament/Widgets/Charts/LoadPerformance.php index 7cda33c2..9b2a0333 100644 --- a/app/Filament/Widgets/Charts/LoadPerformance.php +++ b/app/Filament/Widgets/Charts/LoadPerformance.php @@ -530,11 +530,12 @@ class LoadPerformance } } - // dd($result); - $return = []; foreach ($matches as $matchid) { if (isset($result[$matchid])) { + if (! $result[$matchid]['all']['ply']) { + $result[$matchid]['all']['ply'] = 1; + } $return['all'][] = round($result[$matchid]['all']['rating'] / $result[$matchid]['all']['ply'], 1); if ($result[$matchid]['def']['sum_min']) { $return['def'][] = round($result[$matchid]['def']['rating'] / $result[$matchid]['def']['ply'], 1);