feat: fetch additional content from cms via api

This commit is contained in:
Björn Fromme
2025-11-20 15:42:41 +01:00
parent 33c3dc6022
commit 26681e5c62
18 changed files with 107 additions and 124 deletions
+10 -1
View File
@@ -45,7 +45,16 @@
{# Travel Information #}
<div class="mb-6 pb-4 border-b border-gray-200">
<h4 class="font-semibold text-lg mb-3 text-gray-800">Reiseinformationen</h4>
{% if cmsData.hotel.images is defined %}
<img src="{{ cmsData.hotel.images.resized.l[0].url }}" alt="{{ cmsData.hotel.images.resized.s[0].alt }}" class="w-full rounded mb-4">
{% endif %}
{% if cmsData.hotel.address is defined %}
<address>
{{ cmsData.hotel.name }}
<br>
{{ cmsData.hotel.address | nl2br }}
</address>
{% endif %}
<div class="space-y-2 text-sm text-gray-600">
<div><span class="font-medium">Reise:</span> {{ bookingCreateDto.travel.label }}</div>
<div><span class="font-medium">Zeitraum:</span> {{ bookingCreateDto.travel.dateFrom|date('d.m.Y') }} - {{ bookingCreateDto.travel.dateTo|date('d.m.Y') }}</div>
@@ -69,6 +69,7 @@
'bookingCreateDto': bookingCreateDto,
'participantCount': participantCount,
'pricingData': pricingData,
'cmsData': cmsData,
'groupedSelectedRooms': groupedSelectedRooms,
'assignmentCounts': []
} %}
+3 -2
View File
@@ -64,10 +64,11 @@
<div id="booking-summary"{% if htmx_oob_swap|default(false) %} hx-swap-oob="true"{% endif %}>
{% include 'booking/_summary.html.twig' with {
'bookingCreateDto': bookingDto,
'participantCount': summaryData.participantsCount,
'participantCount': summaryData.participantCount,
'groupedSelectedRooms': summaryData.groupedSelectedRooms,
'assignmentCounts': summaryData.assignmentCounts,
'pricingData': pricingData
'pricingData': pricingData,
'cmsData': cmsData
} %}
</div>
{% endblock %}
@@ -14,10 +14,11 @@
<div id="booking-summary">
{% include 'booking/_summary.html.twig' with {
'bookingCreateDto': bookingDto,
'participantCount': summaryData.participantsCount,
'participantCount': summaryData.participantCount,
'groupedSelectedRooms': summaryData.groupedSelectedRooms,
'assignmentCounts': summaryData.assignmentCounts,
'pricingData': pricingData
'pricingData': pricingData,
'cmsData': cmsData
} %}
</div>
</div>
+3 -1
View File
@@ -59,7 +59,9 @@
<div id="booking-summary">
{% include 'booking/_summary.html.twig' with {
'bookingCreateDto': bookingCreateDto,
'participantCount': participantsCount,
'participantCount': participantCount,
'pricingData': pricingData,
'cmsData': cmsData,
'groupedSelectedRooms': groupedSelectedRooms,
'assignmentCounts': assignmentCounts
} %}
+1 -1
View File
@@ -98,7 +98,7 @@
{# Participants Summary #}
<div class="mb-8 p-6 bg-gray-50 rounded-lg border border-gray-200">
<h3 class="text-xl font-semibold mb-4">Teilnehmer ({{ participantsCount }})</h3>
<h3 class="text-xl font-semibold mb-4">Teilnehmer ({{ participantCount }})</h3>
{% for participant in bookingCreateDto.participants %}
<div class="mb-6 pb-6 {% if not loop.last %}border-b border-gray-300{% endif %}">
<div class="flex justify-between items-start mb-3">
+1
View File
@@ -102,6 +102,7 @@
'bookingCreateDto': bookingDto,
'participantCount': participantsCount,
'pricingData': pricingData,
'cmsData': cmsData,
'groupedSelectedRooms': groupedSelectedRooms,
'assignmentCounts': assignmentCounts,
'mutableData': mutableData|default(null)
+3 -2
View File
@@ -14,10 +14,11 @@
<div id="booking-summary">
{% include 'booking/_summary.html.twig' with {
'bookingCreateDto': bookingDto,
'participantCount': summaryData.participantsCount,
'participantCount': summaryData.participantCount,
'groupedSelectedRooms': summaryData.groupedSelectedRooms,
'assignmentCounts': summaryData.assignmentCounts,
'pricingData': pricingData
'pricingData': pricingData,
'cmsData': cmsData
} %}
</div>
</div>