wip
This commit is contained in:
1 parent
08a1522868
commit
26052c6cfd
15 files changed
+594
-62
No files matched your search
@@ -23,8 +23,8 @@ use Filament\Schemas\Components\Grid;
|
||||
use Filament\Schemas\Components\Utilities\Get;
|
||||
use Filament\Schemas\Components\Utilities\Set;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Support\Enums\SlideOverPosition;
|
||||
use Filament\Support\Enums\Width;
|
||||
// use Filament\Support\Enums\SlideOverPosition;
|
||||
// use Filament\Support\Enums\Width;
|
||||
use Filament\Support\RawJs;
|
||||
use Illuminate\Contracts\Support\Htmlable;
|
||||
use Illuminate\Contracts\View\View;
|
||||
@@ -42,6 +42,8 @@ class Statistic extends BaseDashboard
|
||||
|
||||
protected static ?string $title = 'Statistiko';
|
||||
|
||||
protected static ?int $navigationSort = 1;
|
||||
|
||||
protected int|string|array $columnSpan = [
|
||||
'md' => 2,
|
||||
'xl' => 3,
|
||||
@@ -79,29 +81,29 @@ class Statistic extends BaseDashboard
|
||||
return '';
|
||||
}
|
||||
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
Action::make('esc')
|
||||
->label('Reset')
|
||||
->icon('phosphor-x-circle')
|
||||
->color('gray')
|
||||
->keyBindings(['esc'])
|
||||
->action('resetFilters'),
|
||||
Action::make('openDispatcherBoard')
|
||||
->modalHeading('')
|
||||
->label('Calculate')
|
||||
->icon('icon-player')
|
||||
->color(fn (): string => $this->filters['team_id'] ? 'primary' : 'gray')
|
||||
->disabled(fn (): string => $this->filters['team_id'] ? false : true)
|
||||
->slideOver()
|
||||
->slideOverPosition(SlideOverPosition::Start)
|
||||
->modalWidth(Width::Screen)
|
||||
->modalSubmitAction(false)
|
||||
->modalCancelAction(false)
|
||||
->modalContent(fn (): View => view('livewire.board-dispatcher-modal-wrapper', ['filters' => $this->filters])),
|
||||
];
|
||||
}
|
||||
// protected function getHeaderActions(): array
|
||||
// {
|
||||
// return [
|
||||
// Action::make('esc')
|
||||
// ->label('Reset')
|
||||
// ->icon('phosphor-x-circle')
|
||||
// ->color('gray')
|
||||
// ->keyBindings(['esc'])
|
||||
// ->action('resetFilters'),
|
||||
// Action::make('openDispatcherBoard')
|
||||
// ->modalHeading('')
|
||||
// ->label('Calculate')
|
||||
// ->icon('icon-player')
|
||||
// ->color(fn (): string => $this->filters['team_id'] ? 'primary' : 'gray')
|
||||
// ->disabled(fn (): string => $this->filters['team_id'] ? false : true)
|
||||
// ->slideOver()
|
||||
// ->slideOverPosition(SlideOverPosition::Start)
|
||||
// ->modalWidth(Width::Screen)
|
||||
// ->modalSubmitAction(false)
|
||||
// ->modalCancelAction(false)
|
||||
// ->modalContent(fn (): View => view('livewire.board-dispatcher-modal-wrapper', ['filters' => $this->filters])),
|
||||
// ];
|
||||
// }
|
||||
|
||||
public function filtersForm(Schema $schema): Schema
|
||||
{
|
||||
@@ -460,6 +462,13 @@ class Statistic extends BaseDashboard
|
||||
->color('gray')
|
||||
->action(fn (Set $set) => $set('end_date', null))
|
||||
),
|
||||
Action::make('esc')
|
||||
->hiddenLabel()
|
||||
->tooltip('Clear all (esc)')
|
||||
->icon('phosphor-x-circle')
|
||||
->color('gray')
|
||||
->keyBindings(['esc'])
|
||||
->action('resetFilters'),
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user