feat: import services without price and filter when rendering

This commit is contained in:
Björn Fromme
2025-01-02 15:17:37 +01:00
parent f7819116a6
commit 8312b61bac
2 changed files with 12 additions and 10 deletions
@@ -430,7 +430,7 @@ class DateImportService implements SingletonInterface, LoggerAwareInterface
]; ];
} }
$servicesGeneral = $this->parseService($xmlDate, 'lei_sonstiges', true); $servicesGeneral = $this->parseService($xmlDate, 'lei_sonstiges');
$combinedServices = []; $combinedServices = [];
@@ -281,20 +281,22 @@
<div class="hidden" <div class="hidden"
data-modal-target="content" data-modal-target="content"
data-uid="{row.roomUid}"> data-uid="{row.roomUid}">
<f:for each="{row.optionalServices}" as="section"> <f:for each="{row.optionalServices}" as="section" key="sectionCode">
<div class="py-2 -mx-1"> <div class="py-2 -mx-1">
<div class="font-bold text-xl px-1"> <div class="font-bold text-xl px-1">
{section.label} {section.label}
</div> </div>
<f:for each="{section.services}" as="service"> <f:for each="{section.services}" as="service">
<dl class="flex items-start justify-between p-1 hover:bg-zinc-50"> <f:if condition="{sectionCode} == 'BUS' || {service.price} != '0,00'">
<dt class="font-normal"> <dl class="flex items-start justify-between p-1 hover:bg-zinc-50">
{service.label}: <dt class="font-normal">
</dt> {service.label}:
<dd class="whitespace-nowrap"> </dt>
{service.price} € <dd class="whitespace-nowrap">
</dd> {service.price} €
</dl> </dd>
</dl>
</f:if>
</f:for> </f:for>
</div> </div>
</f:for> </f:for>