feat: extract shared booking summary travel partial
This commit is contained in:
@@ -21,55 +21,8 @@
|
|||||||
{# Content - toggleable on mobile, always visible on desktop #}
|
{# Content - toggleable on mobile, always visible on desktop #}
|
||||||
<div class="hidden lg:block flex-1 min-h-0 bg-white shadow-lg lg:shadow-none overflow-y-auto px-4 lg:px-8 py-8"
|
<div class="hidden lg:block flex-1 min-h-0 bg-white shadow-lg lg:shadow-none overflow-y-auto px-4 lg:px-8 py-8"
|
||||||
data-toggle-target="content">
|
data-toggle-target="content">
|
||||||
{# Travel Information #}
|
{% include 'booking/_summary_travel_info.html.twig' with {
|
||||||
<div class="pb-4">
|
'bookingDto': bookingDto,
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<th class="text-left align-top border-r-2 border-gray-300 pr-2">
|
|
||||||
Reise
|
|
||||||
</th>
|
|
||||||
<td class="pl-2">
|
|
||||||
{{ bookingDto.travel.label }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th class="text-left align-top border-r-2 border-gray-300 pr-2">
|
|
||||||
Zeitraum
|
|
||||||
</th>
|
|
||||||
<td class="pl-2">
|
|
||||||
{{ bookingDto.travel.dateFrom|date('d.m.Y') }} - {{ bookingDto.travel.dateTo|date('d.m.Y') }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th class="text-left align-top border-r-2 border-gray-300 pr-2">
|
|
||||||
Unterkunft
|
|
||||||
</th>
|
|
||||||
<td class="pl-2">
|
|
||||||
{{ bookingDto.travel.hotel.name }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th class="text-left align-top border-r-2 border-gray-300 pr-2">
|
|
||||||
Teilnehmer
|
|
||||||
</th>
|
|
||||||
<td class="pl-2">
|
|
||||||
{{ summaryData.participantCount }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{% if bookingDto.bookingStatus != 'F' %}
|
|
||||||
<tr>
|
|
||||||
<th class="text-left align-top border-r-2 border-gray-300 pr-2">
|
|
||||||
Status
|
|
||||||
</th>
|
|
||||||
<td class="pl-2">
|
|
||||||
{{ bookingDto.bookingStatus|map_status }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{% endif %}
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% include 'booking/_summary_hotel.html.twig' with {
|
|
||||||
'summaryData': summaryData
|
'summaryData': summaryData
|
||||||
} %}
|
} %}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,54 @@
|
|||||||
|
{% set wrapperClass = wrapperClass ?? 'pb-4' %}
|
||||||
|
{% set tableClass = tableClass ?? '' %}
|
||||||
|
{% set showStatus = showStatus ?? true %}
|
||||||
|
|
||||||
|
<div class="{{ wrapperClass }}">
|
||||||
|
<table{% if tableClass is not empty %} class="{{ tableClass }}"{% endif %}>
|
||||||
|
<tr>
|
||||||
|
<th class="text-left align-top border-r-2 border-gray-300 pr-2">
|
||||||
|
Reise
|
||||||
|
</th>
|
||||||
|
<td class="pl-2">
|
||||||
|
{{ bookingDto.travel.label }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th class="text-left align-top border-r-2 border-gray-300 pr-2">
|
||||||
|
Zeitraum
|
||||||
|
</th>
|
||||||
|
<td class="pl-2">
|
||||||
|
{{ bookingDto.travel.dateFrom|date('d.m.Y') }} - {{ bookingDto.travel.dateTo|date('d.m.Y') }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th class="text-left align-top border-r-2 border-gray-300 pr-2">
|
||||||
|
Unterkunft
|
||||||
|
</th>
|
||||||
|
<td class="pl-2">
|
||||||
|
{{ bookingDto.travel.hotel.name }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th class="text-left align-top border-r-2 border-gray-300 pr-2">
|
||||||
|
Teilnehmer
|
||||||
|
</th>
|
||||||
|
<td class="pl-2">
|
||||||
|
{{ summaryData.participantCount }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% if true === showStatus and bookingDto.bookingStatus != 'F' %}
|
||||||
|
<tr>
|
||||||
|
<th class="text-left align-top border-r-2 border-gray-300 pr-2">
|
||||||
|
Status
|
||||||
|
</th>
|
||||||
|
<td class="pl-2">
|
||||||
|
{{ bookingDto.bookingStatus|map_status }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{% endif %}
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% include 'booking/_summary_hotel.html.twig' with {
|
||||||
|
'summaryData': summaryData
|
||||||
|
} %}
|
||||||
@@ -26,49 +26,12 @@
|
|||||||
<span class="block uppercase font-semibold">Buchungsübersicht</span>
|
<span class="block uppercase font-semibold">Buchungsübersicht</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{# Travel Information #}
|
|
||||||
<div class="overflow-y-auto px-4 lg:px-8 py-8">
|
<div class="overflow-y-auto px-4 lg:px-8 py-8">
|
||||||
<div class="pb-4">
|
{% include 'booking/_summary_travel_info.html.twig' with {
|
||||||
<table>
|
'bookingDto': bookingCreateContext.bookingDto,
|
||||||
<tr>
|
'summaryData': bookingCreateContext.summaryData,
|
||||||
<th class="text-left align-top border-r-2 border-gray-300 pr-2">
|
'showStatus': false
|
||||||
Reise
|
|
||||||
</th>
|
|
||||||
<td class="pl-2">
|
|
||||||
{{ bookingCreateContext.bookingDto.travel.label }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th class="text-left align-top border-r-2 border-gray-300 pr-2">
|
|
||||||
Zeitraum
|
|
||||||
</th>
|
|
||||||
<td class="pl-2">
|
|
||||||
{{ bookingCreateContext.bookingDto.travel.dateFrom|date('d.m.Y') }} - {{ bookingCreateContext.bookingDto.travel.dateTo|date('d.m.Y') }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th class="text-left align-top border-r-2 border-gray-300 pr-2">
|
|
||||||
Unterkunft
|
|
||||||
</th>
|
|
||||||
<td class="pl-2">
|
|
||||||
{{ bookingCreateContext.bookingDto.travel.hotel.name }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th class="text-left align-top border-r-2 border-gray-300 pr-2">
|
|
||||||
Teilnehmer
|
|
||||||
</th>
|
|
||||||
<td class="pl-2">
|
|
||||||
{{ bookingCreateContext.summaryData.participantCount }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% include 'booking/_summary_hotel.html.twig' with {
|
|
||||||
'summaryData': bookingCreateContext.summaryData
|
|
||||||
} %}
|
} %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="form-wrapper"
|
<div id="form-wrapper"
|
||||||
@@ -90,43 +53,11 @@
|
|||||||
|
|
||||||
{# Travel Information - mobile only #}
|
{# Travel Information - mobile only #}
|
||||||
<div class="lg:hidden pb-4">
|
<div class="lg:hidden pb-4">
|
||||||
<table class="mb-4">
|
{% include 'booking/_summary_travel_info.html.twig' with {
|
||||||
<tr>
|
'bookingDto': bookingCreateContext.bookingDto,
|
||||||
<th class="text-left align-top border-r-2 border-gray-300 pr-2">
|
'summaryData': bookingCreateContext.summaryData,
|
||||||
Reise
|
'tableClass': 'mb-4',
|
||||||
</th>
|
'showStatus': false
|
||||||
<td class="pl-2">
|
|
||||||
{{ bookingCreateContext.bookingDto.travel.label }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th class="text-left align-top border-r-2 border-gray-300 pr-2">
|
|
||||||
Zeitraum
|
|
||||||
</th>
|
|
||||||
<td class="pl-2">
|
|
||||||
{{ bookingCreateContext.bookingDto.travel.dateFrom|date('d.m.Y') }} - {{ bookingCreateContext.bookingDto.travel.dateTo|date('d.m.Y') }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th class="text-left align-top border-r-2 border-gray-300 pr-2">
|
|
||||||
Unterkunft
|
|
||||||
</th>
|
|
||||||
<td class="pl-2">
|
|
||||||
{{ bookingCreateContext.bookingDto.travel.hotel.name }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th class="text-left align-top border-r-2 border-gray-300 pr-2">
|
|
||||||
Teilnehmer
|
|
||||||
</th>
|
|
||||||
<td class="pl-2">
|
|
||||||
{{ bookingCreateContext.summaryData.participantCount }}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
{% include 'booking/_summary_hotel.html.twig' with {
|
|
||||||
'summaryData': bookingCreateContext.summaryData
|
|
||||||
} %}
|
} %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user