Führe die gemeinsame Bestandsliste für Arbeitsplatz, Module, Programme und Medien ein.
CI Feature / test (push) Successful in 59s
Deploy Test / test (push) Successful in 54s
Deploy Test / deploy (push) Successful in 23s

Dokument 14 §3 und §9: eine gepflegte Liste statt Kartenwand, Filterwand und
Filament-Tabellen.

- Gemeinsamer Eintrag x-vw.eintrag (Vorschau, Titel, Typzeile), genutzt vom
  Picker und von allen Listen.
- Ansicht verwaltung/bestand mit Trait ShowsBestand: Suche, wenige sichtbare
  Filter, „Weitere Filter“, aktive Filter als entfernbare Chips mit „Alle
  zurücksetzen“, Trefferzahl, Zeilen mit Zustand und benannten Aktionen,
  Kacheln als Option, „Weitere anzeigen“ in Schritten von 50, Leerzustand und
  eigener Dialogbereich (sonst öffnen „… anlegen“-Dialoge nicht).
- Arbeitsplatz, „Module“ und „Programme“ zeigen dieselben Zeilen
  (ListsCompositions); die Listen mit festem Typ. Ein Anlegedialog für Module
  und Programme statt Inline-Feldern und eines zweiten Filament-Dialogs; die
  Anlage nutzt wie bisher EditorialCatalog::create.
- Medien: Suche, Technische Art, Freigabe und Verwendung sichtbar, die übrigen
  acht Filter unter „Weitere Filter“; alle Adressnamen bleiben. Grundansicht ist
  jetzt die Liste (Dokument 14: kompakte Listen), Kacheln bleiben wählbar.
- Hauptknöpfe im Filament-Seitenkopf im Verwaltungsgrün.
- Entfernt: media/library, media/card, media/mark (ersetzt).

Tests bewusst angepasst: Die Medienliste öffnet als Liste; das Ersatzsymbol
nennt die Art über data-symbol.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
LarsandClaude Opus 5.5 committed 2026-11-20 08:20:57 +01:00
1 parent f846c0b2ee
commit 532979aa86
19 files changed
+948 -557

No files matched your search

@@ -4,38 +4,68 @@
use App\Domain\Catalog\CompositionKind;
use App\Domain\Catalog\ContentService;
use App\Domain\Catalog\EditorialContentKind;
use App\Filament\Resources\ContentElements\ContentElementResource;
use App\Filament\Support\ListsCompositions;
use App\Filament\Support\ReportsDomainRules;
use Filament\Actions\Action;
use Filament\Forms\Components\TextInput;
use Filament\Resources\Pages\ListRecords;
use Filament\Schemas\Components\View;
use Filament\Schemas\Schema;
use Filament\Support\Enums\Width;
use Illuminate\Contracts\Support\Htmlable;
/**
* Listen „Module“ und „Programme“: dieselbe Bestandsliste wie der Arbeitsplatz, mit festem Typ. Fachliche
* Kombinationen behalten vorerst ihre Tabelle (Teil B, Abschnitt 3).
*/
abstract class ListCompositionKind extends ListRecords
{
use ListsCompositions;
use ReportsDomainRules;
abstract protected function kind(): CompositionKind;
protected function fixedKind(): ?CompositionKind
{
return $this->kind();
}
private function usesBestand(): bool
{
return in_array($this->kind(), [CompositionKind::Kurs, CompositionKind::Uebung], true);
}
public function getSubheading(): string|Htmlable|null
{
$desk = in_array($this->kind(), [CompositionKind::Kurs, CompositionKind::Uebung], true)
? ' Programme und Module liegen gemeinsam auf dem Arbeitsplatz.'
: '';
$desk = $this->usesBestand() ? ' Programme und Module stehen gemeinsam auch auf dem Arbeitsplatz.' : '';
return $this->kind()->deskExplanation().$desk;
}
public function getMaxContentWidth(): Width|string|null
{
return $this->usesBestand() ? Width::Full : parent::getMaxContentWidth();
}
public function content(Schema $schema): Schema
{
if (! $this->usesBestand()) {
return parent::content($schema);
}
return $schema->components([View::make('filament.verwaltung.bestand')]);
}
protected function getHeaderActions(): array
{
if ($this->usesBestand()) {
return [$this->createCompositionAction($this->kind())];
}
return [
Action::make('create')
->label(match ($this->kind()) {
CompositionKind::Kurs => 'Programm anlegen',
CompositionKind::Uebung => 'Modul anlegen',
default => $this->kind()->createLabel(),
})
->label($this->kind()->createLabel())
->visible(fn (): bool => ContentElementResource::editor())
->schema([
TextInput::make('designation')->label('Bezeichnung')->required(),
@@ -44,16 +74,6 @@ protected function getHeaderActions(): array
$composition = null;
$this->report(function () use ($data, &$composition): void {
$composition = app(ContentService::class)->createComposition($data['designation'], $this->kind());
$slug = match ($this->kind()) {
CompositionKind::Kurs => 'programm',
CompositionKind::Uebung => 'modul',
default => null,
};
$editorial = $slug === null ? null : EditorialContentKind::query()->where('slug', $slug)->first();
if ($editorial !== null) {
$composition->editorial_content_kind_id = $editorial->id;
$composition->save();
}
}, $this->kind()->label().' ist angelegt.');
if ($composition !== null) {