wip
This commit is contained in:
1 parent
d316d486b9
commit
c6c5cdc1b1
21 files changed
+620
-34
No files matched your search
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Filament\Pages;
|
||||
|
||||
use App\Actions\LoadSofaScoreCategory;
|
||||
use App\Actions\LoadStatisticFixturesLeaguesOptions;
|
||||
use App\Actions\LoadStatisticFixturesMatchOptions;
|
||||
use App\Filament\Pages\Selections\LoadPlayer;
|
||||
@@ -15,7 +16,6 @@ use Filament\Forms\Components\DatePicker;
|
||||
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;
|
||||
@@ -79,17 +79,33 @@ class Statistic extends BaseDashboard
|
||||
Grid::make([
|
||||
'default' => 1,
|
||||
'sm' => 3,
|
||||
'md' => 4,
|
||||
'md' => 5,
|
||||
])
|
||||
->columnSpanFull()
|
||||
->schema([
|
||||
Select::make('sofascore_category_id')
|
||||
->live()
|
||||
->searchable()
|
||||
->prefixIconColor(fn(Get $get): string => $get('sofascore_category_id') ? 'success' : 'danger')
|
||||
->prefixIcon('phosphor-globe-fill')
|
||||
->hiddenLabel()
|
||||
->options(fn() => LoadSofaScoreCategory::load())
|
||||
->placeholder('Country')
|
||||
->afterStateUpdated(function (callable $set) {
|
||||
$set('league_id', null);
|
||||
$set('match_id', null);
|
||||
$set('team_id', null);
|
||||
$set('ss_player_id', null);
|
||||
$set('season', null);
|
||||
}),
|
||||
Select::make('league_id')
|
||||
->live()
|
||||
->searchable()
|
||||
->prefixIconColor(fn(Get $get): string => $get('league_id') ? 'success' : 'danger')
|
||||
->prefixIcon('phosphor-trophy-fill')
|
||||
->hiddenLabel()
|
||||
->options(fn() => LoadStatisticFixturesLeaguesOptions::load(1))
|
||||
// ->options(fn(Get $get) => SofaScoreTournament::with('sofascore_category')->where('sofa_score_category_id', $get('sofascore_category_id'))->pluck('name', 'tournament_id'))
|
||||
->options(fn(Get $get) => LoadStatisticFixturesLeaguesOptions::load($get('sofascore_category_id')))
|
||||
->placeholder('League')
|
||||
->afterStateUpdated(function (callable $set, $state) {
|
||||
$set('match_id', null);
|
||||
|
||||
Reference in new issue
Block a user