Erkläre bei der Produktseiten-Zuordnung, warum ein Modul oder Lizenzartikel keine eigene Seite bekommt
CI Feature / test (push) Successful in 4m11s
Deploy Test / test (push) Successful in 3m55s
Deploy Test / deploy (push) Successful in 33s

Die Auswahl nennt je Eintrag, ob der Shop die Seite zeigen kann (Programm mit Anzeigefreigabe),
und die Fehlermeldung zur eigenen Paketseite nennt den Weg über Pakete oder ein Programm.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
LarsandClaude Sonnet 5.5 committed 2026-11-25 16:30:32 +01:00
1 parent 9041afda80
commit 1950dc377b
4 files changed
+51 -5

No files matched your search

@@ -286,20 +286,32 @@ private function productPages(): array
{
$catalog = app(PublicCatalogReader::class);
return [self::OWN_BUNDLE_PAGE => 'Eigene Paketseite · zeigt den Umfang des Pakets (nur für ein Angebot aus genau einer Paketfassung)'] + Composition::query()
return [self::OWN_BUNDLE_PAGE => 'Eigene Paketseite · nur für ein Angebot aus genau einer Paketfassung (Katalog → Pakete), nicht für einen Lizenzartikel'] + Composition::query()
->with('editorialContentKind')
->whereNull('archived_at')
->orderBy('designation')
->get()
->sortBy(fn (Composition $composition): int => $catalog->shownVersion($composition) !== null ? 0 : 1)
->sortBy(fn (Composition $composition): int => $catalog->shownVersion($composition) !== null ? 0 : (in_array($composition->editorialContentKind?->slug, PublicCatalogReader::PUBLIC_KINDS, true) ? 1 : 2))
->mapWithKeys(fn (Composition $composition): array => [
$composition->id => ($composition->display_title ?: $composition->designation)
.' ('.($composition->editorialContentKind?->label ?? 'Zusammenstellung').')'
.($catalog->shownVersion($composition) !== null ? ' · im Shop auffindbar' : ' · nicht öffentlich, im Shop nicht auffindbar'),
.self::pageHint($catalog, $composition),
])
->all();
}
/** Sagt bei jeder Auswahl, ob die Seite im Shop auffindbar ist und was fehlt, wenn nicht. */
private static function pageHint(PublicCatalogReader $catalog, Composition $composition): string
{
if ($catalog->shownVersion($composition) !== null) {
return ' · im Shop auffindbar';
}
return in_array($composition->editorialContentKind?->slug, PublicCatalogReader::PUBLIC_KINDS, true)
? ' · noch nicht zur Anzeige freigegeben, im Shop nicht auffindbar'
: ' · kein Programm, im Shop nicht auffindbar (der Shop zeigt nur Programme)';
}
/**
* Vorbelegung aus der aktiven Fassung; ohne aktive Fassung eine leere Position.
*