This commit is contained in:
salam committed 2026-08-30 18:04:58 +02:00
1 parent 2a39d38a39
commit e194da5e88
2 files changed
+12 -4

No files matched your search

+10 -2
View File
@@ -202,8 +202,16 @@ class LoadEvents
} }
if (isset($val_home) && isset($val_away)) { if (isset($val_home) && isset($val_away)) {
$events[] = $value['home'].' vs '.$value['away']; $events[] = $value['home'].' vs '.$value['away'];
$dataset_home[] = $val_home;
$dataset_away[] = $val_away; if ($team_id == $value['home_id']) {
$dataset_home[] = (int) $value['val_home'];
$dataset_away[] = (int) $value['val_away'];
} elseif ($team_id == $value['away_id']) {
$dataset_home[] = (int) $value['val_away'];
$dataset_away[] = (int) $value['val_home'];
}
// $dataset_home[] = $val_home;
// $dataset_away[] = $val_away;
} }
} }
+2 -2
View File
@@ -194,10 +194,10 @@ class StatsMedianAverage extends StatsOverviewWidget
]); ]);
// BOX 3 // BOX 3
$boxes[] = Stat::make('Average '.$statistic_type, self::template_box3($home_team, $away_team, $value_away, $value_home)) $boxes[] = Stat::make('Average '.$statistic_type, self::template_box3($home_team, $away_team, $value_home, $value_away))
->description('Team '.$team_position) ->description('Team '.$team_position)
->extraAttributes([ ->extraAttributes([
'x-init' => "animate('average_home', $value_away); animate('average_away', $value_home)", 'x-init' => "animate('average_home', $value_home); animate('average_away', $value_away)",
'class' => 'box-success', 'class' => 'box-success',
]); ]);