wip average all bettype in boxes
This commit is contained in:
1 parent
1a46e5d887
commit
fe4fa6e9cf
16 files changed
+1010
-135
No files matched your search
@@ -22,9 +22,9 @@ use Filament\Pages\Dashboard\Concerns\HasFiltersForm;
|
||||
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\Schemas\Schema;
|
||||
use Filament\Support\RawJs;
|
||||
use Illuminate\Contracts\Support\Htmlable;
|
||||
use Illuminate\Contracts\View\View;
|
||||
@@ -181,6 +181,14 @@ class Statistic extends BaseDashboard
|
||||
$this->dispatch('reset-tab');
|
||||
})
|
||||
->placeholder('Select Event'),
|
||||
Action::make('esc')
|
||||
->hiddenLabel()
|
||||
->visible(fn (Get $get) => $get('similar_past_matches') != 'none')
|
||||
->tooltip('Clear all (esc)')
|
||||
->icon('phosphor-x-circle')
|
||||
->color('gray')
|
||||
->keyBindings(['esc'])
|
||||
->action('resetFilters'),
|
||||
|
||||
Select::make('team_id')
|
||||
->live()
|
||||
@@ -240,7 +248,7 @@ class Statistic extends BaseDashboard
|
||||
Grid::make([
|
||||
'default' => 1,
|
||||
'sm' => 3,
|
||||
'md' => 4,
|
||||
'md' => 5,
|
||||
])
|
||||
->columnSpanFull()
|
||||
->schema([
|
||||
@@ -332,7 +340,9 @@ class Statistic extends BaseDashboard
|
||||
->live()
|
||||
->hiddenLabel()
|
||||
->allowHtml()
|
||||
->columnSpan(2)
|
||||
->placeholder('Player')
|
||||
->visible(fn (Get $get) => $get('team_id'))
|
||||
->hidden(fn (Get $get) => $get('similar_past_matches') != 'none')
|
||||
->prefixIconColor(fn (Get $get): string => $get('similar_past_matches') == 'none' ? 'success' : '')
|
||||
->prefixIcon('icon-player')
|
||||
@@ -371,9 +381,10 @@ class Statistic extends BaseDashboard
|
||||
]),
|
||||
]),
|
||||
Grid::make([
|
||||
'default' => 4,
|
||||
'sm' => 4,
|
||||
'default' => 7,
|
||||
'sm' => 7,
|
||||
])
|
||||
->columnSpanFull()
|
||||
->schema([
|
||||
Radio::make('season_or_date')
|
||||
->live()
|
||||
@@ -381,10 +392,7 @@ class Statistic extends BaseDashboard
|
||||
'class' => 'radio-statistic-group',
|
||||
])
|
||||
->hidden(fn (Get $get) => $get('similar_past_matches') != 'none')
|
||||
->columnSpan([
|
||||
'default' => 4,
|
||||
'sm' => 4,
|
||||
])
|
||||
->columnSpan(2)
|
||||
->inline()
|
||||
->default('season')
|
||||
->hiddenLabel()
|
||||
@@ -392,86 +400,88 @@ class Statistic extends BaseDashboard
|
||||
'season' => 'Season',
|
||||
'date' => 'Date',
|
||||
]),
|
||||
/************************
|
||||
* SEASON full time
|
||||
************************/
|
||||
Select::make('season')
|
||||
->live()
|
||||
->columnSpan(2)
|
||||
->hiddenLabel()
|
||||
->multiple()
|
||||
->placeholder('Current Season')
|
||||
->prefixIconColor('success')
|
||||
->visible(fn (Get $get) => $get('seasonmode'))
|
||||
->hidden(fn (Get $get) => $get('seasonmode') == 'halfyear' || $get('season_or_date') == 'date' || $get('similar_past_matches') != 'none')
|
||||
->prefixIcon('phosphor-calendar-star-fill')
|
||||
->options([
|
||||
'2026' => '2026',
|
||||
'2025' => '2025',
|
||||
'2024' => '2024',
|
||||
])
|
||||
->afterStateUpdated(function (callable $set, Get $get) {
|
||||
$set('ss_player_id', null);
|
||||
}),
|
||||
/************************
|
||||
* SEASON half time
|
||||
************************/
|
||||
Select::make('season')
|
||||
->live()
|
||||
->columnSpan(2)
|
||||
->hiddenLabel()
|
||||
->multiple()
|
||||
->placeholder('Current Season')
|
||||
->prefixIconColor('success')
|
||||
->visible(fn (Get $get) => $get('seasonmode'))
|
||||
->hidden(fn (Get $get) => $get('seasonmode') == 'fullyear' || $get('season_or_date') == 'date' || $get('similar_past_matches') != 'none')
|
||||
->prefixIcon('phosphor-calendar-star-fill')
|
||||
->options([
|
||||
'26/27' => '26/27',
|
||||
'25/26' => '25/26',
|
||||
'24/25' => '24/25',
|
||||
])
|
||||
->afterStateUpdated(function (callable $set) {
|
||||
$set('ss_player_id', null);
|
||||
}),
|
||||
/************************
|
||||
* DATE PICKER
|
||||
************************/
|
||||
DatePicker::make('start_date')
|
||||
->live()
|
||||
->hiddenLabel()
|
||||
->hidden(fn (Get $get) => $get('season_or_date') == 'season')
|
||||
->native(false)
|
||||
->prefixIconColor(fn (Get $get): string => $get('start_date') ? 'success' : 'primary')
|
||||
->prefixIcon('phosphor-calendar-fill')
|
||||
->prefix('Start')
|
||||
->suffixAction(
|
||||
Action::make('clear_start')
|
||||
->icon('phosphor-x')
|
||||
->color('gray')
|
||||
->action(fn (Set $set) => $set('start_date', null))
|
||||
),
|
||||
DatePicker::make('end_date')
|
||||
->live()
|
||||
->hiddenLabel()
|
||||
->hidden(fn (Get $get) => $get('season_or_date') == 'season')
|
||||
->native(false)
|
||||
->prefixIconColor(fn (Get $get): string => $get('end_date') ? 'success' : 'primary')
|
||||
->prefixIcon('phosphor-calendar-fill')
|
||||
->prefix('End')
|
||||
->suffixAction(
|
||||
Action::make('clear_end')
|
||||
->icon('phosphor-x')
|
||||
->color('gray')
|
||||
->action(fn (Set $set) => $set('end_date', null))
|
||||
),
|
||||
Action::make('esc')
|
||||
->hiddenLabel()
|
||||
->hidden(fn (Get $get) => $get('similar_past_matches') != 'none')
|
||||
->tooltip('Clear all (esc)')
|
||||
->icon('phosphor-x-circle')
|
||||
->color('gray')
|
||||
->keyBindings(['esc'])
|
||||
->action('resetFilters'),
|
||||
]),
|
||||
|
||||
/************************
|
||||
* SEASON fulltime
|
||||
************************/
|
||||
Select::make('season')
|
||||
->live()
|
||||
->columns(2)
|
||||
->hiddenLabel()
|
||||
->multiple()
|
||||
->placeholder('Current Season')
|
||||
->prefixIconColor('success')
|
||||
->hidden(fn (Get $get) => $get('seasonmode') == 'halfyear' || $get('season_or_date') == 'date' || $get('similar_past_matches') != 'none')
|
||||
->prefixIcon('phosphor-calendar-star-fill')
|
||||
->options([
|
||||
'2026' => '2026',
|
||||
'2025' => '2025',
|
||||
'2024' => '2024',
|
||||
])
|
||||
->afterStateUpdated(function (callable $set, Get $get) {
|
||||
$set('ss_player_id', null);
|
||||
}),
|
||||
/************************
|
||||
* SEASON halftime
|
||||
************************/
|
||||
Select::make('season')
|
||||
->live()
|
||||
->columns(2)
|
||||
->hiddenLabel()
|
||||
->multiple()
|
||||
->placeholder('Current Season')
|
||||
->prefixIconColor('success')
|
||||
->hidden(fn (Get $get) => $get('seasonmode') == 'fullyear' || $get('season_or_date') == 'date' || $get('similar_past_matches') != 'none')
|
||||
->prefixIcon('phosphor-calendar-star-fill')
|
||||
->options([
|
||||
'26/27' => '26/27',
|
||||
'25/26' => '25/26',
|
||||
'24/25' => '24/25',
|
||||
])
|
||||
->afterStateUpdated(function (callable $set) {
|
||||
$set('ss_player_id', null);
|
||||
}),
|
||||
/************************
|
||||
* DATE PICKER
|
||||
************************/
|
||||
DatePicker::make('start_date')
|
||||
->live()
|
||||
->hiddenLabel()
|
||||
->hidden(fn (Get $get) => $get('season_or_date') == 'season')
|
||||
->native(false)
|
||||
->prefixIconColor(fn (Get $get): string => $get('start_date') ? 'success' : 'primary')
|
||||
->prefixIcon('phosphor-calendar-fill')
|
||||
->prefix('Start')
|
||||
->suffixAction(
|
||||
Action::make('clear_start')
|
||||
->icon('phosphor-x')
|
||||
->color('gray')
|
||||
->action(fn (Set $set) => $set('start_date', null))
|
||||
),
|
||||
DatePicker::make('end_date')
|
||||
->live()
|
||||
->hiddenLabel()
|
||||
->hidden(fn (Get $get) => $get('season_or_date') == 'season')
|
||||
->native(false)
|
||||
->prefixIconColor(fn (Get $get): string => $get('end_date') ? 'success' : 'primary')
|
||||
->prefixIcon('phosphor-calendar-fill')
|
||||
->prefix('End')
|
||||
->suffixAction(
|
||||
Action::make('clear_end')
|
||||
->icon('phosphor-x')
|
||||
->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