wip fix
This commit is contained in:
1 parent
9bcd4432c6
commit
6f92f9e1d5
1209 files changed
+220940
No files matched your search
+57
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Clusters\StaticData\Resources\StatistikoConfigs\Tables;
|
||||
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Tables\Columns\TextInputColumn;
|
||||
use Filament\Tables\Enums\FiltersLayout;
|
||||
use Filament\Tables\Filters\SelectFilter;
|
||||
use Filament\Tables\Table;
|
||||
|
||||
class StatistikoConfigsTable
|
||||
{
|
||||
public static function configure(Table $table): Table
|
||||
{
|
||||
return $table
|
||||
->columns([
|
||||
TextColumn::make('group')->formatStateUsing(fn(string $state): string => match ($state) {
|
||||
'gls' => 'Goals',
|
||||
'crn' => 'Corner',
|
||||
'fls' => 'Fouls',
|
||||
'ofs' => 'Offside',
|
||||
'crd' => 'Cards',
|
||||
'snt' => 'Shots On Target',
|
||||
'tsh' => 'Total Shots',
|
||||
}),
|
||||
TextColumn::make('team')->badge()
|
||||
->color(fn(string $state): string => match ($state) {
|
||||
'home' => 'info',
|
||||
'away' => 'warning',
|
||||
}),
|
||||
TextColumn::make('varname')
|
||||
->formatStateUsing(fn(string $state): string => strtoupper($state)),
|
||||
TextInputColumn::make('value')
|
||||
->prefix('xx.x')
|
||||
->type('number')
|
||||
->rules(['required', 'decimal:0.1,10']),
|
||||
])
|
||||
->filters([
|
||||
SelectFilter::make('group')
|
||||
->options([
|
||||
'gls' => 'Goals',
|
||||
'crn' => 'Corner',
|
||||
'fls' => 'Fouls Commited',
|
||||
'ofs' => 'Offside',
|
||||
'crd' => 'Cards',
|
||||
'snt' => 'Shots On Target',
|
||||
'tsh' => 'Total Shots',
|
||||
]),
|
||||
SelectFilter::make('team')
|
||||
->options([
|
||||
'home' => 'Home',
|
||||
'away' => 'Away',
|
||||
])
|
||||
], layout: FiltersLayout::AboveContent)
|
||||
->deferFilters(false);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user