wip
This commit is contained in:
1 parent
a4f7447fa7
commit
c99ba7219f
2 files changed
+23
-18
No files matched your search
@@ -19,7 +19,7 @@ use Filament\Forms\Components\Select;
|
||||
use Filament\Forms\Components\Slider;
|
||||
use Filament\Pages\Dashboard as BaseDashboard;
|
||||
use Filament\Pages\Dashboard\Concerns\HasFiltersForm;
|
||||
use Filament\Schemas\Components\Grid;
|
||||
use Filament\Schemas\Components\Fieldset;
|
||||
use Filament\Schemas\Components\Utilities\Get;
|
||||
use Filament\Schemas\Components\Utilities\Set;
|
||||
use Filament\Schemas\Schema;
|
||||
@@ -50,14 +50,16 @@ class Statistic extends BaseDashboard
|
||||
{
|
||||
return $schema
|
||||
->components([
|
||||
Grid::make([
|
||||
'default' => 2,
|
||||
'sm' => 2,
|
||||
'md' => 3,
|
||||
'lg' => 4,
|
||||
])->extraAttributes([
|
||||
'class' => 'bg-gray-100 dark:bg-blue-950 rounded-lg p-5 border border-gray-400 dark:border-blue-800',
|
||||
])
|
||||
Fieldset::make('Events')
|
||||
->dense()
|
||||
->columns([
|
||||
'default' => 2,
|
||||
'sm' => 2,
|
||||
'md' => 3,
|
||||
'lg' => 4,
|
||||
])->extraAttributes([
|
||||
'class' => 'bg-gray-100 dark:bg-blue-950 rounded-lg p-5 border border-gray-400 dark:border-blue-800',
|
||||
])
|
||||
->schema([
|
||||
Select::make('league_id')
|
||||
->prefixIcon('phosphor-trophy')
|
||||
@@ -153,14 +155,17 @@ class Statistic extends BaseDashboard
|
||||
// ->native(false),
|
||||
])->columns(6)
|
||||
->columnSpanFull(),
|
||||
Grid::make([
|
||||
'default' => 2,
|
||||
'sm' => 2,
|
||||
'md' => 3,
|
||||
'lg' => 4,
|
||||
])->extraAttributes([
|
||||
'class' => 'bg-gray-100 dark:bg-blue-950 rounded-lg p-5 border border-gray-400 dark:border-blue-800',
|
||||
])
|
||||
Fieldset::make('Player')
|
||||
->dense()
|
||||
->hidden(fn (Get $get) => $get('similar_past_matches') == 'none')
|
||||
->columns([
|
||||
'default' => 2,
|
||||
'sm' => 2,
|
||||
'md' => 3,
|
||||
'lg' => 4,
|
||||
])->extraAttributes([
|
||||
'class' => 'bg-gray-100 dark:bg-blue-950 rounded-lg p-5 border border-gray-400 dark:border-blue-800',
|
||||
])
|
||||
->schema([
|
||||
Select::make('tm_player_id')
|
||||
->label('Player')
|
||||
|
||||
@@ -44,7 +44,7 @@ class LoadEvents
|
||||
if (! $league_id) {
|
||||
return [];
|
||||
}
|
||||
if (! $team_id) {
|
||||
if (! $team_id && $similar_past_matches != 'none') {
|
||||
return [];
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user