wip
This commit is contained in:
1 parent
4ddf38cd62
commit
2e9a98a4e4
5 files changed
+122
-30
No files matched your search
@@ -22,6 +22,8 @@ class ImportEvents
|
||||
|
||||
$row = array_values($row);
|
||||
|
||||
dd($row);
|
||||
|
||||
/*
|
||||
0 => 14082828
|
||||
1 => 1
|
||||
|
||||
@@ -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(),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Generated
+27
-16
@@ -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",
|
||||
|
||||
@@ -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
|
||||
|
||||
{{-- <x-filament-widgets::widget x-data="{ isCollapsed: false }" x-on:collapse-all-charts.window="isCollapsed = true"> --}}
|
||||
{{-- :collapsible="$this->isCollapsible()" x-bind:collapsed="isCollapsed" --}}
|
||||
<x-filament-widgets::widget class="fi-wi-chart">
|
||||
<x-filament::section :description="$description" :heading="$heading" :collapsible="$isCollapsible">
|
||||
@if ($filters || method_exists($this, 'getFiltersSchema'))
|
||||
<x-slot name="afterHeader">
|
||||
@if ($filters)
|
||||
<x-filament::input.wrapper inline-prefix wire:target="filter" class="fi-wi-chart-filter">
|
||||
<x-filament::input.select inline-prefix wire:model.live="filter">
|
||||
@foreach ($filters as $value => $label)
|
||||
<option value="{{ $value }}">
|
||||
{{ $label }}
|
||||
</option>
|
||||
@endforeach
|
||||
</x-filament::input.select>
|
||||
</x-filament::input.wrapper>
|
||||
@endif
|
||||
|
||||
@if (method_exists($this, 'getFiltersSchema'))
|
||||
<x-filament::dropdown placement="bottom-end" shift width="xs" class="fi-wi-chart-filter">
|
||||
<x-slot name="trigger">
|
||||
{{ $this->getFiltersTriggerAction() }}
|
||||
</x-slot>
|
||||
|
||||
<div class="fi-wi-chart-filter-content">
|
||||
{{ $this->getFiltersSchema() }}
|
||||
|
||||
@if (method_exists($this, 'hasDeferredFilters') && $this->hasDeferredFilters())
|
||||
<div class="fi-wi-chart-filter-content-actions-ctn">
|
||||
{{ $this->getFiltersApplyAction() }}
|
||||
|
||||
{{ $this->getFiltersResetAction() }}
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</x-filament::dropdown>
|
||||
@endif
|
||||
</x-slot>
|
||||
@endif
|
||||
|
||||
<div @if ($pollingInterval = $this->getPollingInterval()) wire:poll.{{ $pollingInterval }}="updateChartData" @endif>
|
||||
<div x-load
|
||||
x-load-src="{{ \Filament\Support\Facades\FilamentAsset::getAlpineComponentSrc('chart', 'filament/widgets') }}"
|
||||
wire:ignore data-chart-type="{{ $type }}" x-data="chart({
|
||||
cachedData: @js($this->getCachedData()),
|
||||
options: @js($this->getOptions()),
|
||||
type: @js($type),
|
||||
})"
|
||||
{{ new ComponentAttributeBag()->color(ChartWidgetComponent::class, $color)->class(['fi-wi-chart-canvas-ctn', 'fi-wi-chart-canvas-ctn-no-aspect-ratio' => $hasMaxHeight]) }}>
|
||||
<canvas x-ref="canvas" @style(['width: 100%', 'height: 100%; max-height: 100%' => !$hasMaxHeight, "max-height: {$maxHeight}" => $hasMaxHeight])></canvas>
|
||||
|
||||
<span x-ref="backgroundColorElement" class="fi-wi-chart-bg-color"></span>
|
||||
|
||||
<span x-ref="borderColorElement" class="fi-wi-chart-border-color"></span>
|
||||
|
||||
<span x-ref="gridColorElement" class="fi-wi-chart-grid-color"></span>
|
||||
|
||||
<span x-ref="textColorElement" class="fi-wi-chart-text-color"></span>
|
||||
</div>
|
||||
</div>
|
||||
</x-filament::section>
|
||||
</x-filament-widgets::widget>
|
||||
Reference in new issue
Block a user