Wohnungsumschalter im Verwaltungsmenue und wohnungsbezogene Listen

Oben im Seitenmenue waehlt man die Wohnung; Listen, neue Eintraege, Belegungsplan
und Preise & Angebote folgen ihr. Ein geoeffneter Eintrag einer anderen Wohnung
schaltet auf diese um. Galerie und Ersatz-Titelbild der Website zeigen nur Fotos
der Wohnung des Bausteins und Fotos ohne Wohnung.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
LarsandClaude Opus 5.5 committed 2026-10-29 18:40:13 +01:00
1 parent e74033a958
commit 8bcda9a4bc
37 files changed
+520 -35

No files matched your search

+3 -1
View File
@@ -51,7 +51,9 @@ public static function photoSlots(): array
public function data(Theme $theme, array $data): array
{
$fallback = isset($data['photo_id']) ? Photo::find($data['photo_id']) : Photo::query()->published()->first();
$fallback = isset($data['photo_id'])
? Photo::find($data['photo_id'])
: Photo::query()->published()->when($theme->property(), fn ($query, $property) => $query->whereBelongsTo($property))->first() ?? Photo::query()->published()->first();
$featuredOffer = ($data['show_offer'] ?? true) && $theme->property()
? app(OfferShowcase::class)->current($theme->property(), limit: 1, featuredOnly: true)->first()
: null;