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