feat: Kalender-Code replaces the product's calendar hotel
Every hotel field now has one job. The hotel's code and aliases are import codes only (dates, lookups); a new Kalender-Code (calendar_code) decides the availability a record shows and may be shared by a house's summer and winter records. The product's "Unterkunft für Belegungskalender" is replaced by the checkbox "Kalender anzeigen" (show_calendar): a product page shows the calendar of the hotel it displays, the season still decides which one. - Price calendar, price tables, Belegungskalender, iCal feeds and /api/calendar-hotels read the Kalender-Code. A feed without one answers 404 instead of an empty calendar. - The upgrade wizard epProductsCalendarCode fills both fields from calendar_hotel, preserving today's calendars; the deploy runs it between the schema update and the switch. calendar_hotel stays in the database, so the previous release keeps working. ep:calendar-codes lists the product pages whose calendar differs from it. - HotelCodeResolver is the one lookup of import codes (date import, /api/hotel, Travelinfo); a code on several records resolves to the record whose own code it is, then the lowest uid, with a warning. Saving a code that is already another visible record's import code is refused with a message naming that record. - /api/product without hotel attaches the product's only visible Unterkunft (422 otherwise) and adds board_description, additional_services and calendar_hotel_code. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
659e72fc8c
commit
5455973dba
25 files changed
+880
-127
No files matched your search
@@ -76,15 +76,15 @@
|
||||
</div>
|
||||
</f:if>
|
||||
|
||||
<f:if condition="{product.calendarHotel}">
|
||||
<f:if condition="{calendarHotel}">
|
||||
<f:if condition="{product.season} == 's'">
|
||||
<f:render partial="Product/PriceCalendar" arguments="{_all}"/>
|
||||
|
||||
<f:variable name="currentYear" value="{f:format.date(date: 'now', format: 'Y')}"/>
|
||||
<f:render section="PriceTable" arguments="{product: product, settings: settings, year: currentYear}"/>
|
||||
<f:render section="PriceTable" arguments="{calendarHotel: calendarHotel, settings: settings, year: currentYear}"/>
|
||||
|
||||
<f:variable name="nextYear" value="{f:format.date(date: '+1 year', format: 'Y')}"/>
|
||||
<f:render section="PriceTable" arguments="{product: product, settings: settings, year: nextYear}"/>
|
||||
<f:render section="PriceTable" arguments="{calendarHotel: calendarHotel, settings: settings, year: nextYear}"/>
|
||||
</f:if>
|
||||
</f:if>
|
||||
|
||||
@@ -171,7 +171,7 @@
|
||||
<f:if condition="{showGallery}">
|
||||
<f:render section="SidebarGallery" arguments="{_all}"/>
|
||||
</f:if>
|
||||
<f:if condition="{product.calendarHotel} && {product.season} != 's'">
|
||||
<f:if condition="{calendarHotel} && {product.season} != 's'">
|
||||
<f:render section="AvailabilityCalendar" arguments="{_all}"/>
|
||||
</f:if>
|
||||
<f:if condition="{product.tourLink}">
|
||||
@@ -360,7 +360,7 @@
|
||||
paint that compete with the price calendar for PHP workers. The tables sit below
|
||||
the fold, so fetch them when they actually come into view.
|
||||
--></f:comment>
|
||||
<div hx-get="{ep:uri.ajax(action: 'priceTable', controller: 'AjaxCalendar', extensionName: 'epproducts', pageUid: settings.defaultAjaxUid, arguments: '{hotel: product.calendarHotel, year: year}', format: 'html')}"
|
||||
<div hx-get="{ep:uri.ajax(action: 'priceTable', controller: 'AjaxCalendar', extensionName: 'epproducts', pageUid: settings.defaultAjaxUid, arguments: '{hotel: calendarHotel, year: year}', format: 'html')}"
|
||||
hx-trigger="revealed">
|
||||
<f:render section="TableLoadingIndicator"/>
|
||||
</div>
|
||||
@@ -371,7 +371,7 @@
|
||||
<span class="block font-bold">
|
||||
Belegungskalender
|
||||
</span>
|
||||
<div hx-get="{ep:uri.ajax(action: 'availability', controller: 'AjaxCalendar', extensionName: 'epproducts', pageUid: settings.defaultAjaxUid, arguments: '{hotel: product.calendarHotel}', format: 'html')}"
|
||||
<div hx-get="{ep:uri.ajax(action: 'availability', controller: 'AjaxCalendar', extensionName: 'epproducts', pageUid: settings.defaultAjaxUid, arguments: '{hotel: calendarHotel}', format: 'html')}"
|
||||
hx-trigger="intersect once">
|
||||
<div class="flex items-center justify-center space-x-4 text-sm p-4">
|
||||
<f:image class="block w-4 h-4" src="EXT:ep_theme/Resources/Public/images/ajax-loader-white.gif" alt=""/>
|
||||
|
||||
Reference in new issue
Block a user