wip
This commit is contained in:
1 parent
332bdc9985
commit
3627a78989
2 files changed
+54
-52
No files matched your search
@@ -105,6 +105,8 @@ class StatsMedianAverage extends StatsOverviewWidget
|
||||
$average_league_home = 0;
|
||||
$average_league_away = 0;
|
||||
|
||||
// Log::debug($data);
|
||||
|
||||
foreach ($data['datasets'] as $value) {
|
||||
if ($value['label'] == 'Average Team') {
|
||||
$average_team_home = $value['average_team_home'] ?? 0;
|
||||
@@ -121,16 +123,16 @@ class StatsMedianAverage extends StatsOverviewWidget
|
||||
$boxes = [];
|
||||
// BOX 1
|
||||
$boxes[] = Stat::make('Number', new HtmlString('<div id="number-of-events">' . $total_home . '</div>'))
|
||||
->description('Events')
|
||||
->extraAttributes(['x-init' => "animate('number-of-events', $total_home, 0)"]);
|
||||
->description('Events');
|
||||
// ->extraAttributes(['x-init' => "animate('number-of-events', $total_home, 0)"]);
|
||||
|
||||
// BOX 2
|
||||
Log::debug([$home_team, $value_home]);
|
||||
$boxes[] = Stat::make('Average ' . $statistic_type, self::template('avhome', 'avaway', $home_team, $away_team, $value_home, $value_away))
|
||||
->description('Team ' . $team_position);
|
||||
// ->extraAttributes(['x-init' => "animate('avhome', $value_home); animate('avaway', $value_away)"]);
|
||||
|
||||
// BOX 3
|
||||
// Log::debug([$average_team_home, $average_team_away]);
|
||||
$boxes[] = Stat::make('Average ' . $statistic_type, self::template('av_team_home', 'av_team_away', $home_team, $away_team, $average_team_home, $average_team_away))
|
||||
->description('Team Season');
|
||||
// ->extraAttributes(['x-init' => "animate('av_team_home', $average_team_home); animate('av_team_away', $average_team_away)"]);
|
||||
@@ -142,15 +144,15 @@ class StatsMedianAverage extends StatsOverviewWidget
|
||||
|
||||
// BOX 5
|
||||
$boxes[] = Stat::make('Odds', self::templateOdds($data, $win, $draw, $lost))
|
||||
->description($team_position)
|
||||
->extraAttributes(['x-init' => "animate('mehome', $median_home); animate('meaway', $median_away, 0)"]);
|
||||
->description($team_position);
|
||||
// ->extraAttributes(['x-init' => "animate('mehome', $median_home); animate('meaway', $median_away, 0)"]);
|
||||
|
||||
$this->columns = [
|
||||
'default' => 1,
|
||||
'sm' => 2,
|
||||
'md' => 3,
|
||||
'lg' => 4,
|
||||
'xl' => $max_boxes,
|
||||
'xl' => 5,
|
||||
];
|
||||
|
||||
return $boxes;
|
||||
|
||||
Reference in new issue
Block a user