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)
|
||||
|
||||
@@ -79,24 +79,35 @@ button[wire\:click="resetTableFiltersForm"] {
|
||||
|
||||
/* Styling Radio Lable */
|
||||
|
||||
.fi-fo-radio {
|
||||
@apply !grid grid-cols-3 gap-y-2 mb-2
|
||||
.radio-monitor-group {
|
||||
@apply !grid grid-cols-3 gap-y-2 m-0 p-0
|
||||
}
|
||||
|
||||
.radio-statistic-group {
|
||||
@apply !grid grid-cols-2 m-0 p-0
|
||||
}
|
||||
|
||||
.fi-fo-radio-label {
|
||||
@apply p-2 border border-slate-200 dark dark:border-slate-600 shadow rounded-md cursor-pointer has-checked: bg-blue-50 has-checked:text-blue-900 dark:has-checked:bg-blue-950 dark:has-checked:text-blue-200
|
||||
@apply m-0 px-2 py-1 border border-gray-200 dark:border-gray-700 shadow rounded-lg cursor-pointer
|
||||
}
|
||||
|
||||
|
||||
.fi-sc-component .fi-wi-stats-overview-stat {
|
||||
@apply bg-green-50 dark:bg-green-900 border border-green-300 dark:border-green-700
|
||||
input[type="radio"].fi-radio-input {
|
||||
@apply bg-none border-0
|
||||
}
|
||||
|
||||
/* #mapper_right .fi-dropdown-list-item,
|
||||
#mapper_left .fi-dropdown-list-item {
|
||||
padding: 2px;
|
||||
input[type="radio"].fi-radio-input {
|
||||
&:checked {
|
||||
@apply bg-none bg-blue-500 dark:bg-blue-600 border-0
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Green Stat Widgets
|
||||
*/
|
||||
.fi-sc-component .fi-wi-stats-overview-stat {
|
||||
@apply bg-green-50 dark:bg-green-900 border border-green-300 dark:border-green-700 p-3
|
||||
}
|
||||
|
||||
/*
|
||||
widget space to top menu
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user