This commit is contained in:
salam committed 2026-08-29 12:45:37 +02:00
1 parent ef8ade1814
commit 8f6beac89b
4 files changed
+6 -11

No files matched your search

-7
View File
@@ -43,11 +43,6 @@ class Statistic extends BaseDashboard
'xl' => 3,
];
public function getActiveTab()
{
return $this->activeTab;
}
public function getHeading(): string|Htmlable|null
{
return '';
@@ -67,14 +62,12 @@ class Statistic extends BaseDashboard
// '3' => 'Basketball',
// '2' => 'Ice Hockey',
// '5' => 'Tennis',
// '27' => 'Horse Racing',
// ])
// ->icons([
// '1' => 'icon-soccerball',
// '3' => 'icon-basketball',
// '2' => 'icon-icehockey',
// '5' => 'icon-tennisball',
// '27' => 'icon-horseracing',
// ]),
Grid::make([
'default' => 1,
@@ -56,7 +56,7 @@ class LoadPlayerPerformance
$tmp = [];
foreach ($matches_played as $value) {
$val = $value->playerrating_value;
$key = round($value->event->starttime->diffInDays(Carbon::now()));
$key = $value->event ? round($value->event->starttime->diffInDays(Carbon::now())) : 0;
$tmp["$key"] = $val;
}
+3 -3
View File
@@ -153,7 +153,7 @@ class StatsMedianAverage extends StatsOverviewWidget
$boxes[] = Stat::make('Total', self::template_box2($total_home))
->description(fn() => new HtmlString($date_events))
->extraAttributes([
'x-init' => "console.log('number-of-events'); animate('number-of-events', $total_home);",
'x-init' => "animate('number-of-events', $total_home);",
'class' => 'box-info',
]);
@@ -177,7 +177,7 @@ class StatsMedianAverage extends StatsOverviewWidget
$boxes[] = Stat::make($statistic_type, self::template_box1($expectations_home, $expectations_away))
->description('Expected Values')
->extraAttributes([
'x-init' => "console.log('expectations_home, expectations_away'); animate('expectations_home', $expectations_home); animate('expectations_away', $expectations_away)",
'x-init' => "animate('expectations_home', $expectations_home); animate('expectations_away', $expectations_away)",
'class' => 'box-yellow',
]);
@@ -187,7 +187,7 @@ class StatsMedianAverage extends StatsOverviewWidget
$boxes[] = Stat::make('Total', self::template_box2($total_home))
->description(fn() => new HtmlString($date_events))
->extraAttributes([
'x-init' => "console.log('number-of-events'); animate('number-of-events', $total_home);",
'x-init' => "animate('number-of-events', $total_home);",
'class' => 'box-info',
]);
@@ -47,6 +47,7 @@
@livewire(\App\Filament\Widgets\ChartEventPerfMoAv::class, ['filters' => $this->filters])
</div>
@if ($player_name)
<div x-show="activeTab === 'tab3'" x-cloak class="grid grid-cols-1 md:grid-cols-2 gap-4">
@livewire(\App\Filament\Widgets\ChartPlayer::class, ['filters' => $this->filters])
@livewire(\App\Filament\Widgets\ChartPlayerMoAv::class, ['filters' => $this->filters])
@@ -56,6 +57,7 @@
@livewire(\App\Filament\Widgets\ChartPlayerPerf::class, ['filters' => $this->filters])
@livewire(\App\Filament\Widgets\ChartPlayerPerfMoAv::class, ['filters' => $this->filters])
</div>
@endif
</div>
</div>
</x-filament-panels::page>