Buchungsprozess: Angebots-Snapshot, atomare Annahme, Auto-Angebot, Kanalfreigabe
Deploy FeWo mit PipelineManager / deploy (push) Failing after 3m38s

- Angebotsbedingungen und Zahlungsdaten werden je Version eingefroren (offer_terms, offer_hash)
- Annahme in einer gesperrten Transaktion, idempotent, mit Nachweis; Mail- und Portalfehler
  machen eine gespeicherte Buchung nicht ungueltig (Postfach, Nachversand)
- Je Wohnung: manuelle/automatische Angebote, optionale Vorreservierung
- Automatische Freigabe abhaengig von aktuellen Importen und Feed-Abruf bei Sofortbuchungsportalen
- Deutsche Fehlerseiten, Buchungsseite zeigt Angebots- und Zustellstatus
- Dokumentation: BOOKING-E2E-*.md, BOOKING-COMPLIANCE-HANDOVER.md

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
LarsandClaude Sonnet 5.5 committed 2026-10-30 12:01:02 +01:00
1 parent e7cc37a15b
commit eafab8a2cb
47 files changed
+2099 -104

No files matched your search

+1
View File
@@ -0,0 +1 @@
@include('errors.layout', ['title' => 'Link nicht mehr gültig', 'message' => 'Dieser Link ist abgelaufen oder ungültig. Bitte verwenden Sie den Link aus unserer neuesten E-Mail oder melden Sie sich bei uns – an Ihrer Buchung wurde nichts verändert.'])
+1
View File
@@ -0,0 +1 @@
@include('errors.layout', ['title' => 'Seite nicht gefunden', 'message' => 'Diese Seite gibt es nicht (mehr). Vielleicht hilft Ihnen die Startseite weiter.'])
+1
View File
@@ -0,0 +1 @@
@include('errors.layout', ['title' => 'Sitzung abgelaufen', 'message' => 'Die Seite war zu lange geöffnet. Bitte öffnen Sie sie erneut, zum Beispiel über den Link in unserer E-Mail – Ihre Eingabe wurde nicht gespeichert und an Ihrer Buchung wurde nichts verändert.'])
+1
View File
@@ -0,0 +1 @@
@include('errors.layout', ['title' => 'Zu viele Anfragen', 'message' => 'Bitte versuchen Sie es in einigen Minuten noch einmal.'])
+1
View File
@@ -0,0 +1 @@
@include('errors.layout', ['title' => 'Es ist ein Fehler aufgetreten', 'message' => 'Das tut uns leid. Bitte versuchen Sie es später noch einmal oder rufen Sie uns an.'])
+1
View File
@@ -0,0 +1 @@
@include('errors.layout', ['title' => 'Wartungsarbeiten', 'message' => 'Die Seite ist in Kürze wieder erreichbar.'])
+23
View File
@@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="noindex">
<title>{{ $title }}</title>
<style>
body { font-family: system-ui, sans-serif; background: #f6f2ea; color: #2b3640; margin: 0; }
main { max-width: 36rem; margin: 12vh auto; padding: 0 1.5rem; line-height: 1.6; }
h1 { font-size: 1.6rem; margin-bottom: .5rem; }
a { color: #2c5f7c; }
</style>
</head>
<body>
<main id="inhalt">
<h1>{{ $title }}</h1>
<p>{{ $message }}</p>
<p>Fragen? {{ config('fewo.owner.name') }} · {{ config('fewo.owner.phone') }} · <a href="mailto:{{ config('fewo.owner.email') }}">{{ config('fewo.owner.email') }}</a></p>
<p><a href="{{ url('/') }}">Zur Startseite</a></p>
</main>
</body>
</html>
+29
View File
@@ -0,0 +1,29 @@
{{-- Shared shell of the public error pages. Self-contained on purpose: no Vite, theme or database access, so it also renders when the application itself is failing. --}}
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="noindex">
<title>{{ $title }} · {{ config('app.name') }}</title>
<style>
body { margin: 0; font: 18px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: #1D2A33; background: #F6F2EA; }
main { max-width: 36rem; margin: 0 auto; padding: 4rem 1.25rem; }
h1 { font-size: 1.75rem; line-height: 1.2; margin: 0 0 1rem; }
a { color: #2C5F7C; }
a:focus-visible { outline: 2px solid #2C5F7C; outline-offset: 2px; }
.code { color: #4E5C66; font-size: .9rem; margin-top: 2rem; }
</style>
</head>
<body>
<main>
<h1>{{ $title }}</h1>
<p>{{ $text }}</p>
<p><a href="{{ url('/') }}">Zur Startseite</a></p>
@if (filled(config('fewo.owner.email')))
<p>Wir helfen gern persönlich: <a href="mailto:{{ config('fewo.owner.email') }}">{{ config('fewo.owner.email') }}</a>@if (filled(config('fewo.owner.phone'))) · <a href="tel:{{ preg_replace('/[^0-9+]/', '', (string) config('fewo.owner.phone')) }}">{{ config('fewo.owner.phone') }}</a>@endif</p>
@endif
<p class="code">Fehlercode {{ $code }}</p>
</main>
</body>
</html>
@@ -5,7 +5,7 @@
<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.
@if ($booking->isHoldActive())bis <strong>{{ $booking->hold_expires_at->format('d.m.Y, H:i') }} Uhr</strong> für Sie vorgemerkt.@elseif ($booking->status === \App\Enums\BookingStatus::OfferSent)bereits geprüft – unser Angebot ist unterwegs zu Ihnen.@else– eine Reservierung ist damit noch nicht verbunden.@endif
</p>
<p class="mt-2 text-emerald-900">Eine Bestätigung mit allen Details haben wir an {{ $booking->guest->email }} gesendet.</p>
</div>
+15 -2
View File
@@ -10,7 +10,20 @@
@if ($booking->promo_code)
**Aktionscode:** {{ $booking->promo_code }}<br>
@endif
**Vorgemerkt bis:** {{ $booking->hold_expires_at->format('d.m.Y, H:i') }} Uhr
@if ($booking->isHoldActive() || $booking->status === \App\Enums\BookingStatus::OfferSent)
**{{ $offerSent ? 'Angebot gültig bis' : 'Vorgemerkt bis' }}:** {{ $booking->hold_expires_at->format('d.m.Y, H:i') }} Uhr
@else
**Vorreservierung:** keine – der Zeitraum ist nicht im Kalender gesperrt.
@endif
@if ($offerSent)
**Das Angebot wurde automatisch an den Gast gesendet.** Sie müssen nichts tun; Annahme oder Ablehnung melden wir Ihnen.
@elseif ($blockers !== [])
**Automatisches Angebot nicht möglich – bitte selbst prüfen:**
@foreach ($blockers as $blocker)
- {{ $blocker }}
@endforeach
@endif
@include('mail.partials.quote')
@@ -20,6 +33,6 @@
@endif
<x-mail::button :url="\App\Filament\Resources\Bookings\BookingResource::getUrl('view', ['record' => $booking])">
Angebot senden oder Anfrage ablehnen
{{ $offerSent ? 'Vorgang ansehen' : 'Angebot senden oder Anfrage ablehnen' }}
</x-mail::button>
</x-mail::message>
@@ -3,7 +3,7 @@
Guten Tag {{ $booking->guest->full_name }},
wir haben Ihre unverbindliche Anfrage für die **{{ $booking->property->name }}** erhalten und den Zeitraum für Sie **bis {{ $booking->hold_expires_at->format('d.m.Y, H:i') }} Uhr vorgemerkt**.
wir haben Ihre unverbindliche Anfrage für die **{{ $booking->property->name }}** erhalten.@if ($booking->isHoldActive()) Wir haben den Zeitraum in unserem Kalender für Sie **bis {{ $booking->hold_expires_at->format('d.m.Y, H:i') }} Uhr vorgemerkt**.@else Der Zeitraum ist damit noch **nicht reserviert**; er kann in der Zwischenzeit anderweitig vergeben werden.@endif
**Anreise:** {{ $booking->arrival->translatedFormat('l, d.m.Y') }}<br>
**Abreise:** {{ $booking->departure->translatedFormat('l, d.m.Y') }}<br>
+10 -9
View File
@@ -1,3 +1,4 @@
@php($owner = \App\Documents\OfferTerms::owner($booking))
@php($money = fn (int $cents): string => \App\Support\Money::format($cents))
@extends('theme::layouts.app', ['title' => 'Ihr Angebot'])
@@ -47,10 +48,10 @@
<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.
@if ($booking->balance_due_on->lessThanOrEqualTo(today()->addDays(\App\Documents\OfferTerms::depositDueDays($booking))))
Da die Anreise kurz bevorsteht, ist der Gesamtbetrag innerhalb von {{ \App\Documents\OfferTerms::depositDueDays($booking) }} Tagen nach Buchung fällig.
@else
Anzahlung {{ $money($booking->deposit) }} innerhalb von {{ config('fewo.deposit_due_days') }} Tagen nach Buchung,
Anzahlung {{ $money($booking->deposit) }} innerhalb von {{ \App\Documents\OfferTerms::depositDueDays($booking) }} 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.
@@ -61,10 +62,10 @@
@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'))
<div class="prose-theme mt-3">{{ $booking->offerHtml('contract.terms') }}</div>
@if ($booking->offerText('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>
<div class="prose-theme mt-2">{{ $booking->offerHtml('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>
@@ -78,8 +79,8 @@
<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>
<p class="mt-4 text-sm text-muted">{{ $booking->offerText('offer.accept_note') }}</p>
<button type="submit" class="btn-accent mt-4 w-full sm:w-auto">{{ $booking->offerText('offer.accept_button') }}</button>
</form>
<form method="post" action="{{ $rejectUrl }}" class="mt-6 border-t border-line pt-4">
@csrf
@@ -88,6 +89,6 @@
</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>
<p class="mt-8 text-sm text-muted">Fragen? {{ $owner['name'] ?? '' }} · {{ $owner['phone'] ?? '' }} · <a class="underline" href="mailto:{{ $owner['email'] ?? '' }}">{{ $owner['email'] ?? '' }}</a></p>
</div>
@endsection
+18 -16
View File
@@ -1,4 +1,6 @@
@php($money = fn (int $cents): string => \App\Support\Money::format($cents))
@php($owner = \App\Documents\OfferTerms::owner($booking))
@php($bank = \App\Documents\OfferTerms::bank($booking))
<!DOCTYPE html>
<html lang="de">
<head>
@@ -23,7 +25,7 @@
</style>
</head>
<body>
<div class="footer">{{ config('fewo.owner.name') }} · {{ config('fewo.owner.street') }} · {{ config('fewo.owner.city') }} · {{ config('fewo.owner.phone') }} · {{ config('fewo.owner.email') }}</div>
<div class="footer">{{ ($owner['name'] ?? null) }} · {{ ($owner['street'] ?? null) }} · {{ ($owner['city'] ?? null) }} · {{ ($owner['phone'] ?? null) }} · {{ ($owner['email'] ?? null) }}</div>
@if ($logo ?? null)
<img src="{{ $logo }}" alt="" style="max-height: 18mm; max-width: 60mm; margin-bottom: 4mm;">
@@ -32,22 +34,22 @@
@if ($draft ?? false)
<h1>Angebot und Mietvertrag (Entwurf)</h1>
<p class="muted">Angebot {{ $booking->reference }} · Version {{ $booking->offer_version }} · erstellt am {{ ($booking->offer_sent_at ?? now())->format('d.m.Y') }} · gültig bis {{ $booking->hold_expires_at?->format('d.m.Y, H:i') }} Uhr</p>
<p><strong>{{ \App\Support\Content::get('offer.contract_note') }}</strong></p>
<p><strong>{{ $booking->offerText('offer.contract_note') }}</strong></p>
@else
<h1>Mietvertrag Ferienwohnung</h1>
<p class="muted">Buchungsnummer {{ $booking->reference }} · ausgestellt am {{ ($booking->confirmed_at ?? now())->format('d.m.Y') }}@if ($booking->accepted_at) · Angebot angenommen am {{ $booking->accepted_at->format('d.m.Y, H:i') }} Uhr @endif</p>
@endif
<p>{{ \App\Support\Content::get('contract.intro') }}</p>
<p>{{ $booking->offerText('contract.intro') }}</p>
<table class="parties">
<tr>
<td>
<h2>Vermieter</h2>
{{ config('fewo.owner.name') }}<br>
{{ config('fewo.owner.street') }}<br>
{{ config('fewo.owner.city') }}<br>
Tel. {{ config('fewo.owner.phone') }} · {{ config('fewo.owner.email') }}
{{ ($owner['name'] ?? null) }}<br>
{{ ($owner['street'] ?? null) }}<br>
{{ ($owner['city'] ?? null) }}<br>
Tel. {{ ($owner['phone'] ?? null) }} · {{ ($owner['email'] ?? null) }}
</td>
<td>
<h2>Mieter</h2>
@@ -84,24 +86,24 @@
<p>Anzahlung <strong>{{ $money($booking->deposit) }}</strong> bis zum <strong>{{ $booking->deposit_due_on?->format('d.m.Y') }}</strong>,
Restbetrag <strong>{{ $money($booking->total - $booking->deposit) }}</strong> bis zum <strong>{{ $booking->balance_due_on->format('d.m.Y') }}</strong>.</p>
@endif
@if (config('fewo.bank.iban'))
<p>Bankverbindung: {{ config('fewo.bank.account_holder') }} · IBAN {{ config('fewo.bank.iban') }}@if (config('fewo.bank.bic')) · BIC {{ config('fewo.bank.bic') }}@endif · Verwendungszweck: {{ $booking->reference }}</p>
@if (($bank['iban'] ?? null))
<p>Bankverbindung: {{ ($bank['account_holder'] ?? null) }} · IBAN {{ ($bank['iban'] ?? null) }}@if (($bank['bic'] ?? null)) · BIC {{ ($bank['bic'] ?? null) }}@endif · Verwendungszweck: {{ $booking->reference }}</p>
@endif
<h2>Mietbedingungen</h2>
<div class="rich">{{ \App\Support\Content::html('contract.terms') }}</div>
<div class="rich">{{ $booking->offerHtml('contract.terms') }}</div>
@if (\App\Support\Content::get('stay.cancellation'))
@if ($booking->offerText('stay.cancellation'))
<h2>Rücktritt / Stornierung</h2>
<div class="rich">{{ \App\Support\Content::html('stay.cancellation') }}</div>
<div class="rich">{{ $booking->offerHtml('stay.cancellation') }}</div>
@endif
@if (\App\Support\Content::get('stay.house_rules'))
@if ($booking->offerText('stay.house_rules'))
<h2>Hausordnung</h2>
<div class="rich">{{ \App\Support\Content::html('stay.house_rules') }}</div>
<div class="rich">{{ $booking->offerHtml('stay.house_rules') }}</div>
@endif
<p style="margin-top: 8mm">{{ \App\Support\Content::get('contract.closing') }}</p>
<p>{{ config('fewo.owner.name') }}</p>
<p style="margin-top: 8mm">{{ $booking->offerText('contract.closing') }}</p>
<p>{{ ($owner['name'] ?? null) }}</p>
</body>
</html>