This commit is contained in:
salam committed 2026-10-08 15:33:05 +02:00
1 parent 29018914d1
commit 8cb1d428cb
17 files changed
+214 -165

No files matched your search

@@ -14,7 +14,7 @@ class StatistikoConfigsTable
{
return $table
->columns([
TextColumn::make('group')->formatStateUsing(fn(string $state): string => match ($state) {
TextColumn::make('group')->formatStateUsing(fn (string $state): string => match ($state) {
'gls' => 'Goals',
'crn' => 'Corner',
'fls' => 'Fouls',
@@ -22,20 +22,28 @@ class StatistikoConfigsTable
'crd' => 'Cards',
'snt' => 'Shots On Target',
'tsh' => 'Total Shots',
'all' => 'Method B',
}),
TextColumn::make('team')->badge()
->color(fn(string $state): string => match ($state) {
->color(fn (string $state): string => match ($state) {
'home' => 'info',
'away' => 'warning',
}),
TextColumn::make('varname')
->formatStateUsing(fn(string $state): string => strtoupper($state)),
->formatStateUsing(fn (string $state): string => strtoupper($state)),
TextInputColumn::make('value')
->prefix('xx.x')
->type('number')
->rules(['required', 'decimal:0.1,10']),
])
->filters([
SelectFilter::make('type')
->label('Calculation')
->default('B')
->options([
'A' => 'Type A',
'B' => 'Type B',
]),
SelectFilter::make('group')
->options([
'gls' => 'Goals',
@@ -50,7 +58,7 @@ class StatistikoConfigsTable
->options([
'home' => 'Home',
'away' => 'Away',
])
]),
], layout: FiltersLayout::AboveContent)
->deferFilters(false);
}