154 lines
8.1 KiB
Twig
154 lines
8.1 KiB
Twig
{% extends 'layout.html.twig' %}
|
|
|
|
{% block content %}
|
|
{{ form_start(form) }}
|
|
{% if not form.vars.valid %}
|
|
<article>
|
|
<header>
|
|
<strong>Fehler</strong>
|
|
</header>
|
|
{{ form_errors(form) }}
|
|
</article>
|
|
{% endif %}
|
|
<div class="flex flex-col space-y-8 pb-4">
|
|
<div class="p-8 border border-gray-300 rounded-md"
|
|
{{ stimulus_controller('availabilities')|stimulus_controller('toggle', { 'open': true }, { 'closed': 'hidden' }) }}>
|
|
<div role="button" class="flex items-center justify-between" {{ stimulus_action('toggle', 'toggle', 'click') }}>
|
|
<span class="block text-3xl font-semibold">Reisedaten</span>
|
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6" {{ stimulus_target('toggle', 'icon') }}>
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5" />
|
|
</svg>
|
|
</div>
|
|
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-x-8 gap-y-4 pt-4" {{ stimulus_target('toggle', 'toggle') }}>
|
|
<div>
|
|
<h3 class="text-lg font-semibold">
|
|
Destination
|
|
</h3>
|
|
{{ bookingData.travel }}
|
|
</div>
|
|
<div>
|
|
<h3 class="text-lg font-semibold">
|
|
Reisedatum
|
|
</h3>
|
|
{{ bookingData.travelDate|date('d.m.Y') }}
|
|
</div>
|
|
<div>
|
|
<h3 class="text-lg font-semibold">
|
|
Buchungsdatum
|
|
</h3>
|
|
{{ bookingData.bookingDate|date('d.m.Y') }}
|
|
</div>
|
|
<div>
|
|
<h3 class="text-lg font-semibold">
|
|
Inklusivleistungen
|
|
</h3>
|
|
<ul class="list-disc pl-4">
|
|
{% for selectionGroup in travelData.includedServices %}
|
|
{% for service in selectionGroup.selections %}
|
|
<li>
|
|
{{ service.label }}
|
|
</li>
|
|
{% endfor %}
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% for child in form.participants %}
|
|
{% set participant = child.vars.data %}
|
|
<div class="{{ html_classes('p-8 border rounded-md', { 'border-gray-300': child.vars.valid, 'border-red-500': not child.vars.valid }) }}" {{ stimulus_controller('availabilities')|stimulus_controller('toggle', {'open': child.vars.valid == false}, { 'closed': 'hidden' }) }}>
|
|
<div role="button" class="flex items-center justify-between" {{ stimulus_action('toggle', 'toggle', 'click') }}>
|
|
<div class="text-xl font-semibold">Teilnehmer:in {{ participant.index }}: {{ participant.firstName }} {{ participant.lastName }}</div>
|
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6" {{ stimulus_target('toggle', 'icon') }}>
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5" />
|
|
</svg>
|
|
</div>
|
|
<div class="hidden" {{ stimulus_target('toggle', 'toggle') }}>
|
|
<div class="flex flex-col space-y-4 pt-4">
|
|
<div>
|
|
<h3 class="text-xl font-semibold pb-2">
|
|
Persönliche Daten
|
|
</h3>
|
|
<fieldset class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-x-8 gap-y-4 pb-4">
|
|
{{ form_row(child.firstName) }}
|
|
{{ form_row(child.lastName) }}
|
|
{{ form_row(child.gender) }}
|
|
{{ form_row(child.dateOfBirth) }}
|
|
{{ form_row(child.nationality) }}
|
|
</fieldset>
|
|
<fieldset class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-x-8 gap-y-4 pb-4">
|
|
{{ form_row(child.email) }}
|
|
{{ form_row(child.mobile) }}
|
|
</fieldset>
|
|
<fieldset class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-x-8 gap-y-4">
|
|
{{ form_row(child.height) }}
|
|
{{ form_row(child.shoeSize) }}
|
|
{{ form_row(child.weight) }}
|
|
</fieldset>
|
|
</div>
|
|
<div>
|
|
<h3 class="text-xl font-semibold pb-2">
|
|
Unterkunft
|
|
</h3>
|
|
{% set room = bookingData.roomForParticipant(participant.index) %}
|
|
{{ room.label }} ({{ room.individualPrice[participant.index]|format_currency('EUR') }})
|
|
</div>
|
|
<div>
|
|
<h3 class="text-xl font-semibold pb-2">
|
|
Leistungen
|
|
</h3>
|
|
<fieldset class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-x-8 gap-y-4">
|
|
{% if child.courses is defined %}
|
|
{{ form_row(child.courses) }}
|
|
{% endif %}
|
|
{% if child.skiPass is defined %}
|
|
{{ form_row(child.skiPass) }}
|
|
{% endif %}
|
|
{% if child.additionalServices is defined %}
|
|
{{ form_row(child.additionalServices) }}
|
|
{% endif %}
|
|
{% if child.board is defined %}
|
|
{{ form_row(child.board) }}
|
|
{% endif %}
|
|
{% if child.rentals is defined %}
|
|
{{ form_row(child.rentals) }}
|
|
{% endif %}
|
|
</fieldset>
|
|
</div>
|
|
<div>
|
|
<h3 class="text-xl font-semibold pb-2">
|
|
Hin-/Rückreise
|
|
</h3>
|
|
<fieldset class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-x-8 gap-y-4" {{ stimulus_controller('select-toggle', { 'show': ['BUS'] }, { 'hidden': 'hidden' }) }}>
|
|
{{ form_row(child.transportationServiceTo) }}
|
|
{{ form_row(child.transportationServiceFro) }}
|
|
{% if child.pickup is defined %}
|
|
<div {{ stimulus_target('select-toggle', 'container') }}>
|
|
{{ form_row(child.pickup) }}
|
|
</div>
|
|
{% endif %}
|
|
</fieldset>
|
|
</div>
|
|
<div>
|
|
<h3 class="text-xl font-semibold pb-2">
|
|
Gesamtpreis
|
|
</h3>
|
|
<span class="text-2xl font-medium">{{ bookingData.priceForParticipant(participant.index)|format_currency('EUR') }}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
<div class="flex justify-between">
|
|
<a href="{{ path('app_bookings') }}"
|
|
class="btn">
|
|
zurück
|
|
</a>
|
|
<button type="submit" class="btn btn--secondary">
|
|
Aktualisieren
|
|
</button>
|
|
</div>
|
|
{{ form_rest(form) }}
|
|
{{ form_end(form) }}
|
|
{% endblock %} |