wip: improved booking summary
This commit is contained in:
@@ -62,53 +62,15 @@
|
||||
{{ form_rest(form) }}
|
||||
{{ form_end(form) }}
|
||||
</div>
|
||||
<div>
|
||||
{# This block contains the booking summary #}
|
||||
{% block booking_summary %}
|
||||
<div id="booking-summary"{% if htmx_oob_swap is defined and htmx_oob_swap %} hx-swap-oob="true"{% endif %}>
|
||||
<h3>Zusammenfassung</h3>
|
||||
<h4>
|
||||
Reise
|
||||
</h4>
|
||||
<p>
|
||||
{{ bookingCreateDto.travel.label }}
|
||||
</p>
|
||||
<h4>
|
||||
Datum
|
||||
</h4>
|
||||
<p>
|
||||
{{ bookingCreateDto.travel.dateFrom | date('d.m.Y') }} - {{ bookingCreateDto.travel.dateTo | date('d.m.Y') }}
|
||||
</p>
|
||||
<h4>
|
||||
Unterkunft
|
||||
</h4>
|
||||
<p>
|
||||
{{ bookingCreateDto.travel.hotel.name }}
|
||||
</p>
|
||||
{% if participantsCount > 0 %}
|
||||
<h4>
|
||||
Anzahl Teilnehmer
|
||||
</h4>
|
||||
<p>
|
||||
{{ participantsCount }}
|
||||
</p>
|
||||
{% endif %}
|
||||
<h4>
|
||||
Zimmer
|
||||
</h4>
|
||||
<ul>
|
||||
{% for roomSelection in bookingCreateDto.selectedRooms %}
|
||||
{% set assignedCount = assignmentCounts[roomSelection.roomId] ?? 0 %}
|
||||
<li>
|
||||
{{ roomSelection.roomLabel }}
|
||||
<span class="text-sm pl-2 {% if assignedCount == roomSelection.quantity %}text-green-600{% else %}text-gray-500{% endif %}">
|
||||
({{ assignedCount }}/{{ roomSelection.quantity }})
|
||||
</span>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% block booking_summary %}
|
||||
<div id="booking-summary"{% if htmx_oob_swap is defined and htmx_oob_swap %} hx-swap-oob="true"{% endif %}>
|
||||
{% include 'booking/_summary.html.twig' with {
|
||||
'bookingCreateDto': bookingCreateDto,
|
||||
'participantCount': participantsCount,
|
||||
'groupedSelectedRooms': groupedSelectedRooms,
|
||||
'assignmentCounts': assignmentCounts
|
||||
} %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user