diff --git a/app/Filament/Support/EditorialCatalog.php b/app/Filament/Support/EditorialCatalog.php index f764ea7..a01872a 100644 --- a/app/Filament/Support/EditorialCatalog.php +++ b/app/Filament/Support/EditorialCatalog.php @@ -761,13 +761,13 @@ public function statusChips(Composition $composition, bool $offered): array $chips[] = ['label' => 'Entwurf offen', 'tone' => 'yellow']; } - $chips[] = $stand['released_number'] !== null - ? ['label' => 'In der Mitgliederbibliothek', 'tone' => 'pine'] - : ['label' => 'Nicht in der Mitgliederbibliothek', 'tone' => 'quiet']; - - if ($stand['released_number'] !== null && $stand['released_number'] !== $stand['number']) { - $chips[] = ['label' => 'Bibliothek zeigt Fassung '.$stand['released_number'], 'tone' => 'pine']; - } + // Zeigt die Bibliothek eine ältere Fassung, nennt der Chip sie; „In der Mitgliederbibliothek“ neben + // „Fassung 2“ läse sich sonst, als wäre Fassung 2 sichtbar. + $chips[] = match (true) { + $stand['released_number'] === null => ['label' => 'Nicht in der Mitgliederbibliothek', 'tone' => 'quiet'], + $stand['released_number'] === $stand['number'] => ['label' => 'In der Mitgliederbibliothek', 'tone' => 'pine'], + default => ['label' => 'Bibliothek zeigt Fassung '.$stand['released_number'], 'tone' => 'pine'], + }; } $chips[] = ['label' => 'Nicht auf der Website', 'tone' => 'quiet']; diff --git a/resources/views/filament/verwaltung/aufbau.blade.php b/resources/views/filament/verwaltung/aufbau.blade.php index 44eab10..1ceec18 100644 --- a/resources/views/filament/verwaltung/aufbau.blade.php +++ b/resources/views/filament/verwaltung/aufbau.blade.php @@ -110,7 +110,7 @@
Verwendung {{ $ort }} „{{ trim($this->displayTitle) !== '' ? $this->displayTitle : $this->designation }}“ · Stelle {{ $auswahl + 1 }}