wip
This commit is contained in:
1 parent
6b1a68e738
commit
dd7617c86f
2 files changed
+65
-98
No files matched your search
@@ -17,6 +17,7 @@ use Filament\Forms\Components\Hidden;
|
||||
use Filament\Forms\Components\Radio;
|
||||
use Filament\Forms\Components\Select;
|
||||
use Filament\Forms\Components\Slider;
|
||||
use Filament\Forms\Components\ToggleButtons;
|
||||
use Filament\Pages\Dashboard as BaseDashboard;
|
||||
use Filament\Pages\Dashboard\Concerns\HasFiltersForm;
|
||||
use Filament\Schemas\Components\Grid;
|
||||
@@ -88,18 +89,49 @@ class Statistic extends BaseDashboard
|
||||
->keyBindings(['esc'])
|
||||
->action('resetFilters'),
|
||||
Action::make('calculator')
|
||||
// ->modalHeading('')
|
||||
->modalSubmitAction(false) // Hides the submit button
|
||||
->modalCancelAction(false) // Optional: hides the cancel button too
|
||||
->label('Calculate')
|
||||
->stickyModalHeader()
|
||||
->modalHeading('Calculate Player ASG')
|
||||
->icon('icon-player')
|
||||
->color(fn(): string => $this->filters['team_id'] ? 'primary' : 'gray')
|
||||
->disabled(fn(): string => $this->filters['team_id'] ? false : true)
|
||||
->modalContent(view('filament.modals.player-calculator-modal', ['filters' => $this->filters]))
|
||||
->slideOver()
|
||||
->slideOverPosition(SlideOverPosition::Start)
|
||||
->modalWidth(Width::SevenExtraLarge)
|
||||
->slideOver()
|
||||
->schema([
|
||||
Grid::make(2)
|
||||
->extraAttributes([
|
||||
'class' => 'justify-between w-full gap-4'
|
||||
])
|
||||
->schema([
|
||||
ToggleButtons::make('status')
|
||||
->hiddenLabel()
|
||||
->multiple()
|
||||
->inline()
|
||||
->options([
|
||||
'attack' => 'Attack',
|
||||
'midfield' => 'Midfield',
|
||||
'defence' => 'Defence',
|
||||
'goalkeeper' => 'Goalkeeper',
|
||||
]),
|
||||
Grid::make(3)
|
||||
->schema([
|
||||
Action::make('restart')
|
||||
->color('warning')
|
||||
->icon('phosphor-arrow-counter-clockwise'),
|
||||
Action::make('copy')
|
||||
->color('success')
|
||||
->icon('phosphor-copy'),
|
||||
Action::make('calculate')
|
||||
->icon('phosphor-calculator'),
|
||||
])
|
||||
->extraAttributes([
|
||||
'class' => 'flex justify-start'
|
||||
])
|
||||
])
|
||||
])
|
||||
->modalContentFooter(view('filament.modals.player-calculator-modal', ['filters' => $this->filters]))
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user