Mache den Aufbau von Modulen und Programmen im Arbeitsplatz bedienbar.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
30833f62a1
commit
a7feef2cd2
15 files changed
+2068
-328
No files matched your search
@@ -5,6 +5,7 @@
|
||||
use App\Domain\Catalog\Composition;
|
||||
use App\Domain\Catalog\CompositionKind;
|
||||
use App\Filament\Resources\ContentElements\ContentElementResource;
|
||||
use App\Filament\Support\EditorialCatalog;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
@@ -41,13 +42,20 @@ public static function form(Schema $schema): Schema
|
||||
public static function table(Table $table): Table
|
||||
{
|
||||
return $table->columns([
|
||||
TextColumn::make('designation')->label('Bezeichnung')->searchable(),
|
||||
TextColumn::make('designation')
|
||||
->label('Name')
|
||||
->formatStateUsing(fn (Composition $record): string => app(EditorialCatalog::class)->compositionTitle($record))
|
||||
->description(fn (Composition $record): ?string => filled($record->display_title) && $record->display_title !== $record->designation ? $record->designation : null)
|
||||
->searchable(['designation', 'display_title', 'summary']),
|
||||
TextColumn::make('stand')
|
||||
->label('Stand')
|
||||
->state(fn (Composition $record): string => app(EditorialCatalog::class)->stand($record)['text']),
|
||||
TextColumn::make('versions_count')->counts('versions')->label('Fassungen'),
|
||||
]);
|
||||
}
|
||||
|
||||
public static function getEloquentQuery(): Builder
|
||||
{
|
||||
return parent::getEloquentQuery()->where('kind', static::kind());
|
||||
return parent::getEloquentQuery()->where('kind', static::kind())->with('versions');
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user