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:
1 parent
e74033a958
commit
8bcda9a4bc
37 files changed
+520
-35
No files matched your search
@@ -28,13 +28,6 @@
|
||||
@php($calendar = $this->calendar)
|
||||
<div class="occupancy-plan">
|
||||
<div class="occupancy-controls">
|
||||
<label>Wohnung
|
||||
<select wire:model.live="propertyId">
|
||||
@foreach (\App\Models\Property::query()->orderBy('name')->get() as $property)
|
||||
<option value="{{ $property->id }}">{{ $property->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</label>
|
||||
<label>Monat <input type="month" wire:model.live="month" required></label>
|
||||
<x-filament::button wire:click="moveMonth(-1)" color="gray" aria-label="Vorheriger Monat">← Zurück</x-filament::button>
|
||||
<x-filament::button wire:click="moveMonth(1)" color="gray" aria-label="Nächster Monat">Weiter →</x-filament::button>
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
@php
|
||||
/** Apartment switcher at the top of the admin menu (App\Support\CurrentProperty). */
|
||||
$current = app(\App\Support\CurrentProperty::class);
|
||||
$property = $current->get();
|
||||
@endphp
|
||||
@if ($property)
|
||||
<div class="fi-property-switcher" style="margin-bottom:1rem">
|
||||
<x-filament::section compact icon="heroicon-o-home-modern" heading="Wohnung">
|
||||
@if ($current->hasChoice())
|
||||
<form method="POST" action="{{ route('filament.admin.switch-property') }}">
|
||||
@csrf
|
||||
<input type="hidden" name="return" value="{{ request()->fullUrl() }}">
|
||||
<x-filament::input.wrapper>
|
||||
<x-filament::input.select name="property" aria-label="Wohnung wählen" x-data x-on:change="$el.form.submit()">
|
||||
@foreach ($current->options() as $id => $name)
|
||||
<option value="{{ $id }}" @selected($id === $property->id)>{{ $name }}</option>
|
||||
@endforeach
|
||||
</x-filament::input.select>
|
||||
</x-filament::input.wrapper>
|
||||
<noscript><x-filament::button type="submit" size="sm" style="margin-top:.5rem">Wechseln</x-filament::button></noscript>
|
||||
</form>
|
||||
@else
|
||||
<p style="font-weight:600">{{ $property->name }}</p>
|
||||
@endif
|
||||
@can('update', $property)
|
||||
<x-filament::link :href="\App\Filament\Resources\Properties\PropertyResource::getUrl('edit', ['record' => $property])" size="sm" style="margin-top:.5rem">
|
||||
Einstellungen der Wohnung
|
||||
</x-filament::link>
|
||||
@endcan
|
||||
</x-filament::section>
|
||||
</div>
|
||||
@endif
|
||||
Reference in new issue
Block a user