From 0c0192bb8bbcba5ea82b166f376fdc1aa51218a5 Mon Sep 17 00:00:00 2001 From: salam Date: Sat, 23 May 2026 14:57:56 +0200 Subject: [PATCH] wip --- app/Filament/Widgets/ChartPunctualEvent.php | 4 +++- app/Filament/Widgets/Data/LoadEvents.php | 12 +++--------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/app/Filament/Widgets/ChartPunctualEvent.php b/app/Filament/Widgets/ChartPunctualEvent.php index bf8bc14b..7d0d7287 100644 --- a/app/Filament/Widgets/ChartPunctualEvent.php +++ b/app/Filament/Widgets/ChartPunctualEvent.php @@ -30,7 +30,9 @@ class ChartPunctualEvent extends ChartWidget $data = LoadEvents::load($this->filters); - $this->description = 'Punctual '.$data['description']; + if (isset($data['description'])) { + $this->description = 'Punctual '.$data['description']; + } return $data; } diff --git a/app/Filament/Widgets/Data/LoadEvents.php b/app/Filament/Widgets/Data/LoadEvents.php index 3137d379..20dcb98b 100644 --- a/app/Filament/Widgets/Data/LoadEvents.php +++ b/app/Filament/Widgets/Data/LoadEvents.php @@ -27,8 +27,6 @@ class LoadEvents $end = $filter['end_date'] ?? 0; - $similar_past_matches = $filter['similar_past_matches'] ?? 0; - $statistic_type = $filter['statistic_type'] ?? 0; $team_position = $filter['team_position']; @@ -46,14 +44,14 @@ class LoadEvents /** * IF WITH PLAYER */ + $matches_played = 0; + $description = ''; if ($tm_player_id) { $matches_played = StatistikoPlayer::where('tm_player_id', (int) $tm_player_id)->pluck('match_id')->toArray(); $description = ' (with '.StatistikoDetail::where('tm_player_id', (int) $tm_player_id)->value('name').')'; - - } else { - $matches_played = 0; } + /** * STATTISTIC DATA */ @@ -207,10 +205,6 @@ class LoadEvents 'fill' => true, 'tension' => 0.5, 'borderColor' => '#36A2EB', - 'datalabels' => [ - 'align' => 'start', - 'anchor' => 'start', - ], ], ], 'labels' => $labels,