feat: link price calculator from calendar

addresses #8697b8j0m
This commit is contained in:
Björn Fromme
2025-04-07 15:03:51 +02:00
parent 75db407235
commit aae50abf77
@@ -6,9 +6,9 @@
<f:section name="Main">
<div class="calendar__range">
<f:render section="Year" arguments="{year: yearStart, range: range, events: events, months: months}"/>
<f:render section="Year" arguments="{year: yearStart, range: range, events: events, months: months, hotel: hotel}"/>
<f:if condition="{yearEnd}">
<f:render section="Year" arguments="{year: yearEnd, range: range, events: events, months: months}"/>
<f:render section="Year" arguments="{year: yearEnd, range: range, events: events, months: months, hotel: hotel}"/>
</f:if>
</div>
</f:section>
@@ -16,32 +16,50 @@
<f:section name="Year">
<f:for each="{year}" as="month">
<ep:calendar.includes range="{range}" period="{month}">
<div class="w-full{f:if(condition: '{months} > 1', then: ' md:w-1/2 lg:w-1/3')}">
<table class="min-w-full border border-zinc-400 border-collapse mb-0">
<thead>
<tr>
<f:for each="{0: 'Mo', 1: 'Di', 2: 'Mi', 3: 'Do', 4: 'Fr', 5: 'Sa', 6: 'So'}" as="weekday">
<th class="px-1 py-2 border border-zinc-300 text-center">
{weekday}
</th>
</f:for>
</tr>
</thead>
<tbody>
<f:for each="{month}" as="week">
<tr>
<f:for each="{week}" as="day">
<td class="px-1 py-2 border border-zinc-300 text-center">
<ep:calendar.contingent day="{day}" month="{month}" events="{events}"/>
</td>
</f:for>
</tr>
</f:for>
</tbody>
</table>
</div>
<f:if condition="{hotel.groupsPriceConfigs}">
<f:then>
<div data-controller="lightbox"
data-lightbox-url-value="{f:uri.action(action: 'index', controller: 'GroupsPrice', arguments: '{hotel: hotel}', pageUid: settings.groupsPricePopupPageUid, absolute: 1)}"
data-lightbox-type-value="external"
data-lightbox-height-value="85vh"
data-action="click->lightbox#open"
class="cursor-pointer">
<f:render section="Calendar" arguments="{_all}"/>
</div>
</f:then>
<f:else>
<f:render section="Calendar" arguments="{_all}"/>
</f:else>
</f:if>
</ep:calendar.includes>
</f:for>
</f:section>
<f:section name="Calendar">
<div class="w-full{f:if(condition: '{months} > 1', then: ' md:w-1/2 lg:w-1/3')}">
<table class="min-w-full border border-zinc-400 border-collapse mb-0">
<thead>
<tr>
<f:for each="{0: 'Mo', 1: 'Di', 2: 'Mi', 3: 'Do', 4: 'Fr', 5: 'Sa', 6: 'So'}" as="weekday">
<th class="px-1 py-2 border border-zinc-300 text-center">
{weekday}
</th>
</f:for>
</tr>
</thead>
<tbody>
<f:for each="{month}" as="week">
<tr>
<f:for each="{week}" as="day">
<td class="px-1 py-2 border border-zinc-300 text-center">
<ep:calendar.contingent day="{day}" month="{month}" events="{events}"/>
</td>
</f:for>
</tr>
</f:for>
</tbody>
</table>
</div>
</f:section>
</html>