Files
fewo-stommer/resources/views/livewire/booking-request.blade.php
T
Lars StommerandClaude Opus 5.5 66e82d61f5 Theme-System mit Basis-Theme Ostsee-Licht, Bausteinen und saisonalen Erscheinungsbildern
- Sites (Domain, Theme, Farben; mehrfähig für weitere Vermieter), Seiten aus Bausteinen mit Menüs, Erscheinungsbilder mit jährlichem Zeitplan, Priorität und signierter Vorschau
- Theme-Kern (app/Themes): Manifest, Registry, Vererbung (Child-Themes), Token-Farben als CSS-Variablen, Bausteinkatalog als Registry (config/themes.php)
- 15 Bausteine: Titelbereich mit Suche, Eckdaten, Text mit Bildern, Galerie, Ausstattung, Lage, Preise, Angebote, Kalender & Anfrage, Bewertungen, Gastgeber, FAQ, Abschluss, Kontakt, Fließtext
- Theme Ostsee-Licht: Layout, Kopf/Fuß, Banner, mobile Buchungsleiste, Lightbox, selbst gehostete Schriften, Reduced Motion
- Seiten Start, Wohnung, Kühlungsborn, Preise & Buchung, Kontakt, Impressum, Datenschutz; Sitemap, robots.txt, JSON-LD
- Admin: Seiten-Baukasten, Erscheinungsbilder, Websites
- Dokumentation docs/THEMES.md inkl. Übergabe für die Design-Sitzung

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 15:04:21 +02:00

