wip pp filter

This commit is contained in:
salam committed 2026-10-15 16:29:48 +02:00
1 parent fc1e1b2832
commit 55f31acf2a
23 files changed
+1127 -329

No files matched your search

+15 -9
View File
@@ -136,7 +136,7 @@ class Statistic extends BaseDashboard
])
->columnSpanFull()
->schema([
Hidden::make('seasonmode'),
Hidden::make('season_mode'),
$this->selectSofascoreCategoryId(),
$this->selectLeagueId(),
$this->selectMatchId(),
@@ -348,7 +348,7 @@ class Statistic extends BaseDashboard
->options(fn () => LoadSofaScoreCategory::load())
->placeholder('Select Country')
->afterStateUpdated(function (callable $set, $state) {
$set('seasonmode', SofaScoreCategory::where('id', $state)->value('season_mode'));
$set('season_mode', SofaScoreCategory::where('id', $state)->value('season_mode'));
$set('league_id', null);
$set('match_id', null);
$set('team_id', null);
@@ -559,9 +559,9 @@ class Statistic extends BaseDashboard
->placeholder('Player')
->visible(fn (Get $get) => $get('team_id'))
->hidden(fn (Get $get) => $get('similar_past_matches') != 'none')
->disabled(fn (Get $get) => $get('season_or_date') == 'date' && ($get('start_date') == null || $get('end_date') == null))
->prefixIconColor(fn (Get $get): string => $get('similar_past_matches') == 'none' ? 'success' : '')
->prefixIcon('icon-player')
->preload()
->searchable()
->extraAttributes(fn () => [
'id' => 'player_selector',
@@ -574,12 +574,18 @@ class Statistic extends BaseDashboard
->tooltip(fn () => $this->tooltip_player_info())
)
->options(function (Get $get) {
$team_id = $get('team_id');
$team_position = $get('team_position');
$season = $get('season');
$seasonmode = $get('seasonmode');
$arr = [
'team_id' => $get('team_id'),
'team_position' => $get('team_position'),
'season' => $get('season'),
'season_mode' => $get('season_mode'),
'season_or_date' => $get('season_or_date'),
'start_date' => $get('start_date'),
'end_date' => $get('end_date'),
];
return LoadPlayerSelection::load($arr);
return LoadPlayerSelection::load($team_id, $team_position, $season, $seasonmode);
});
}
@@ -634,7 +640,7 @@ class Statistic extends BaseDashboard
->hidden(fn (Get $get) => $get('season_or_date') == 'date' || $get('similar_past_matches') != 'none')
->prefixIcon('phosphor-calendar-star')
->options(function (Get $get) {
if ($get('seasonmode') == 'halfyear') {
if ($get('season_mode') == 'halfyear') {
return ['26/27' => '26/27', '25/26' => '25/26', '24/25' => '24/25'];
} else {
return ['2026' => '2026', '2025' => '2025', '2024' => '2024'];