Merge branch 'develop'
This commit is contained in:
@@ -153,7 +153,7 @@ class AjaxTableController extends ActionController
|
||||
|
||||
$nonBookableDateUids = GeneralUtility::trimExplode(',', $product->getNonBookableDates(), true);
|
||||
|
||||
$datesTable = $this->dateService->preprocessDatesTable([
|
||||
$allDates = $this->dateService->preprocessDatesTable([
|
||||
'dateTableData' => $dates,
|
||||
'template' => $this->settings['bpnBookingUrlTemplateCode'],
|
||||
'paCode' => $paCode,
|
||||
@@ -162,6 +162,10 @@ class AjaxTableController extends ActionController
|
||||
'nonBookableDateUids' => $nonBookableDateUids,
|
||||
]);
|
||||
|
||||
$bookableDates = array_filter($allDates, function (array $date) {
|
||||
return $date['available'] > 0;
|
||||
});
|
||||
|
||||
$altProductLink = null;
|
||||
$altLabel = null;
|
||||
if ($product->getAltProduct()) {
|
||||
@@ -178,15 +182,16 @@ class AjaxTableController extends ActionController
|
||||
}
|
||||
}
|
||||
|
||||
$hasSurchargeOrDiscount = $this->dateService->checkSurcharcheOrDiscount($datesTable);
|
||||
$hasSurchargeOrDiscount = $this->dateService->checkSurcharcheOrDiscount($allDates);
|
||||
$noInfoConceptUids = GeneralUtility::trimExplode(',', $this->settings['noInfoConceptUids']);
|
||||
$isProductWithNoInfoConcept = ($product->getConcept() !== null) && \in_array($product->getConcept()->getUid(),
|
||||
$noInfoConceptUids, false);
|
||||
|
||||
$this->view->assignMultiple([
|
||||
'dates' => $datesTable,
|
||||
'allDates' => $allDates,
|
||||
'bookableDates' => $bookableDates,
|
||||
'bookable' => $product->getBookable(),
|
||||
'unavailable' => count($datesTable) === 0,
|
||||
'unavailable' => count($allDates) === 0,
|
||||
'product' => $product,
|
||||
'hotel' => $hotel,
|
||||
'altProductLink' => $altProductLink,
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</f:if>
|
||||
</f:else>
|
||||
</f:if>
|
||||
<f:if condition="{dates}">
|
||||
<f:if condition="{bookableDates}">
|
||||
<div class="headline--3 mb-2">
|
||||
Buchungsoptionen {hotel.name}
|
||||
</div>
|
||||
@@ -42,8 +42,8 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<f:for each="{dates}" as="row" iteration="iteration">
|
||||
<tr class="odd:bg-zinc-50 hover:bg-zinc-100 odd:hover:bg-zinc-100{f:if(condition: '{iteration.cycle} > 5', then: ' hidden')}"
|
||||
<f:for each="{bookableDates}" as="row" iteration="iteration">
|
||||
<tr class="odd:bg-zinc-50 hover:bg-zinc-100 odd:hover:bg-zinc-100{f:if(condition: '{bookableDates -> f:count()} > 5 && {iteration.cycle} > 5', then: ' hidden')}"
|
||||
data-pricetable-target="row">
|
||||
<td class="border-r border-zinc-200 px-2 py-1 md:p-2">
|
||||
<f:if condition="{bookable} && {row.available} && {row.showBookingButton}">
|
||||
@@ -184,7 +184,7 @@
|
||||
</button>
|
||||
</li>
|
||||
</f:if>
|
||||
<f:if condition="{dates -> f:count()} > 5">
|
||||
<f:if condition="{bookableDates -> f:count()} > 5">
|
||||
<li class="py-2">
|
||||
<button type="button"
|
||||
class="flex items-center space-x-1 focus:outline-none text-ep-primary-light ser:text-ser-primary"
|
||||
|
||||
Reference in New Issue
Block a user