diff --git a/app/Filament/Imports/Helper/ImportEvents.php b/app/Filament/Imports/Helper/ImportEvents.php index 0b8fc5c0..f168bab4 100644 --- a/app/Filament/Imports/Helper/ImportEvents.php +++ b/app/Filament/Imports/Helper/ImportEvents.php @@ -22,6 +22,8 @@ class ImportEvents $row = array_values($row); + dd($row); + /* 0 => 14082828 1 => 1 diff --git a/app/Filament/Pages/Statistic.php b/app/Filament/Pages/Statistic.php index b17419fc..1eb9e77d 100644 --- a/app/Filament/Pages/Statistic.php +++ b/app/Filament/Pages/Statistic.php @@ -50,6 +50,19 @@ class Statistic extends BaseDashboard return ''; } + protected function getHeaderActions(): array + { + return [ + Action::make('collapseAll') + ->label('Collapse All Charts') + ->icon('heroicon-m-chevron-up') + ->color('gray') + ->action(function ($record, $livewire) { + $livewire->dispatch('collapse-all-charts'); + }), + ]; + } + public function filtersForm(Schema $schema): Schema { return $schema @@ -238,18 +251,6 @@ class Statistic extends BaseDashboard ]; } - protected function getHeaderWidgets(): array - { - return [ - // Events - // ChartEvent::make(), - // ChartEventMoAv::make(), - // Players - // ChartPlayer::make(), - // ChartPlayerMoAv::make(), - ]; - } - protected function getFooterWidgets(): array { return [ @@ -263,8 +264,8 @@ class Statistic extends BaseDashboard // Players ChartPlayer::make(), ChartPlayerMoAv::make(), - // ChartPlayerPerf::make(), - // ChartPlayerPerfMoAv::make(), + ChartPlayerPerf::make(), + ChartPlayerPerfMoAv::make(), ]; } diff --git a/app/Filament/Widgets/ChartEvent.php b/app/Filament/Widgets/ChartEvent.php index 8ea1dd86..500195af 100644 --- a/app/Filament/Widgets/ChartEvent.php +++ b/app/Filament/Widgets/ChartEvent.php @@ -12,6 +12,8 @@ class ChartEvent extends ChartWidget { use InteractsWithPageFilters; + // protected string $view = 'filament.widgets.custom-chart-widget'; + protected ?string $heading = 'Events'; protected ?string $pollingInterval = null; diff --git a/composer.lock b/composer.lock index 11fc6849..26cc49ae 100644 --- a/composer.lock +++ b/composer.lock @@ -2406,16 +2406,16 @@ }, { "name": "guzzlehttp/psr7", - "version": "2.10.3", + "version": "2.10.4", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "7c1472269227dc6f18930bd903d7a88fe6c52130" + "reference": "d2a1a094e396da8957e797489fddaf860c340cfc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/7c1472269227dc6f18930bd903d7a88fe6c52130", - "reference": "7c1472269227dc6f18930bd903d7a88fe6c52130", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/d2a1a094e396da8957e797489fddaf860c340cfc", + "reference": "d2a1a094e396da8957e797489fddaf860c340cfc", "shasum": "" }, "require": { @@ -2503,7 +2503,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.10.3" + "source": "https://github.com/guzzle/psr7/tree/2.10.4" }, "funding": [ { @@ -2519,7 +2519,7 @@ "type": "tidelift" } ], - "time": "2026-05-27T11:48:20+00:00" + "time": "2026-05-29T12:59:07+00:00" }, { "name": "guzzlehttp/uri-template", @@ -2893,16 +2893,16 @@ }, { "name": "kirschbaum-development/eloquent-power-joins", - "version": "4.3.1", + "version": "4.3.2", "source": { "type": "git", "url": "https://github.com/kirschbaum-development/eloquent-power-joins.git", - "reference": "3f77b096c1e8b5aa1fc40d7080e55e795f3430ae" + "reference": "33c189bd51a510c1ceba67222395ead08a29863a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/kirschbaum-development/eloquent-power-joins/zipball/3f77b096c1e8b5aa1fc40d7080e55e795f3430ae", - "reference": "3f77b096c1e8b5aa1fc40d7080e55e795f3430ae", + "url": "https://api.github.com/repos/kirschbaum-development/eloquent-power-joins/zipball/33c189bd51a510c1ceba67222395ead08a29863a", + "reference": "33c189bd51a510c1ceba67222395ead08a29863a", "shasum": "" }, "require": { @@ -2950,9 +2950,9 @@ ], "support": { "issues": "https://github.com/kirschbaum-development/eloquent-power-joins/issues", - "source": "https://github.com/kirschbaum-development/eloquent-power-joins/tree/4.3.1" + "source": "https://github.com/kirschbaum-development/eloquent-power-joins/tree/4.3.2" }, - "time": "2026-03-29T12:05:03+00:00" + "time": "2026-05-28T20:35:55+00:00" }, { "name": "laravel/framework", @@ -11748,11 +11748,11 @@ }, { "name": "phpstan/phpstan", - "version": "2.1.56", + "version": "2.2.1", "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/93a603c9fc3be8c3c93bbc8d22170ad766685537", - "reference": "93a603c9fc3be8c3c93bbc8d22170ad766685537", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/dea9c8f2d25cc849391042b71e429c1a4bf82660", + "reference": "dea9c8f2d25cc849391042b71e429c1a4bf82660", "shasum": "" }, "require": { @@ -11775,6 +11775,17 @@ "license": [ "MIT" ], + "authors": [ + { + "name": "Ondřej Mirtes" + }, + { + "name": "Markus Staab" + }, + { + "name": "Vincent Langlet" + } + ], "description": "PHPStan - PHP Static Analysis Tool", "keywords": [ "dev", @@ -11797,7 +11808,7 @@ "type": "github" } ], - "time": "2026-05-26T17:04:57+00:00" + "time": "2026-05-28T14:44:12+00:00" }, { "name": "phpunit/php-code-coverage", diff --git a/resources/views/filament/widgets/custom-chart-widget.blade.php b/resources/views/filament/widgets/custom-chart-widget.blade.php new file mode 100644 index 00000000..e8d0fa52 --- /dev/null +++ b/resources/views/filament/widgets/custom-chart-widget.blade.php @@ -0,0 +1,76 @@ +@php + use Filament\Widgets\View\Components\ChartWidgetComponent; + use Illuminate\View\ComponentAttributeBag; + + $color = $this->getColor(); + $heading = $this->getHeading(); + $description = $this->getDescription(); + $filters = $this->getFilters(); + $isCollapsible = $this->isCollapsible(); + $type = $this->getType(); + $maxHeight = $this->getMaxHeight(); + $hasMaxHeight = filled($maxHeight) && $maxHeight !== '100%'; +@endphp + +{{-- --}} +{{-- :collapsible="$this->isCollapsible()" x-bind:collapsed="isCollapsed" --}} + + + @if ($filters || method_exists($this, 'getFiltersSchema')) + + @if ($filters) + + + @foreach ($filters as $value => $label) + + @endforeach + + + @endif + + @if (method_exists($this, 'getFiltersSchema')) + + + {{ $this->getFiltersTriggerAction() }} + + +
+ {{ $this->getFiltersSchema() }} + + @if (method_exists($this, 'hasDeferredFilters') && $this->hasDeferredFilters()) +
+ {{ $this->getFiltersApplyAction() }} + + {{ $this->getFiltersResetAction() }} +
+ @endif +
+
+ @endif +
+ @endif + +
getPollingInterval()) wire:poll.{{ $pollingInterval }}="updateChartData" @endif> +
color(ChartWidgetComponent::class, $color)->class(['fi-wi-chart-canvas-ctn', 'fi-wi-chart-canvas-ctn-no-aspect-ratio' => $hasMaxHeight]) }}> + !$hasMaxHeight, "max-height: {$maxHeight}" => $hasMaxHeight])> + + + + + + + + +
+
+
+