InhaltsverzeichnisTable
This commit is contained in:
1 parent
b0443b583d
commit
edc3543ff1
25 files changed
+616
-3
No files matched your search
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Inhaltsverzeichnis\Tables;
|
||||
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Tables\Table;
|
||||
|
||||
class InhaltsverzeichnisTable
|
||||
{
|
||||
public static function configure(Table $table): Table
|
||||
{
|
||||
return $table
|
||||
->columns([
|
||||
// TextColumn::make('sort'),
|
||||
TextColumn::make('ordnungszahl')
|
||||
->getStateUsing(fn ($record): string => $record->ordnungszahl == '0' ? '' : number_format($record->ordnungszahl, 2)),
|
||||
TextColumn::make('text'),
|
||||
TextColumn::make('seite')
|
||||
->alignCenter()
|
||||
->badge()
|
||||
->color('info')
|
||||
->getStateUsing(fn ($record): string => $record->seite == '0' ? '...' : $record->seite),
|
||||
])
|
||||
->reorderable('sort')
|
||||
->recordActions([
|
||||
EditAction::make()->iconButton()->color('gray'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user