Files
myep/templates/booking/create_step_1.html.twig
T
2025-10-09 18:52:23 +02:00

73 lines
3.1 KiB
Twig

{% extends 'layout.html.twig' %}
{% block content %}
{% include '_partials/_flashes.html.twig' %}
<h1>Neue Buchung</h1>
{% if bookingCreateDto.bookingStatus == 'A' %}
<div class="bg-blue-50 border border-blue-200 rounded-lg p-4 mb-6">
<div class="flex items-start">
<svg class="w-5 h-5 text-blue-600 mt-0.5 mr-3" fill="currentColor" viewBox="0 0 20 20">
<path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z" clip-rule="evenodd" />
</svg>
<div>
<h3 class="text-blue-900 font-semibold">Buchung auf Anfrage</h3>
<p class="text-blue-800 text-sm mt-1">Diese Reise kann nur auf Anfrage gebucht werden. Deine Buchung wird nach Eingang geprüft und du erhältst eine Bestätigung.</p>
</div>
</div>
</div>
{% endif %}
<div class="grid grid-cols-3 gap-8">
<div class="col-span-2">
<h2 class="pb-4">
Unterkunft
</h2>
{{ form_start(form) }}
{{ form_errors(form) }}
{% if groupedRooms.by_room is not empty %}
<h3>
Zimmer
</h3>
{% for roomId, room in groupedRooms.by_room %}
{{ form_row(form.roomSelections[roomId], {
'attr': {
'hx-post': path('app_booking_create_step_1_room_summary'),
'hx-target': '#booking-summary',
'hx-swap': 'innerHTML',
'hx-trigger': 'change'
}
}) }}
{% endfor %}
{% endif %}
{% if groupedRooms.by_pax is not empty %}
<h3>
Betten
</h3>
{% for roomId, room in groupedRooms.by_pax %}
{{ form_row(form.roomSelections[roomId], {
'attr': {
'hx-post': path('app_booking_create_step_1_room_summary'),
'hx-target': '#booking-summary',
'hx-swap': 'innerHTML',
'hx-trigger': 'change'
}
}) }}
{% endfor %}
{% endif %}
<div class="flex justify-end pt-4">
<button type="submit" class="button bg-button bg-button--secondary">Weiter</button>
</div>
{{ form_rest(form) }}
{{ form_end(form) }}
</div>
<div id="booking-summary">
{% include 'booking/_summary.html.twig' with {
'bookingCreateDto': bookingCreateDto,
'participantCount': participantCount,
'pricingData': pricingData,
'groupedSelectedRooms': groupedSelectedRooms,
'assignmentCounts': []
} %}
</div>
</div>
{% endblock %}