fix: adopt changes in myep api, use correct template variable

This commit is contained in:
Björn Fromme
2025-10-29 16:14:34 +01:00
parent 15374e7faa
commit 681833b1f9
2 changed files with 4 additions and 4 deletions
@@ -84,8 +84,8 @@ class TravelinfoController extends ActionController
$service = array_filter($travelData['transportationServices'] ?? [], function ($service) { $service = array_filter($travelData['transportationServices'] ?? [], function ($service) {
return 'BUS' === $service['subType'] && 'RUECK' === $service['direction']; return 'BUS' === $service['subType'] && 'RUECK' === $service['direction'];
}); });
if (null !== $service[0] ?? null) { if ($serviceDetail = reset($service)) {
$departureDayTime = $service[0]['dayTime']; $departureDayTime = $serviceDetail['dayTime'];
} }
$this->view->assign('travelInfo', $travelInfo); $this->view->assign('travelInfo', $travelInfo);
@@ -44,7 +44,7 @@
{travelInfo.headline} {travelInfo.headline}
</h1> </h1>
{travelInfo.introText -> f:format.html()} {travelInfo.introText -> f:format.html()}
<f:if condition="{date}"> <f:if condition="{travelData}">
<p> <p>
{travelData.label} {travelData.dateFrom -> f:format.date(format: 'd.m.Y')} - {travelData.dateTo -> f:format.date(format: 'd.m.Y')} {travelData.label} {travelData.dateFrom -> f:format.date(format: 'd.m.Y')} - {travelData.dateTo -> f:format.date(format: 'd.m.Y')}
</p> </p>
@@ -62,7 +62,7 @@
</div> </div>
</div> </div>
<div class="lg:w-3/4 pt-8 lg:pt-0 lg:px-8 text-white" data-rte-content> <div class="lg:w-3/4 pt-8 lg:pt-0 lg:px-8 text-white" data-rte-content>
<f:if condition="{date}"> <f:if condition="{travelData}">
<f:if condition="{travelInfo.hideAddress}"> <f:if condition="{travelInfo.hideAddress}">
<f:else> <f:else>
<h3 class="text-white"> <h3 class="text-white">