227 lines
16 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<div>
@if ($booking)
<div class="rounded border border-emerald-200 bg-emerald-50 p-8" role="status">
<h2 class="text-2xl font-semibold text-emerald-900">Vielen Dank, {{ $booking->guest->first_name }}!</h2>
<p class="mt-3 text-emerald-900">
Ihre Anfrage <strong>{{ $booking->reference }}</strong> ist eingegangen. Wir haben den Zeitraum
<strong>{{ $booking->arrival->format('d.m.Y') }} – {{ $booking->departure->format('d.m.Y') }}</strong>
bis <strong>{{ $booking->hold_expires_at->format('d.m.Y, H:i') }} Uhr</strong> für Sie vorgemerkt.
</p>
<p class="mt-2 text-emerald-900">Eine Bestätigung mit allen Details haben wir an {{ $booking->guest->email }} gesendet.</p>
</div>
@else
<div class="grid gap-8 lg:grid-cols-5">
{{-- Calendar --}}
<section class="lg:col-span-3" aria-labelledby="calendar-heading">
<div class="rounded border border-line bg-surface p-5">
<div class="flex items-center justify-between">
<h2 id="calendar-heading" class="text-lg font-semibold text-ink">Belegung</h2>
<div class="flex gap-2">
<button type="button" wire:click="previousMonth" class="rounded-lg border border-line px-3 py-1.5 text-sm hover:bg-accent/10" aria-label="Vorheriger Monat">‹</button>
<button type="button" wire:click="nextMonth" class="rounded-lg border border-line px-3 py-1.5 text-sm hover:bg-accent/10" aria-label="Nächster Monat">›</button>
</div>
</div>
<div class="mt-4 grid gap-6 sm:grid-cols-2">
@foreach ($this->calendar as $month)
<div wire:key="month-{{ $month['label'] }}">
<h3 class="mb-2 text-center text-sm font-semibold text-ink">{{ $month['label'] }}</h3>
<table class="w-full table-fixed text-center text-sm">
<thead>
<tr class="text-xs text-muted">
@foreach (['Mo', 'Di', 'Mi', 'Do', 'Fr', 'Sa', 'So'] as $weekday)
<th scope="col" class="pb-1 font-medium">{{ $weekday }}</th>
@endforeach
</tr>
</thead>
<tbody>
@foreach ($month['weeks'] as $week)
<tr>
@foreach (array_pad($week, 7, null) as $day)
<td class="p-0.5">
@if ($day)
<button type="button"
wire:click="selectDate('{{ $day['date'] }}')"
@disabled($day['past'])
aria-pressed="{{ $day['selected'] ? 'true' : 'false' }}"
aria-label="{{ \Carbon\CarbonImmutable::parse($day['date'])->translatedFormat('l, d. F Y') }}{{ $day['free'] ? '' : ' (Nacht belegt)' }}"
@class([
'aspect-square w-full rounded-lg text-sm transition',
'cursor-not-allowed text-muted/40' => $day['past'],
'bg-accent font-semibold text-accent-ink' => $day['selected'],
'bg-accent/15 text-ink' => $day['inRange'] && ! $day['selected'],
'bg-rose-100 text-rose-800 line-through decoration-rose-300' => ! $day['free'] && ! $day['past'] && ! $day['selected'],
'hover:bg-accent/10' => $day['free'] && ! $day['past'] && ! $day['selected'] && ! $day['inRange'],
])>
{{ $day['day'] }}
</button>
@endif
</td>
@endforeach
</tr>
@endforeach
</tbody>
</table>
</div>
@endforeach
</div>
<div class="mt-4 flex flex-wrap gap-4 text-xs text-muted">
<span class="flex items-center gap-1.5"><span class="inline-block size-3 rounded bg-surface ring-1 ring-line"></span> frei</span>
<span class="flex items-center gap-1.5"><span class="inline-block size-3 rounded bg-rose-100"></span> Nacht belegt (Abreise möglich)</span>
<span class="flex items-center gap-1.5"><span class="inline-block size-3 rounded bg-accent"></span> Ihre Auswahl</span>
</div>
</div>
<div class="mt-4 grid gap-4 sm:grid-cols-3">
<label class="block text-sm">
<span class="font-medium text-ink">Anreise</span>
<input type="date" wire:model.live="arrival" min="{{ today()->toDateString() }}" class="mt-1 w-full rounded-lg border-line">
</label>
<label class="block text-sm">
<span class="font-medium text-ink">Abreise</span>
<input type="date" wire:model.live="departure" min="{{ $arrival ?? today()->toDateString() }}" class="mt-1 w-full rounded-lg border-line">
</label>
<label class="block text-sm">
<span class="font-medium text-ink">Personen</span>
<select wire:model.live="guests" class="mt-1 w-full rounded-lg border-line">
@for ($count = 1; $count <= $this->property->max_guests; $count++)
<option value="{{ $count }}">{{ $count }}</option>
@endfor
</select>
</label>
</div>
@error('arrival') <p class="mt-2 text-sm text-rose-700" role="alert">{{ $message }}</p> @enderror
@error('departure') <p class="mt-2 text-sm text-rose-700" role="alert">{{ $message }}</p> @enderror
</section>
{{-- Price and form --}}
<section class="lg:col-span-2" aria-labelledby="price-heading">
<div class="rounded border border-line bg-surface p-5" aria-live="polite">
<h2 id="price-heading" class="text-lg font-semibold text-ink">Ihr Preis</h2>
@php($pricing = $this->pricing)
@if ($pricing['error'])
<p class="mt-3 rounded-lg bg-amber-50 p-3 text-sm text-amber-900">{{ $pricing['error'] }}</p>
@elseif ($pricing['quote'])
@php($quote = $pricing['quote'])
<p class="mt-1 text-sm text-muted">
{{ $quote->arrival->format('d.m.Y') }} – {{ $quote->departure->format('d.m.Y') }} · {{ $quote->nights() }} Nächte · {{ $quote->guests }} {{ $quote->guests === 1 ? 'Person' : 'Personen' }}
<button type="button" wire:click="clearDates" class="ml-1 underline">ändern</button>
</p>
<dl class="mt-4 space-y-1.5 text-sm">
@foreach ($quote->lines as $line)
<div @class(['flex justify-between gap-4', 'text-emerald-700 font-medium' => $line->amount < 0])>
<dt>{{ $line->label }}</dt>
<dd class="tabular-nums">{{ \App\Support\Money::format($line->amount) }}</dd>
</div>
@endforeach
<div class="flex justify-between gap-4 border-t border-line pt-2 text-base font-semibold text-ink">
<dt>Gesamtpreis</dt>
<dd class="tabular-nums">{{ \App\Support\Money::format($quote->total()) }}</dd>
</div>
</dl>
<p class="mt-2 text-xs text-muted">
Anzahlung {{ \App\Support\Money::format($quote->deposit()) }}, Rest bis {{ $quote->balanceDueOn->format('d.m.Y') }}. Kurtaxe wird vor Ort berechnet.
</p>
@if ($quote->promoCodeApplied === false)
<p class="mt-2 text-sm text-amber-800">Der Aktionscode ist für diesen Zeitraum nicht gültig.</p>
@endif
@else
<p class="mt-3 text-sm text-muted">Bitte wählen Sie im Kalender Anreise und Abreise.</p>
@endif
@if ($this->availableExtras->isNotEmpty())
<fieldset class="mt-5 border-t border-line pt-4">
<legend class="text-sm font-medium text-ink">Zusatzleistungen</legend>
<div class="mt-2 space-y-2">
@foreach ($this->availableExtras as $extra)
<label class="flex items-center justify-between gap-3 text-sm" wire:key="extra-{{ $extra->id }}">
<span>
{{ $extra->name }} <span class="text-muted">({{ \App\Support\Money::format($extra->price) }})</span>
@if ($extra->description)<br><span class="text-xs text-muted">{{ $extra->description }}</span>@endif
</span>
<select wire:model.live="extras.{{ $extra->id }}" class="w-20 rounded-lg border-line text-sm">
@for ($quantity = 0; $quantity <= $this->property->max_guests; $quantity++)
<option value="{{ $quantity }}">{{ $quantity }}</option>
@endfor
</select>
</label>
@endforeach
</div>
</fieldset>
@endif
<label class="mt-4 block text-sm">
<span class="font-medium text-ink">Aktionscode</span>
<input type="text" wire:model.live.debounce.600ms="promoCode" autocomplete="off" class="mt-1 w-full rounded-lg border-line">
</label>
</div>
<form wire:submit="submit" class="mt-6 rounded border border-line bg-surface p-5" novalidate>
<h2 class="text-lg font-semibold text-ink">Unverbindlich anfragen</h2>
<div class="mt-4 grid gap-4 sm:grid-cols-2">
@foreach ([
['firstName', 'Vorname', 'text', 'given-name', true],
['lastName', 'Nachname', 'text', 'family-name', true],
['email', 'E-Mail', 'email', 'email', true],
['phone', 'Telefon', 'tel', 'tel', false],
['street', 'Straße & Hausnr.', 'text', 'street-address', false],
['postalCode', 'PLZ', 'text', 'postal-code', false],
['city', 'Ort', 'text', 'address-level2', false],
] as [$field, $label, $type, $autocomplete, $required])
<label class="block text-sm" wire:key="field-{{ $field }}">
<span class="font-medium text-ink">{{ $label }}@if ($required)<span class="text-rose-600" aria-hidden="true"> *</span>@endif</span>
<input type="{{ $type }}" wire:model="{{ $field }}" autocomplete="{{ $autocomplete }}" @required($required)
@error($field) aria-invalid="true" aria-describedby="{{ $field }}-error" @enderror
class="mt-1 w-full rounded-lg border-line">
@error($field) <span id="{{ $field }}-error" class="mt-1 block text-xs text-rose-700">{{ $message }}</span> @enderror
</label>
@endforeach
</div>
<label class="mt-4 block text-sm">
<span class="font-medium text-ink">Wie sind Sie auf uns aufmerksam geworden?</span>
<select wire:model="referralSource" class="mt-1 w-full rounded-lg border-line">
<option value="">Bitte wählen (optional)</option>
@foreach (\App\Enums\ReferralSource::cases() as $source)
<option value="{{ $source->value }}">{{ $source->getLabel() }}</option>
@endforeach
</select>
</label>
<label class="mt-4 block text-sm">
<span class="font-medium text-ink">Nachricht</span>
<textarea wire:model="message" rows="3" class="mt-1 w-full rounded-lg border-line"></textarea>
</label>
<div class="hidden" aria-hidden="true">
<label>Website <input type="text" wire:model="website" tabindex="-1" autocomplete="off"></label>
</div>
<label class="mt-4 flex items-start gap-2 text-sm">
<input type="checkbox" wire:model="privacyAccepted" class="mt-0.5 rounded border-line">
<span>Ich bin einverstanden, dass meine Angaben zur Bearbeitung der Anfrage gespeichert werden (siehe Datenschutzerklärung).<span class="text-rose-600" aria-hidden="true"> *</span></span>
</label>
@error('privacyAccepted') <p class="mt-1 text-xs text-rose-700">{{ $message }}</p> @enderror
<label class="mt-3 flex items-start gap-2 text-sm text-muted">
<input type="checkbox" wire:model="marketingOptIn" class="mt-0.5 rounded border-line">
<span>Ja, informieren Sie mich gelegentlich per E-Mail über freie Termine und Angebote (optional, jederzeit abbestellbar).</span>
</label>
<button type="submit"
@disabled(! $pricing['quote'])
wire:loading.attr="disabled"
class="mt-5 w-full rounded-xl bg-accent px-4 py-3 font-semibold text-accent-ink transition hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50">
<span wire:loading.remove wire:target="submit">Termin vormerken &amp; Angebot erhalten</span>
<span wire:loading wire:target="submit">Wird gesendet …</span>
</button>
<p class="mt-2 text-center text-xs text-muted">Kostenlos und unverbindlich. Verbindlich wird die Buchung erst mit unserer Bestätigung.</p>
</form>
</section>
</div>
@endif
</div>