inhaltsangabe wip
This commit is contained in:
1 parent
8ccc4a3c20
commit
3a35ccd69d
34 files changed
+281
-236
No files matched your search
@@ -2,8 +2,10 @@
|
||||
|
||||
namespace App\Filament\Resources\Inhaltsverzeichnis\Tables;
|
||||
|
||||
use Filament\Actions\DeleteAction;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Tables\Columns\ToggleColumn;
|
||||
use Filament\Tables\Table;
|
||||
|
||||
class InhaltsverzeichnisTable
|
||||
@@ -11,21 +13,34 @@ class InhaltsverzeichnisTable
|
||||
public static function configure(Table $table): Table
|
||||
{
|
||||
return $table
|
||||
->heading('Inhaltsverzeichnis')
|
||||
->description('Wird als Vorlage bei den Gutachten verwendet.')
|
||||
->columns([
|
||||
// TextColumn::make('sort'),
|
||||
TextColumn::make('ordnungszahl')
|
||||
->label('Index')
|
||||
->getStateUsing(fn ($record): string => $record->ordnungszahl == '0' ? '' : number_format($record->ordnungszahl, 2)),
|
||||
TextColumn::make('name')
|
||||
->description(fn ($record): string => $record->textblock_kennungs->name ?? ''),
|
||||
->label('Überschrift')
|
||||
->wrap()
|
||||
->description(fn ($record): string => $record->textblock_kennungs->name ?? '')
|
||||
->color(fn ($record): string => match ($record->ueberschrift_nicht_anzeigen) {
|
||||
1 => 'primary',
|
||||
default => 'gray',
|
||||
}),
|
||||
// ToggleColumn::make('ueberschrift_anzeigen')->label('')->tooltip('Überschrift im PDF anzeigen'),
|
||||
TextColumn::make('tabellen.name')->wrap(),
|
||||
TextColumn::make('textblock.name')->wrap(),
|
||||
TextColumn::make('seite')
|
||||
->alignCenter()
|
||||
->badge()
|
||||
->color('info')
|
||||
->getStateUsing(fn ($record): string => $record->seite == '0' ? '...' : $record->seite),
|
||||
])
|
||||
->defaultSort('sort', direction: 'asc')
|
||||
->reorderable('sort')
|
||||
->recordActions([
|
||||
EditAction::make()->iconButton()->color('gray'),
|
||||
DeleteAction::make()->iconButton(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user