Files
fewo-stommer/resources/views/offer.blade.php
T
LarsandClaude Sonnet 5.5 eafab8a2cb
Deploy FeWo mit PipelineManager / deploy (push) Failing after 3m38s
Buchungsprozess: Angebots-Snapshot, atomare Annahme, Auto-Angebot, Kanalfreigabe
- 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>
2026-10-30 12:01:02 +01:00

95 lines
6.2 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.
@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'])
@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(\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 {{ \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.
</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">{{ $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">{{ $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>
@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">{{ $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
<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? {{ $owner['name'] ?? '' }} · {{ $owner['phone'] ?? '' }} · <a class="underline" href="mailto:{{ $owner['email'] ?? '' }}">{{ $owner['email'] ?? '' }}</a></p>
</div>
@endsection