clear button similar_past_matches
This commit is contained in:
1 parent
bb4acc5e80
commit
48e7abbe2b
1 file changed
+12
-13
@@ -129,7 +129,6 @@ class Statistic extends BaseDashboard
|
|||||||
->prefixIconColor(fn(Get $get): string => $get('league_id') ? 'success' : 'danger')
|
->prefixIconColor(fn(Get $get): string => $get('league_id') ? 'success' : 'danger')
|
||||||
->prefixIcon('phosphor-trophy-fill')
|
->prefixIcon('phosphor-trophy-fill')
|
||||||
->hiddenLabel()
|
->hiddenLabel()
|
||||||
// ->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')))
|
->options(fn(Get $get) => LoadStatisticFixturesLeaguesOptions::load($get('sofascore_category_id')))
|
||||||
->placeholder('League')
|
->placeholder('League')
|
||||||
->afterStateUpdated(function (callable $set) {
|
->afterStateUpdated(function (callable $set) {
|
||||||
@@ -244,12 +243,20 @@ class Statistic extends BaseDashboard
|
|||||||
'snt' => 'Shots On Target',
|
'snt' => 'Shots On Target',
|
||||||
'tsh' => 'Total Shots',
|
'tsh' => 'Total Shots',
|
||||||
]),
|
]),
|
||||||
|
|
||||||
|
/************************
|
||||||
|
* SMP
|
||||||
|
************************/
|
||||||
Select::make('similar_past_matches')
|
Select::make('similar_past_matches')
|
||||||
->live()
|
->live()
|
||||||
->hiddenLabel()
|
->hiddenLabel()
|
||||||
->prefix('SPM')
|
->suffixAction(Action::make('reset')
|
||||||
|
->icon('phosphor-x-circle')
|
||||||
|
->action(fn(callable $set) => $set('similar_past_matches', 'none'))
|
||||||
|
->color(fn(Get $get): string => $get('similar_past_matches') != 'none' ? 'info' : 'gray'))
|
||||||
->placeholder('Similar Past Matches')
|
->placeholder('Similar Past Matches')
|
||||||
->suffix(fn(Get $get): string|HtmlString => $get('similar_past_matches') != 'none' ? new HtmlString('<div class="text-center w-24 font-bold rounded p-1 bg-blue-600 dark:bg-blue-700 text-white dark:text-gray-300">± ' . $get('accuracy') . '</div>') : '')
|
->suffix(fn(Get $get): string|HtmlString => $get('similar_past_matches') != 'none' ? new HtmlString('<div class="text-center w-24 font-bold rounded p-1 bg-blue-600 dark:bg-blue-700 text-white dark:text-gray-300">± ' . $get('accuracy') . '</div>') : '')
|
||||||
|
->prefix('SPM')
|
||||||
->prefixAction(
|
->prefixAction(
|
||||||
Action::make('iconInfo')
|
Action::make('iconInfo')
|
||||||
->icon('phosphor-question-fill')
|
->icon('phosphor-question-fill')
|
||||||
@@ -359,7 +366,6 @@ class Statistic extends BaseDashboard
|
|||||||
->multiple()
|
->multiple()
|
||||||
->placeholder('Current Season')
|
->placeholder('Current Season')
|
||||||
->prefixIconColor('success')
|
->prefixIconColor('success')
|
||||||
// ->prefixIconColor(fn(Get $get): string => $get('season') ? 'success' : 'primary')
|
|
||||||
->hidden(fn(Get $get) => $get('seasonmode') == 'halfyear' || $get('season_or_date') == 'date' || $get('similar_past_matches') != 'none')
|
->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-fill')
|
||||||
->options([
|
->options([
|
||||||
@@ -367,11 +373,8 @@ class Statistic extends BaseDashboard
|
|||||||
'2025' => '2025',
|
'2025' => '2025',
|
||||||
'2024' => '2024',
|
'2024' => '2024',
|
||||||
])
|
])
|
||||||
// ->options(function (Get $get) {
|
->afterStateUpdated(function (callable $set, Get $get) {
|
||||||
// return LoadSeasons::load($get('seasonmode'));
|
$set('ss_player_id', null);
|
||||||
// })
|
|
||||||
->afterStateUpdated(function (callable $set) {
|
|
||||||
// $set('ss_player_id', null);
|
|
||||||
}),
|
}),
|
||||||
/************************
|
/************************
|
||||||
* SEASON halftime
|
* SEASON halftime
|
||||||
@@ -383,7 +386,6 @@ class Statistic extends BaseDashboard
|
|||||||
->multiple()
|
->multiple()
|
||||||
->placeholder('Current Season')
|
->placeholder('Current Season')
|
||||||
->prefixIconColor('success')
|
->prefixIconColor('success')
|
||||||
// ->prefixIconColor(fn(Get $get): string => $get('season') ? 'success' : 'primary')
|
|
||||||
->hidden(fn(Get $get) => $get('seasonmode') == 'fullyear' || $get('season_or_date') == 'date' || $get('similar_past_matches') != 'none')
|
->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-fill')
|
||||||
->options([
|
->options([
|
||||||
@@ -391,11 +393,8 @@ class Statistic extends BaseDashboard
|
|||||||
'25/26' => '25/26',
|
'25/26' => '25/26',
|
||||||
'24/25' => '24/25',
|
'24/25' => '24/25',
|
||||||
])
|
])
|
||||||
// ->options(function (Get $get) {
|
|
||||||
// return LoadSeasons::load($get('seasonmode'));
|
|
||||||
// })
|
|
||||||
->afterStateUpdated(function (callable $set) {
|
->afterStateUpdated(function (callable $set) {
|
||||||
// $set('ss_player_id', null);
|
$set('ss_player_id', null);
|
||||||
}),
|
}),
|
||||||
/************************
|
/************************
|
||||||
* DATE PICKER
|
* DATE PICKER
|
||||||
|
|||||||
Reference in new issue
Block a user