wip
This commit is contained in:
1 parent
23cf804865
commit
4e77862aa7
14 files changed
+113
-49
No files matched your search
@@ -9,6 +9,7 @@ use Filament\Actions\Contracts\HasActions;
|
||||
use Filament\Forms\Components\Radio;
|
||||
use Filament\Schemas\Concerns\InteractsWithSchemas;
|
||||
use Filament\Schemas\Contracts\HasSchemas;
|
||||
use Filament\Support\Enums\FontWeight;
|
||||
use Filament\Tables\Columns\IconColumn;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Tables\Columns\TextInputColumn;
|
||||
@@ -56,19 +57,15 @@ class AlarmBookmaker extends Component implements HasActions, HasSchemas, HasTab
|
||||
// ->icon(function ($record): string {
|
||||
// return $record->sport->icon;
|
||||
// })
|
||||
// ->color(fn ($record): string => match ($record->level_id) {
|
||||
// ->color(fn ($record): string => match ($record->alarm_level_id) {
|
||||
// 1 => 'success',
|
||||
// 2 => 'warning',
|
||||
// 3 => 'danger',
|
||||
// }),
|
||||
// TextColumn::make('sport.name'),
|
||||
TextColumn::make('name')
|
||||
->badge()
|
||||
->color(fn ($record): string => match ($record->level_id) {
|
||||
1 => 'info',
|
||||
2 => 'warning',
|
||||
3 => 'danger',
|
||||
}),
|
||||
TextColumn::make('alarm_level.name')
|
||||
->color(fn ($record) => $record->alarm_level->color)
|
||||
->weight(FontWeight::Black),
|
||||
TextInputColumn::make('alarm_threshold')
|
||||
->tooltip('Between 0.01 - 2.00')
|
||||
->width('2rem')
|
||||
@@ -77,7 +74,7 @@ class AlarmBookmaker extends Component implements HasActions, HasSchemas, HasTab
|
||||
TextColumn::make('multiline_setting.name')->label('Bettype'),
|
||||
ToggleColumn::make('disabled'),
|
||||
])
|
||||
->defaultSort('level_id')
|
||||
->defaultSort('alarm_level_id')
|
||||
->deferFilters(false)
|
||||
->filters([
|
||||
Filter::make('multiline_setting_id')
|
||||
|
||||
Reference in new issue
Block a user