fix: be more specific regarding booking status
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
{% set messages = form.vars.errors|map(error => error.message) %}
|
||||
{% include '_partials/_alert.html.twig' with { 'level': 'error', 'title': 'Die Buchung konnte nicht aktualisiert werden', 'messages': messages } %}
|
||||
{% endif %}
|
||||
<div class="flex flex-col space-y-8 pb-8" {{ stimulus_controller('booking', { 'availabilities': availabilities.items }) }} {{ stimulus_controller('iframe') }}>
|
||||
<div class="flex flex-col space-y-8 pb-8" {{ stimulus_controller('booking', { 'availabilities': availabilities.items }) }} {{ stimulus_controller('iframe', { 'offsetTop': 100 }) }}>
|
||||
<div class="p-8 border border-gray-300 rounded-md"
|
||||
{{ stimulus_controller('toggle', { 'open': true }, { 'closed': 'hidden' }) }}>
|
||||
<div role="button" class="flex items-center justify-between" {{ stimulus_action('toggle', 'toggle', 'click') }}>
|
||||
@@ -89,16 +89,16 @@
|
||||
</h3>
|
||||
<ul class="list-disc pl-4">
|
||||
<li>
|
||||
Unterkunft: {{ mutableData.items['accommodation'].mutableBefore|date('d.m.Y') }}
|
||||
Unterkunft: {% if mutableData.items['accommodation'].mutable %}{{ mutableData.items['accommodation'].mutableBefore|date('d.m.Y') }}{% else %}nicht mehr möglich{% endif %}
|
||||
</li>
|
||||
<li>
|
||||
Zusatzleistungen: {{ mutableData.items['additional_services'].mutableBefore|date('d.m.Y') }}
|
||||
Zusatzleistungen: {% if mutableData.items['additional_services'].mutable %}{{ mutableData.items['additional_services'].mutableBefore|date('d.m.Y') }}{% else %}nicht mehr möglich{% endif %}
|
||||
</li>
|
||||
<li>
|
||||
Beförderung: {{ mutableData.items['transportation'].mutableBefore|date('d.m.Y') }}
|
||||
Beförderung: {% if mutableData.items['transportation'].mutable %}{{ mutableData.items['transportation'].mutableBefore|date('d.m.Y') }}{% else %}nicht mehr möglich{% endif %}
|
||||
</li>
|
||||
<li>
|
||||
Zustiege: {{ mutableData.items['pickup'].mutableBefore|date('d.m.Y') }}
|
||||
Zustiege: {% if mutableData.items['pickup'].mutable %}{{ mutableData.items['pickup'].mutableBefore|date('d.m.Y') }}{% else %}nicht mehr möglich{% endif %}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -108,14 +108,14 @@
|
||||
{% for child in form.participants %}
|
||||
<div>
|
||||
{% set participant = child.vars.data %}
|
||||
{% if participant.status != 'F' %}
|
||||
{% if participant.status == 'S' %}
|
||||
{% do child.setRendered %}
|
||||
{% endif %}
|
||||
<div class="{{ html_classes('p-8 border rounded-md mb-4', { 'border-gray-300': child.vars.valid, 'border-red-500': not child.vars.valid }) }}" {{ 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="flex items-center space-x-4">
|
||||
<span class="text-2xl leading-none font-semibold">Teilnehmer:in {{ participant.index }}: {{ participant.firstName }} {{ participant.lastName }}</span>
|
||||
{% if participant.status != 'F' %} <span class="inline-block px-2 py-1 text-xs bg-red-500 text-white">storniert</span>{% endif %}
|
||||
{% if participant.status == 'S' %} <span class="inline-block px-2 py-1 text-xs bg-red-500 text-white">storniert</span>{% endif %}
|
||||
</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" />
|
||||
@@ -123,7 +123,7 @@
|
||||
</div>
|
||||
<div class="hidden" {{ stimulus_target('toggle', 'toggle') }}>
|
||||
<div class="flex flex-col space-y-4 pt-4">
|
||||
{% if participant.status != 'F' %}
|
||||
{% if participant.status == 'S' %}
|
||||
{% set surcharges = bookingData.surchargesForParticipant(participant.index) %}
|
||||
{% if surcharges|length > 0 %}
|
||||
<div>
|
||||
@@ -209,7 +209,7 @@
|
||||
Hin-/Rückreise
|
||||
</h3>
|
||||
<fieldset class="grid grid-cols-1 md:grid-cols-2 gap-x-8 gap-y-4">
|
||||
<div class="space-y-2" {{ stimulus_controller('select-toggle', { 'show': ['BUS'], 'visible': participant.transportationServiceTo.subType == 'BUS' }, { 'hidden': 'hidden' }) }}>
|
||||
<div class="space-y-2" {{ stimulus_controller('select-toggle', { 'show': ['BUS'], 'visible': participant.transportationServiceTo is not null and participant.transportationServiceTo.subType == 'BUS' }, { 'hidden': 'hidden' }) }}>
|
||||
{{ form_row(child.transportationServiceTo) }}
|
||||
{% if child.pickup is defined %}
|
||||
<div {{ stimulus_target('select-toggle', 'container') }}>
|
||||
@@ -250,7 +250,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% if participant.status == 'F' %}
|
||||
{% if participant.status != 'S' %}
|
||||
<button type="submit"
|
||||
class="button bg-button bg-button--secondary" {{ stimulus_action('loading', 'toggle', null, { 'scroll': true }) }}>
|
||||
Aktualisieren
|
||||
|
||||
Reference in New Issue
Block a user