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

No files matched your search

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