288 lines
14 KiB
Twig
288 lines
14 KiB
Twig
{% extends 'layout_admin.html.twig' %}
|
||
|
||
{% block content %}
|
||
<twig:page:heading>
|
||
{{ booking.recordLabel }} · {% include 'admin/accommodation_booking/_status_label.html.twig' %}
|
||
{{ booking.groupName }}
|
||
</twig:page:heading>
|
||
|
||
<div class="grid lg:grid-cols-2 gap-8">
|
||
<div>
|
||
<h2 class="text-lg font-bold mb-4">Kontakt</h2>
|
||
<dl class="grid grid-cols-2 gap-y-2 text-sm">
|
||
<dt class="font-medium">Gruppenname</dt>
|
||
<dd>{{ booking.groupName }}</dd>
|
||
<dt class="font-medium">Anrede</dt>
|
||
<dd>{{ booking.salutation | default('–') }}</dd>
|
||
<dt class="font-medium">Name</dt>
|
||
<dd>{{ booking.firstName }} {{ booking.lastName }}</dd>
|
||
<dt class="font-medium">E-Mail</dt>
|
||
<dd>{{ booking.email }}</dd>
|
||
<dt class="font-medium">Telefon</dt>
|
||
<dd>{{ booking.phone | default('–') }}</dd>
|
||
<dt class="font-medium">Adresse</dt>
|
||
<dd>
|
||
{% if booking.street %}
|
||
{{ booking.street }}<br>
|
||
{{ booking.zip }} {{ booking.city }}
|
||
{% else %}
|
||
–
|
||
{% endif %}
|
||
</dd>
|
||
</dl>
|
||
</div>
|
||
|
||
<div>
|
||
<h2 class="text-lg font-bold mb-4">Reisedaten</h2>
|
||
<dl class="grid grid-cols-2 gap-y-2 text-sm">
|
||
<dt class="font-medium">Gruppenhaus</dt>
|
||
<dd>{{ booking.accommodation.name }}</dd>
|
||
<dt class="font-medium">Anreise</dt>
|
||
<dd>{{ booking.dateFrom | date('d.m.Y') }}</dd>
|
||
<dt class="font-medium">Abreise</dt>
|
||
<dd>{{ booking.dateTo | date('d.m.Y') }}</dd>
|
||
<dt class="font-medium">Nächte</dt>
|
||
<dd>{{ booking.nights }}</dd>
|
||
<dt class="font-medium">Anzahl Personen</dt>
|
||
<dd>{{ booking.paxCount }}</dd>
|
||
{% if booking.minorsCount > 0 %}
|
||
<dt class="font-medium">davon Kinder (0–3 Jahre)</dt>
|
||
<dd>{{ booking.minorsCount }}</dd>
|
||
{% endif %}
|
||
{% if booking.childrenCount > 0 %}
|
||
<dt class="font-medium">davon Kinder (4–{{ booking.accommodation.maxAdolescentAge }} Jahre)</dt>
|
||
<dd>{{ booking.childrenCount }}</dd>
|
||
{% endif %}
|
||
<dt class="font-medium">Herkunft</dt>
|
||
<dd>{{ booking.origin.label }}</dd>
|
||
<dt class="font-medium">Status</dt>
|
||
<dd>{% include 'admin/accommodation_booking/_status_label.html.twig' %}</dd>
|
||
{% if booking.acceptedAt is not null %}
|
||
<dt class="font-medium">Angenommen am</dt>
|
||
<dd>{{ booking.acceptedAt | date('d.m.Y, H:i') }}</dd>
|
||
{% endif %}
|
||
{% if booking.confirmedAt is not null %}
|
||
<dt class="font-medium">Bestätigt am</dt>
|
||
<dd>{{ booking.confirmedAt | date('d.m.Y, H:i') }}</dd>
|
||
{% endif %}
|
||
</dl>
|
||
</div>
|
||
|
||
{% if booking.boardServiceLabel or booking.additionalServices | length > 0 %}
|
||
<div>
|
||
<h2 class="text-lg font-bold mb-4">Gebuchte Leistungen</h2>
|
||
<dl class="grid grid-cols-2 gap-y-2 text-sm">
|
||
{% if booking.boardServiceLabel %}
|
||
<dt class="font-medium">Verpflegung</dt>
|
||
<dd>{{ booking.boardServiceLabel }}</dd>
|
||
{% endif %}
|
||
{% for service in booking.additionalServices %}
|
||
<dt class="font-medium">{{ loop.first ? 'Zusatzleistungen' : '' }}</dt>
|
||
<dd>{{ service.label }}</dd>
|
||
{% endfor %}
|
||
</dl>
|
||
</div>
|
||
{% endif %}
|
||
|
||
{% if priceBreakdown is not null %}
|
||
<div>
|
||
<h2 class="text-lg font-bold mb-4">Preise</h2>
|
||
{% set currency = booking.pricingCurrency ?? priceBreakdown.currency %}
|
||
<table class="w-full text-sm">
|
||
{% if priceBreakdown.basePrice > 0 %}
|
||
<tr>
|
||
<td class="py-1">
|
||
Basispreis
|
||
<span class="text-xs text-gray-500">für {{ priceBreakdown.includedPax }} Pers.</span>
|
||
</td>
|
||
<td class="py-1 text-right whitespace-nowrap">{{ (priceBreakdown.basePrice / 100) | format_currency(currency) }}</td>
|
||
</tr>
|
||
{% endif %}
|
||
{% if priceBreakdown.additionalPersonsPrice > 0 %}
|
||
<tr>
|
||
<td class="py-1">
|
||
Aufpreis Personenzahl
|
||
<span class="text-xs text-gray-500">für {{ priceBreakdown.effectivePax - priceBreakdown.includedPax }} Pers.</span>
|
||
</td>
|
||
<td class="py-1 text-right whitespace-nowrap">{{ (priceBreakdown.additionalPersonsPrice / 100) | format_currency(currency) }}</td>
|
||
</tr>
|
||
{% endif %}
|
||
{% if priceBreakdown.shortTermSurcharge > 0 %}
|
||
<tr>
|
||
<td class="py-1">Aufpreis Kurzzeit</td>
|
||
<td class="py-1 text-right whitespace-nowrap">{{ (priceBreakdown.shortTermSurcharge / 100) | format_currency(currency) }}</td>
|
||
</tr>
|
||
{% endif %}
|
||
{% if priceBreakdown.boardPrice > 0 %}
|
||
<tr>
|
||
<td class="py-1">Verpflegung</td>
|
||
<td class="py-1 text-right whitespace-nowrap">{{ (priceBreakdown.boardPrice / 100) | format_currency(currency) }}</td>
|
||
</tr>
|
||
{% endif %}
|
||
{% if priceBreakdown.undersubscriptionSurcharge > 0 %}
|
||
<tr>
|
||
<td class="py-1">Verpflegungs-Aufschlag für Gruppen unter {{ priceBreakdown.undersubscriptionThreshold }} Personen</td>
|
||
<td class="py-1 text-right whitespace-nowrap">{{ (priceBreakdown.undersubscriptionSurcharge / 100) | format_currency(currency) }}</td>
|
||
</tr>
|
||
{% endif %}
|
||
{% for service in priceBreakdown.serviceDetails %}
|
||
{% if service.price > 0 %}
|
||
<tr>
|
||
<td class="py-1">{{ service.label }}</td>
|
||
<td class="py-1 text-right whitespace-nowrap">{{ (service.price / 100) | format_currency(currency) }}</td>
|
||
</tr>
|
||
{% endif %}
|
||
{% endfor %}
|
||
{% if priceBreakdown.runningCosts > 0 %}
|
||
<tr>
|
||
<td class="py-1">Strom- und Abfallgebühren</td>
|
||
<td class="py-1 text-right whitespace-nowrap">{{ (priceBreakdown.runningCosts / 100) | format_currency(currency) }}</td>
|
||
</tr>
|
||
{% endif %}
|
||
<tr class="border-t border-gray-200 font-semibold">
|
||
<td class="pt-2">
|
||
Gesamtpreis
|
||
<span class="block text-xs font-normal text-gray-500">zzgl. ortsabhängiger Gebühren</span>
|
||
</td>
|
||
<td class="pt-2 text-right whitespace-nowrap">{{ (priceBreakdown.total / 100) | format_currency(currency) }}</td>
|
||
</tr>
|
||
{% for discount in priceBreakdown.discounts %}
|
||
<tr class="text-green-700">
|
||
<td class="pt-1">Rabatt {{ discount.label }} {{ discount.percent }} %</td>
|
||
<td class="pt-1 text-right whitespace-nowrap">– {{ (discount.amount / 100) | format_currency(currency) }}</td>
|
||
</tr>
|
||
{% endfor %}
|
||
{% if priceBreakdown.discounts is not empty %}
|
||
<tr class="border-t border-gray-200 font-bold text-green-700">
|
||
<td class="pt-2">Gesamtpreis nach Rabatt</td>
|
||
<td class="pt-2 text-right whitespace-nowrap">{{ (priceBreakdown.discountedTotal / 100) | format_currency(currency) }}</td>
|
||
</tr>
|
||
{% endif %}
|
||
</table>
|
||
</div>
|
||
{% endif %}
|
||
|
||
{% if booking.remarks %}
|
||
<div class="lg:col-span-2">
|
||
<h2 class="text-lg font-bold mb-4">Bemerkungen</h2>
|
||
<p class="text-sm">{{ booking.remarks | nl2br }}</p>
|
||
</div>
|
||
{% endif %}
|
||
</div>
|
||
|
||
<div class="text-xs text-gray-400 mt-6">
|
||
Eingegangen: {{ booking.createdAt | date('d.m.Y, H:i') }}
|
||
{% if booking.updatedAt is not null and booking.updatedAt != booking.createdAt %}
|
||
· Aktualisiert: {{ booking.updatedAt | date('d.m.Y, H:i') }}
|
||
{% endif %}
|
||
</div>
|
||
|
||
{% if booking.draft or booking.requested %}
|
||
<div class="mt-6 border-t border-gray-200 pt-6">
|
||
<h2 class="text-lg font-bold mb-2">Angebot</h2>
|
||
<p class="text-sm text-gray-500 mb-2">
|
||
Das Angebot wurde dem Kunden noch nicht zugestellt. Beim Versand wird der Zugangslink
|
||
erzeugt und die Buchung wartet anschließend auf die Annahme durch den Kunden.
|
||
</p>
|
||
<div class="flex items-center gap-2">
|
||
<button type="button"
|
||
class="button button--primary button--small"
|
||
hx-get="{{ path('app_admin_accommodationbooking_send_offer', { id: booking.id }) }}"
|
||
hx-target="body"
|
||
hx-swap="beforeend">
|
||
Angebot per E-Mail senden
|
||
</button>
|
||
<button type="button"
|
||
class="button button--secondary button--small"
|
||
hx-get="{{ path('app_admin_accommodationbooking_generate_access_link', { id: booking.id }) }}"
|
||
hx-target="body"
|
||
hx-swap="beforeend">
|
||
Link erzeugen
|
||
</button>
|
||
</div>
|
||
</div>
|
||
{% endif %}
|
||
|
||
{% if booking.received %}
|
||
<div class="mt-6 border-t border-gray-200 pt-6">
|
||
<h2 class="text-lg font-bold mb-2">Bestätigung</h2>
|
||
<p class="text-sm text-gray-500 mb-2">
|
||
Die Buchung des Kunden ist eingegangen, aber es wurde noch keine Bestätigung verschickt.
|
||
</p>
|
||
<button type="button"
|
||
class="button button--primary button--small"
|
||
hx-get="{{ path('app_admin_accommodationbooking_confirm', { id: booking.id }) }}"
|
||
hx-target="body"
|
||
hx-swap="beforeend">
|
||
Buchung per E-Mail bestätigen
|
||
</button>
|
||
</div>
|
||
{% endif %}
|
||
|
||
<div class="mt-6 border-t border-gray-200 pt-6">
|
||
<h2 class="text-lg font-bold mb-2">Zugangslink</h2>
|
||
{% if not booking.customerAccessible %}
|
||
<p class="text-sm text-gray-500">
|
||
Ein Zugangslink wird beim Versand des Angebots erzeugt.
|
||
</p>
|
||
{% elseif accessLink %}
|
||
<div class="flex items-center gap-2">
|
||
<button type="button"
|
||
class="button button--secondary button--small"
|
||
data-controller="clipboard"
|
||
data-clipboard-content-value="{{ accessLink }}"
|
||
data-clipboard-label-value="Kopiert!"
|
||
data-action="clipboard#copy">
|
||
{{ icon('copy', 'w-4 h-4') }} Link kopieren
|
||
</button>
|
||
<button type="button"
|
||
class="button button--secondary button--small"
|
||
hx-get="{{ path('app_admin_accommodationbooking_send_access_link', { id: booking.id }) }}"
|
||
hx-target="body"
|
||
hx-swap="beforeend">
|
||
Link senden
|
||
</button>
|
||
</div>
|
||
<p class="text-xs text-gray-500 mt-1">
|
||
Gültig bis {{ accessLinkExpiresAt | date('d.m.Y') }}
|
||
{% if accessLinkExpiresAt < date() %}
|
||
<span class="text-red-600 font-medium">(abgelaufen)</span>
|
||
{% endif %}
|
||
</p>
|
||
{% else %}
|
||
<p class="text-sm text-gray-500">
|
||
Der Zugangslink wird beim Versand des Angebots erzeugt.
|
||
</p>
|
||
{% endif %}
|
||
</div>
|
||
|
||
<div class="flex justify-between pt-8">
|
||
<a href="{{ returnUrl }}" class="button button--secondary button--small">
|
||
zurück
|
||
</a>
|
||
<div class="flex items-center gap-2">
|
||
{% if not booking.confirmed and not booking.discarded %}
|
||
<button type="button"
|
||
class="button button--warning button--small"
|
||
hx-get="{{ path('app_admin_accommodationbooking_discard', { id: booking.id }) }}"
|
||
hx-target="body"
|
||
hx-swap="beforeend">
|
||
Absagen
|
||
</button>
|
||
{% endif %}
|
||
{% if booking.confirmed %}
|
||
<a href="{{ path('app_admin_accommodationbooking_pdf', { 'id': booking.id }) }}" class="button button--secondary button--small">
|
||
PDF herunterladen
|
||
</a>
|
||
{% endif %}
|
||
{% set edit_params = { 'id': booking.id } %}
|
||
{% if app.request.query.get('r') %}
|
||
{% set edit_params = edit_params | merge({ 'r': app.request.query.get('r') }) %}
|
||
{% endif %}
|
||
<a href="{{ path('app_admin_accommodationbooking_edit', edit_params) }}" class="button button--primary button--small">
|
||
bearbeiten
|
||
</a>
|
||
</div>
|
||
</div>
|
||
{% endblock %}
|