add poilice to page statistik
This commit is contained in:
1 parent
f55430fcef
commit
ab628108cc
1 file changed
+43
-43
@@ -9,6 +9,7 @@ use App\Actions\Selections\LoadSeasons;
|
|||||||
use App\Models\Element;
|
use App\Models\Element;
|
||||||
use App\Models\StatisticFixtures;
|
use App\Models\StatisticFixtures;
|
||||||
use BackedEnum;
|
use BackedEnum;
|
||||||
|
use BezhanSalleh\FilamentShield\Traits\HasPageShield;
|
||||||
use Filament\Actions\Action;
|
use Filament\Actions\Action;
|
||||||
use Filament\Forms\Components\DatePicker;
|
use Filament\Forms\Components\DatePicker;
|
||||||
use Filament\Forms\Components\Radio;
|
use Filament\Forms\Components\Radio;
|
||||||
@@ -26,7 +27,7 @@ use Illuminate\Support\HtmlString;
|
|||||||
|
|
||||||
class Statistic extends BaseDashboard
|
class Statistic extends BaseDashboard
|
||||||
{
|
{
|
||||||
use HasFiltersForm;
|
use HasFiltersForm, HasPageShield;
|
||||||
|
|
||||||
protected static string|BackedEnum|null $navigationIcon = 'phosphor-chart-line-up';
|
protected static string|BackedEnum|null $navigationIcon = 'phosphor-chart-line-up';
|
||||||
|
|
||||||
@@ -270,49 +271,48 @@ class Statistic extends BaseDashboard
|
|||||||
'date' => 'Date',
|
'date' => 'Date',
|
||||||
]),
|
]),
|
||||||
]),
|
]),
|
||||||
Select::make('season')
|
Select::make('season')
|
||||||
->live()
|
->live()
|
||||||
->columns(2)
|
->columns(2)
|
||||||
->hiddenLabel()
|
->hiddenLabel()
|
||||||
->multiple()
|
->multiple()
|
||||||
->placeholder('Season')
|
->placeholder('Season')
|
||||||
->prefixIconColor(fn(Get $get): string => $get('season') ? 'success' : 'danger')
|
->prefixIconColor(fn(Get $get): string => $get('season') ? 'success' : 'danger')
|
||||||
->hidden(fn(Get $get) => $get('season_or_date') == 'date')
|
->hidden(fn(Get $get) => $get('season_or_date') == 'date')
|
||||||
->prefixIcon('phosphor-calendar-star-fill')
|
->prefixIcon('phosphor-calendar-star-fill')
|
||||||
->preload()
|
->preload()
|
||||||
->options(function (Get $get) {
|
->options(function (Get $get) {
|
||||||
return LoadSeasons::load($get('league_id'));
|
return LoadSeasons::load($get('league_id'));
|
||||||
}),
|
}),
|
||||||
DatePicker::make('start_date')
|
DatePicker::make('start_date')
|
||||||
->live()
|
->live()
|
||||||
->hiddenLabel()
|
->hiddenLabel()
|
||||||
->hidden(fn(Get $get) => $get('season_or_date') == 'season')
|
->hidden(fn(Get $get) => $get('season_or_date') == 'season')
|
||||||
->native(false)
|
->native(false)
|
||||||
->prefixIconColor('primary')
|
->prefixIconColor('primary')
|
||||||
->prefixIcon('phosphor-calendar')
|
->prefixIcon('phosphor-calendar')
|
||||||
->prefix('Start')
|
->prefix('Start')
|
||||||
->suffixAction(
|
->suffixAction(
|
||||||
Action::make('clear_start')
|
Action::make('clear_start')
|
||||||
->icon('phosphor-x')
|
->icon('phosphor-x')
|
||||||
->color('gray')
|
->color('gray')
|
||||||
->action(fn(Set $set) => $set('start_date', null))
|
->action(fn(Set $set) => $set('start_date', null))
|
||||||
),
|
),
|
||||||
DatePicker::make('end_date')
|
DatePicker::make('end_date')
|
||||||
->live()
|
->live()
|
||||||
->hiddenLabel()
|
->hiddenLabel()
|
||||||
->hidden(fn(Get $get) => $get('season_or_date') == 'season')
|
->hidden(fn(Get $get) => $get('season_or_date') == 'season')
|
||||||
->native(false)
|
->native(false)
|
||||||
->prefixIconColor('primary')
|
->prefixIconColor('primary')
|
||||||
->prefixIcon('phosphor-calendar')
|
->prefixIcon('phosphor-calendar')
|
||||||
->prefix('End')
|
->prefix('End')
|
||||||
->suffixAction(
|
->suffixAction(
|
||||||
Action::make('clear_end')
|
Action::make('clear_end')
|
||||||
->icon('phosphor-x')
|
->icon('phosphor-x')
|
||||||
->color('gray')
|
->color('gray')
|
||||||
->action(fn(Set $set) => $set('end_date', null))
|
->action(fn(Set $set) => $set('end_date', null))
|
||||||
),
|
),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function tooltip_similar_past_matches(): HtmlString
|
protected function tooltip_similar_past_matches(): HtmlString
|
||||||
|
|||||||
Reference in new issue
Block a user