filter statistic layout
This commit is contained in:
1 parent
6aefe4f0c2
commit
10ac280e5e
4 files changed
+65
-50
No files matched your search
@@ -61,9 +61,6 @@ class Statistic extends BaseDashboard
|
||||
'md' => 4,
|
||||
])
|
||||
->columnSpanFull()
|
||||
->extraAttributes([
|
||||
'class' => 'p-5 bg-blue-50 dark:bg-blue-950 rounded-lg border border-blue-200 dark:border-blue-800',
|
||||
])
|
||||
->schema([
|
||||
Select::make('league_id')
|
||||
// ->prefixIconColor('primary')
|
||||
@@ -126,8 +123,12 @@ class Statistic extends BaseDashboard
|
||||
Select::make('team_position')
|
||||
->hiddenLabel()
|
||||
->placeholder('Team Position')
|
||||
->prefix('Team Position')
|
||||
->prefixIcon('phosphor-map-pin')
|
||||
->prefix('TP')
|
||||
->prefixAction(
|
||||
Action::make('iconInfo')
|
||||
->icon('phosphor-question')
|
||||
->tooltip(fn() => 'Team Position')
|
||||
)
|
||||
->hidden(fn(Get $get) => $get('similar_past_matches') != 'none')
|
||||
->default('all')
|
||||
->selectablePlaceholder(false)
|
||||
@@ -137,32 +138,19 @@ class Statistic extends BaseDashboard
|
||||
'away' => 'Away',
|
||||
])
|
||||
->live(),
|
||||
Select::make('statistic_type')
|
||||
->hiddenLabel()
|
||||
->placeholder('Statistic Type')
|
||||
->prefixIconColor('success')
|
||||
->prefixIcon('phosphor-arrows-out-line-vertical')
|
||||
->default('none')
|
||||
->selectablePlaceholder(false)
|
||||
->options([
|
||||
'gls' => 'Goals',
|
||||
'crn' => 'Corner',
|
||||
'fls' => 'Fouls Commited',
|
||||
'ofs' => 'Offside',
|
||||
'crd' => 'Cards',
|
||||
'snt' => 'Shots On Target',
|
||||
'tsh' => 'Total Shots',
|
||||
])
|
||||
->live(),
|
||||
]),
|
||||
Grid::make([
|
||||
'default' => 1,
|
||||
'sm' => 3,
|
||||
'md' => 4,
|
||||
])
|
||||
->columnSpanFull()
|
||||
->schema([
|
||||
Select::make('similar_past_matches')
|
||||
->hiddenLabel()
|
||||
->placeholder('Similar Past Matches')
|
||||
->prefixIconColor('primary')
|
||||
->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>') : '')
|
||||
// ->columnSpan([
|
||||
// 'default' => 1,
|
||||
// 'sm' => 2,
|
||||
// ])
|
||||
->prefixAction(
|
||||
Action::make('iconInfo')
|
||||
->icon('phosphor-question')
|
||||
@@ -237,6 +225,29 @@ class Statistic extends BaseDashboard
|
||||
'notplayed' => 'Not Played',
|
||||
])
|
||||
->live(),
|
||||
]),
|
||||
Grid::make([
|
||||
'default' => 4,
|
||||
'sm' => 4,
|
||||
])
|
||||
->schema([
|
||||
Radio::make('season_or_date')
|
||||
->extraAttributes([
|
||||
'class' => 'radio-statistic-group',
|
||||
])
|
||||
->columnSpan([
|
||||
'default' => 4,
|
||||
'sm' => 4,
|
||||
])
|
||||
->inline()
|
||||
->live()
|
||||
->default('season')
|
||||
->hiddenLabel()
|
||||
->options([
|
||||
'season' => 'Season',
|
||||
'date' => 'Date',
|
||||
]),
|
||||
]),
|
||||
Select::make('season')
|
||||
->columns(2)
|
||||
->hiddenLabel()
|
||||
@@ -282,21 +293,8 @@ class Statistic extends BaseDashboard
|
||||
->color('gray')
|
||||
->action(fn(Set $set) => $set('end_date', null))
|
||||
),
|
||||
Radio::make('season_or_date')
|
||||
->columnSpan([
|
||||
'default' => 1,
|
||||
'sm' => 2,
|
||||
])
|
||||
->inline()
|
||||
->live()
|
||||
->default('season')
|
||||
->hiddenLabel()
|
||||
->options([
|
||||
'season' => 'Season',
|
||||
'date' => 'Date',
|
||||
]),
|
||||
]),
|
||||
]);
|
||||
|
||||
}
|
||||
|
||||
protected function tooltip_similar_past_matches(): HtmlString
|
||||
|
||||
@@ -80,6 +80,9 @@ class AlarmBookmaker extends Component implements HasActions, HasSchemas, HasTab
|
||||
Filter::make('multiline_setting_id')
|
||||
->schema([
|
||||
Radio::make('multiline_setting_id')
|
||||
->extraAttributes([
|
||||
'class' => 'radio-monitor-group'
|
||||
])
|
||||
->inline()
|
||||
->columnSpan(6)
|
||||
->default(self::$default_filter)
|
||||
|
||||
@@ -81,7 +81,10 @@ class MultilineBookmaker extends Component implements HasActions, HasSchemas, Ha
|
||||
Filter::make('multiline_setting_id')
|
||||
->schema([
|
||||
Radio::make('multiline_setting_id')
|
||||
->extraAttributes(['id' => 'multiline_setting'])
|
||||
->extraAttributes([
|
||||
'id' => 'multiline_setting',
|
||||
'class' => 'radio-monitor-group'
|
||||
])
|
||||
->inline()
|
||||
->default(-1)
|
||||
->columnSpan(6)
|
||||
|
||||
Reference in new issue
Block a user