Booking path 1 (offer + guest acceptance), 2FA for all, privacy hardening, brand graphics in theme

- Offer workflow: "Angebot senden" in the admin (dates, guests, promo code, manual price adjustment,
  validity from the property's hold time, message, guest data for the contract) with live price;
  contract draft PDF; signed, versioned offer page for the guest to accept (acceptance record without
  IP) or decline; expiry job, landlord notifications, editable offer texts, wording on the website.
- 2FA is mandatory for every admin account.
- Privacy: complete anonymisation (notes, attribution, review names, offer messages), shorter
  periods for unbinding requests, portal mail excerpts and attribution (configurable proposals),
  iCal summary not stored, known e-mail no longer overwrites guest data, security headers, bearer
  tokens for automations, metadata stripped from photo originals, review link throttled.
- Daily database backup (backup:database) and scripts/backup-pull.sh for the NAS.
- Theme: brand mark in header/footer, favicon/touch icon, wave divider, icons, illustration as
  image placeholder; navy follows the text colour for dark appearances.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Lars StommerandClaude Opus 5.5 committed 2026-10-22 21:38:22 +02:00
1 parent 82698f8eda
commit 4f69b426a4
77 files changed
+1658 -108

No files matched your search

+93
View File
@@ -0,0 +1,93 @@
@php($money = fn (int $cents): string => \App\Support\Money::format($cents))
@extends('theme::layouts.app', ['title' => 'Ihr Angebot'])
@push('head')
<meta name="robots" content="noindex">
@endpush
@section('content')
<div class="mx-auto max-w-3xl px-4 py-14 sm:px-8">
<p class="eyebrow">Angebot {{ $booking->reference }}</p>
<h1 class="heading-display">{{ $booking->property->name }}</h1>
<p class="mt-2 text-muted">für {{ $booking->guest->full_name }}</p>
@if (session('offer.success'))
<div class="mt-8 rounded border border-accent bg-surface p-5" role="status">{{ session('offer.success') }}</div>
@endif
@if (session('offer.error') || $problem)
<div class="mt-8 rounded border border-line bg-surface p-5" role="alert">{{ session('offer.error') ?? $problem }}</div>
@endif
@if (! session('offer.success') && ! $problem)
@if ($booking->status === \App\Enums\BookingStatus::Declined)
<div class="mt-8 rounded border border-line bg-surface p-5">Dieses Angebot wurde abgelehnt.</div>
@elseif (in_array($booking->status, \App\Enums\BookingStatus::occupying(), true))
<div class="mt-8 rounded border border-accent bg-surface p-5">Dieses Angebot wurde @if ($booking->accepted_at) am {{ $booking->accepted_at->format('d.m.Y') }} @endif angenommen – Ihre Buchung ist verbindlich.</div>
@elseif ($booking->status === \App\Enums\BookingStatus::Expired)
<div class="mt-8 rounded border border-line bg-surface p-5">{{ \App\Exceptions\ReservationException::offerExpired()->getMessage() }}</div>
@endif
@endif
<section class="mt-10 rounded bg-surface p-7" aria-labelledby="offer-stay">
<h2 id="offer-stay" class="font-display text-2xl">Ihr Aufenthalt</h2>
<dl class="mt-4 grid grid-cols-[auto_1fr] gap-x-6 gap-y-1">
<dt class="text-muted">Anreise</dt><dd>{{ $booking->arrival->translatedFormat('l, d.m.Y') }}@if ($booking->property->check_in_time) ab {{ substr($booking->property->check_in_time, 0, 5) }} Uhr @endif</dd>
<dt class="text-muted">Abreise</dt><dd>{{ $booking->departure->translatedFormat('l, d.m.Y') }}@if ($booking->property->check_out_time) bis {{ substr($booking->property->check_out_time, 0, 5) }} Uhr @endif</dd>
<dt class="text-muted">Nächte</dt><dd>{{ $booking->nights() }}</dd>
<dt class="text-muted">Personen</dt><dd>{{ $booking->guests }}</dd>
@if ($booking->status === \App\Enums\BookingStatus::OfferSent)
<dt class="text-muted">Gültig bis</dt><dd>{{ $booking->hold_expires_at?->format('d.m.Y, H:i') }} Uhr</dd>
@endif
</dl>
<h2 class="mt-8 font-display text-2xl">Preis</h2>
<table class="mt-3 w-full">
@foreach ($booking->quote['lines'] ?? [] as $line)
<tr class="border-b border-line"><td class="py-2">{{ $line['label'] }}</td><td class="py-2 text-right whitespace-nowrap">{{ $money($line['amount']) }}</td></tr>
@endforeach
<tr class="font-semibold"><td class="pt-3">Gesamtpreis</td><td class="pt-3 text-right">{{ $money($booking->total) }}</td></tr>
</table>
<p class="mt-3 text-sm text-muted">
@if ($booking->balance_due_on->lessThanOrEqualTo(today()->addDays(config('fewo.deposit_due_days'))))
Da die Anreise kurz bevorsteht, ist der Gesamtbetrag innerhalb von {{ config('fewo.deposit_due_days') }} Tagen nach Buchung fällig.
@else
Anzahlung {{ $money($booking->deposit) }} innerhalb von {{ config('fewo.deposit_due_days') }} Tagen nach Buchung,
Restbetrag {{ $money($booking->total - $booking->deposit) }} bis {{ $booking->balance_due_on->format('d.m.Y') }}.
@endif
Die Kurtaxe ist nicht enthalten und wird vor Ort entrichtet.
</p>
@if ($booking->offer_message)
<p class="mt-6 rounded border border-line p-4">{{ $booking->offer_message }}</p>
@endif
<h2 class="mt-8 font-display text-2xl">Bedingungen</h2>
<div class="prose-theme mt-3">{{ \App\Support\Content::html('contract.terms') }}</div>
@if (\App\Support\Content::get('stay.cancellation'))
<h3 class="mt-6 font-semibold">Rücktritt / Stornierung</h3>
<div class="prose-theme mt-2">{{ \App\Support\Content::html('stay.cancellation') }}</div>
@endif
<p class="mt-4 text-sm text-muted">Den vollständigen Vertragsentwurf finden Sie als PDF im Anhang unserer E-Mail.</p>
</section>
@if ($canAnswer)
<section class="mt-8 rounded bg-surface p-7" aria-label="Angebot annehmen oder ablehnen">
<form method="post" action="{{ $acceptUrl }}">
@csrf
<label class="flex items-start gap-3">
<input type="checkbox" name="terms" value="1" required class="mt-1">
<span>Ich habe die Angaben und Bedingungen dieses Angebots gelesen.</span>
</label>
@error('terms')<p class="mt-1 text-sm" role="alert">{{ $message }}</p>@enderror
<p class="mt-4 text-sm text-muted">{{ \App\Support\Content::get('offer.accept_note') }}</p>
<button type="submit" class="btn-accent mt-4 w-full sm:w-auto">{{ \App\Support\Content::get('offer.accept_button') }}</button>
</form>
<form method="post" action="{{ $rejectUrl }}" class="mt-6 border-t border-line pt-4">
@csrf
<button type="submit" class="text-sm text-muted underline hover:text-ink">Angebot ablehnen</button>
</form>
</section>
@endif
<p class="mt-8 text-sm text-muted">Fragen? {{ config('fewo.owner.name') }} · {{ config('fewo.owner.phone') }} · <a class="underline" href="mailto:{{ config('fewo.owner.email') }}">{{ config('fewo.owner.email') }}</a></p>
</div>
@endsection