filter statistic layout
This commit is contained in:
1 parent
6aefe4f0c2
commit
10ac280e5e
4 files changed
+64
-49
No files matched your search
@@ -61,9 +61,6 @@ class Statistic extends BaseDashboard
|
|||||||
'md' => 4,
|
'md' => 4,
|
||||||
])
|
])
|
||||||
->columnSpanFull()
|
->columnSpanFull()
|
||||||
->extraAttributes([
|
|
||||||
'class' => 'p-5 bg-blue-50 dark:bg-blue-950 rounded-lg border border-blue-200 dark:border-blue-800',
|
|
||||||
])
|
|
||||||
->schema([
|
->schema([
|
||||||
Select::make('league_id')
|
Select::make('league_id')
|
||||||
// ->prefixIconColor('primary')
|
// ->prefixIconColor('primary')
|
||||||
@@ -126,8 +123,12 @@ class Statistic extends BaseDashboard
|
|||||||
Select::make('team_position')
|
Select::make('team_position')
|
||||||
->hiddenLabel()
|
->hiddenLabel()
|
||||||
->placeholder('Team Position')
|
->placeholder('Team Position')
|
||||||
->prefix('Team Position')
|
->prefix('TP')
|
||||||
->prefixIcon('phosphor-map-pin')
|
->prefixAction(
|
||||||
|
Action::make('iconInfo')
|
||||||
|
->icon('phosphor-question')
|
||||||
|
->tooltip(fn() => 'Team Position')
|
||||||
|
)
|
||||||
->hidden(fn(Get $get) => $get('similar_past_matches') != 'none')
|
->hidden(fn(Get $get) => $get('similar_past_matches') != 'none')
|
||||||
->default('all')
|
->default('all')
|
||||||
->selectablePlaceholder(false)
|
->selectablePlaceholder(false)
|
||||||
@@ -137,32 +138,19 @@ class Statistic extends BaseDashboard
|
|||||||
'away' => 'Away',
|
'away' => 'Away',
|
||||||
])
|
])
|
||||||
->live(),
|
->live(),
|
||||||
Select::make('statistic_type')
|
]),
|
||||||
->hiddenLabel()
|
Grid::make([
|
||||||
->placeholder('Statistic Type')
|
'default' => 1,
|
||||||
->prefixIconColor('success')
|
'sm' => 3,
|
||||||
->prefixIcon('phosphor-arrows-out-line-vertical')
|
'md' => 4,
|
||||||
->default('none')
|
|
||||||
->selectablePlaceholder(false)
|
|
||||||
->options([
|
|
||||||
'gls' => 'Goals',
|
|
||||||
'crn' => 'Corner',
|
|
||||||
'fls' => 'Fouls Commited',
|
|
||||||
'ofs' => 'Offside',
|
|
||||||
'crd' => 'Cards',
|
|
||||||
'snt' => 'Shots On Target',
|
|
||||||
'tsh' => 'Total Shots',
|
|
||||||
])
|
])
|
||||||
->live(),
|
->columnSpanFull()
|
||||||
|
->schema([
|
||||||
Select::make('similar_past_matches')
|
Select::make('similar_past_matches')
|
||||||
->hiddenLabel()
|
->hiddenLabel()
|
||||||
->placeholder('Similar Past Matches')
|
->placeholder('Similar Past Matches')
|
||||||
->prefixIconColor('primary')
|
->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>') : '')
|
->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(
|
->prefixAction(
|
||||||
Action::make('iconInfo')
|
Action::make('iconInfo')
|
||||||
->icon('phosphor-question')
|
->icon('phosphor-question')
|
||||||
@@ -237,6 +225,29 @@ class Statistic extends BaseDashboard
|
|||||||
'notplayed' => 'Not Played',
|
'notplayed' => 'Not Played',
|
||||||
])
|
])
|
||||||
->live(),
|
->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')
|
Select::make('season')
|
||||||
->columns(2)
|
->columns(2)
|
||||||
->hiddenLabel()
|
->hiddenLabel()
|
||||||
@@ -282,21 +293,8 @@ class Statistic extends BaseDashboard
|
|||||||
->color('gray')
|
->color('gray')
|
||||||
->action(fn(Set $set) => $set('end_date', null))
|
->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
|
protected function tooltip_similar_past_matches(): HtmlString
|
||||||
|
|||||||
@@ -80,6 +80,9 @@ class AlarmBookmaker extends Component implements HasActions, HasSchemas, HasTab
|
|||||||
Filter::make('multiline_setting_id')
|
Filter::make('multiline_setting_id')
|
||||||
->schema([
|
->schema([
|
||||||
Radio::make('multiline_setting_id')
|
Radio::make('multiline_setting_id')
|
||||||
|
->extraAttributes([
|
||||||
|
'class' => 'radio-monitor-group'
|
||||||
|
])
|
||||||
->inline()
|
->inline()
|
||||||
->columnSpan(6)
|
->columnSpan(6)
|
||||||
->default(self::$default_filter)
|
->default(self::$default_filter)
|
||||||
|
|||||||
@@ -81,7 +81,10 @@ class MultilineBookmaker extends Component implements HasActions, HasSchemas, Ha
|
|||||||
Filter::make('multiline_setting_id')
|
Filter::make('multiline_setting_id')
|
||||||
->schema([
|
->schema([
|
||||||
Radio::make('multiline_setting_id')
|
Radio::make('multiline_setting_id')
|
||||||
->extraAttributes(['id' => 'multiline_setting'])
|
->extraAttributes([
|
||||||
|
'id' => 'multiline_setting',
|
||||||
|
'class' => 'radio-monitor-group'
|
||||||
|
])
|
||||||
->inline()
|
->inline()
|
||||||
->default(-1)
|
->default(-1)
|
||||||
->columnSpan(6)
|
->columnSpan(6)
|
||||||
|
|||||||
@@ -79,24 +79,35 @@ button[wire\:click="resetTableFiltersForm"] {
|
|||||||
|
|
||||||
/* Styling Radio Lable */
|
/* Styling Radio Lable */
|
||||||
|
|
||||||
.fi-fo-radio {
|
.radio-monitor-group {
|
||||||
@apply !grid grid-cols-3 gap-y-2 mb-2
|
@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 {
|
.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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input[type="radio"].fi-radio-input {
|
||||||
.fi-sc-component .fi-wi-stats-overview-stat {
|
@apply bg-none border-0
|
||||||
@apply bg-green-50 dark:bg-green-900 border border-green-300 dark:border-green-700
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* #mapper_right .fi-dropdown-list-item,
|
input[type="radio"].fi-radio-input {
|
||||||
#mapper_left .fi-dropdown-list-item {
|
&:checked {
|
||||||
padding: 2px;
|
@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
|
widget space to top menu
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in new issue
Block a user