This commit is contained in:
salam committed 2026-10-01 15:24:59 +02:00
1 parent 20b53c2878
commit bbda7b478f
1 file changed
+25 -18
+25 -18
View File
@@ -26,6 +26,7 @@ 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\Size;
use Filament\Support\RawJs;
use Illuminate\Contracts\Support\Htmlable;
use Illuminate\Support\HtmlString;
@@ -140,7 +141,7 @@ class Statistic extends BaseDashboard
->preload()
->searchable(false)
->prefixIconColor(fn(Get $get): string => $get('sofascore_category_id') ? 'success' : 'danger')
->prefixIcon('phosphor-globe-fill')
->prefixIcon('phosphor-globe')
->hiddenLabel()
->options(fn() => LoadSofaScoreCategory::load())
->placeholder('Select Country')
@@ -156,7 +157,7 @@ class Statistic extends BaseDashboard
->live()
->preload()
->prefixIconColor(fn(Get $get): string => $get('league_id') ? 'success' : 'danger')
->prefixIcon('phosphor-trophy-fill')
->prefixIcon('phosphor-trophy')
->hiddenLabel()
->options(fn(Get $get) => LoadStatisticFixturesLeaguesOptions::load($get('sofascore_category_id')))
->placeholder('Select League')
@@ -171,7 +172,7 @@ class Statistic extends BaseDashboard
->hiddenLabel()
->columnSpan(fn(Get $get) => $get('similar_past_matches') != 'none' ? 2 : 1)
->prefixIconColor(fn(Get $get): string => $get('match_id') ? 'success' : 'danger')
->prefixIcon('phosphor-calendar-check-fill')
->prefixIcon('phosphor-calendar-check')
->options(function (Get $get) {
return LoadStatisticFixturesMatchOptions::load($get('league_id'));
})
@@ -188,6 +189,8 @@ class Statistic extends BaseDashboard
->icon('phosphor-x-circle')
->color('danger')
->keyBindings(['esc'])
->size(Size::Medium)
->outlined()
->action('resetFilters'),
Select::make('team_id')
@@ -202,7 +205,7 @@ class Statistic extends BaseDashboard
return 'danger';
}
})
->prefixIcon('phosphor-users-fill')
->prefixIcon('phosphor-users')
->suffixAction(Action::make('reset')
->icon('phosphor-x-circle')
->tooltip('Clear Team')
@@ -243,7 +246,7 @@ class Statistic extends BaseDashboard
->prefixAction(
Action::make('iconInfo')
->color('success')
->icon('phosphor-question-fill')
->icon('phosphor-question')
->tooltip(fn() => 'Team Position')
)
->hidden(fn(Get $get) => $get('similar_past_matches') != 'none')
@@ -264,14 +267,14 @@ class Statistic extends BaseDashboard
->prefixIconColor('success')
->prefixIcon(function (Get $get) {
return match ($get('statistic_type')) {
'gls' => 'phosphor-soccer-ball-fill',
'gls' => 'phosphor-soccer-ball',
'crn' => 'phosphor-angle',
'fls' => 'phosphor-first-aid-kit',
'ofs' => 'phosphor-arrow-fat-lines-right-fill',
'crd' => 'phosphor-cards-fill',
'snt' => 'phosphor-target-fill',
'tsh' => 'phosphor-chart-polar-fill',
default => 'phosphor-soccer-ball-fill',
'ofs' => 'phosphor-arrow-fat-lines-right',
'crd' => 'phosphor-cards',
'snt' => 'phosphor-target',
'tsh' => 'phosphor-chart-polar',
default => 'phosphor-soccer-ball',
};
})
->default('gls')
@@ -305,7 +308,7 @@ class Statistic extends BaseDashboard
->prefix('SPM')
->prefixAction(
Action::make('iconInfo')
->icon('phosphor-question-fill')
->icon('phosphor-question')
->color(fn(Get $get): string => $get('similar_past_matches') != 'none' ? 'success' : 'danger')
->tooltip(fn() => $this->tooltip_similar_past_matches())
)
@@ -359,7 +362,7 @@ class Statistic extends BaseDashboard
])
->suffixAction(
Action::make('iconInfo')
->icon('phosphor-question-fill')
->icon('phosphor-question')
->color('success')
->tooltip(fn() => $this->tooltip_player_info())
)
@@ -376,7 +379,7 @@ class Statistic extends BaseDashboard
->live()
->hiddenLabel()
->placeholder('Time on field')
->prefixIcon('phosphor-watch-fill')
->prefixIcon('phosphor-watch')
->default('all')
->hidden(fn(Get $get) => ! $get('ss_player_id'))
->prefixIconColor('success')
@@ -420,7 +423,7 @@ class Statistic extends BaseDashboard
->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')
->prefixIcon('phosphor-calendar-star')
->options([
'2026' => '2026',
'2025' => '2025',
@@ -441,7 +444,7 @@ class Statistic extends BaseDashboard
->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')
->prefixIcon('phosphor-calendar-star')
->options([
'26/27' => '26/27',
'25/26' => '25/26',
@@ -459,7 +462,7 @@ class Statistic extends BaseDashboard
->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')
->prefixIcon('phosphor-calendar')
->prefix('Start')
->suffixAction(
Action::make('clear_start')
@@ -473,7 +476,7 @@ class Statistic extends BaseDashboard
->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')
->prefixIcon('phosphor-calendar')
->prefix('End')
->suffixAction(
Action::make('clear_end')
@@ -489,6 +492,8 @@ class Statistic extends BaseDashboard
->icon('phosphor-x-circle')
->color(fn(Get $get) => $get('sofascore_category_id') ? 'danger' : 'gray')
->keyBindings(['esc'])
->outlined()
->size(Size::Medium)
->action('resetFilters'),
Action::make('copy')
->hiddenLabel()
@@ -496,6 +501,8 @@ class Statistic extends BaseDashboard
->visible(fn(Get $get) => $get('team_id'))
->tooltip('Copy data for pasting into spreadsheet')
->color('success')
->size(Size::Medium)
->outlined()
->icon('phosphor-copy')
->action(function ($livewire) {
// 1. Call your custom Livewire function to generate the data