diff --git a/public/typo3conf/ext/ep_products/Classes/Service/DateService.php b/public/typo3conf/ext/ep_products/Classes/Service/DateService.php index 739cdb1c..5b7e45d0 100644 --- a/public/typo3conf/ext/ep_products/Classes/Service/DateService.php +++ b/public/typo3conf/ext/ep_products/Classes/Service/DateService.php @@ -102,12 +102,15 @@ class DateService implements SingletonInterface $filterSettings = $this->filterService->getDefaultFilterSettings(); } + $nonBookableDateUids = $this->productRepository->getNonBookableDateUids($product); + return $this->preprocessPriceTable([ 'priceTableData' => $this->productRepository->getPricetable($product, $hotel, $filterSettings, $date), 'template' => $template, 'paCode' => $paCode, 'isDayTrip' => $product->isDaytrip(), 'isHideBookingButton' => $product->getHideBookingButton(), + 'nonBookableDateUids' => $nonBookableDateUids, ]); } @@ -271,7 +274,7 @@ class DateService implements SingletonInterface public function preprocessPriceTable(array $options) { $resolver = new OptionsResolver(); - $resolver->setDefined(['paCode', 'isDayTrip', 'isHideBookingButton']); + $resolver->setDefined(['paCode', 'isDayTrip', 'isHideBookingButton', 'nonBookableDateUids']); $resolver->setRequired(['priceTableData', 'template']); $resolver->setDefault('isDayTrip', false); $resolver->setDefault('isHideBookingButton', false); @@ -282,10 +285,12 @@ class DateService implements SingletonInterface $template = $resolvedOptions['template']; $paCode = $resolvedOptions['paCode']; $isDayTrip = $resolvedOptions['isDayTrip']; - $isHideBookingButton = $resolvedOptions['isHideBookingButton']; + $nonBookableDateUids = $resolvedOptions['nonBookableDateUids']; foreach ($priceTableData as $row) { + $isHideBookingButton = $resolvedOptions['isHideBookingButton'] || in_array($row['dateUid'], $nonBookableDateUids, false); + $dateStart = new \DateTime($row['dateStart']); $dateEnd = new \DateTime($row['dateEnd']); $bookingUrl = BookingUrlUtility::generateUrl([ diff --git a/public/typo3conf/ext/ep_products/Configuration/TypoScript/setup.typoscript b/public/typo3conf/ext/ep_products/Configuration/TypoScript/setup.typoscript index 5b330dbe..ef92de7d 100644 --- a/public/typo3conf/ext/ep_products/Configuration/TypoScript/setup.typoscript +++ b/public/typo3conf/ext/ep_products/Configuration/TypoScript/setup.typoscript @@ -40,6 +40,7 @@ plugin.tx_epproducts { googleMapsApiKey = {$plugin.tx_eptheme.settings.googleMapsApiKey} resellerExportPageUid = {$plugin.tx_epproducts.settings.resellerExportPageUid} ratingPageUid = {$plugin.tx_eptheme.settings.ratingPageUid} + travelAlertPageUid = {$plugin.tx_eptheme.settings.travelAlertPageUid} searchPageHeaderImage = {$plugin.tx_eptheme.settings.searchPageHeaderImage} bpnBookingUrlTemplateCode = {$plugin.tx_eptheme.settings.bpnBookingUrlTemplateCode} groupsPricePopupPageUid = {$plugin.tx_eptheme.settings.groupsPricePopupPageUid} diff --git a/public/typo3conf/ext/ep_theme/Configuration/TypoScript/constants.typoscript b/public/typo3conf/ext/ep_theme/Configuration/TypoScript/constants.typoscript index 19988326..f894c0a3 100644 --- a/public/typo3conf/ext/ep_theme/Configuration/TypoScript/constants.typoscript +++ b/public/typo3conf/ext/ep_theme/Configuration/TypoScript/constants.typoscript @@ -60,6 +60,8 @@ plugin.tx_eptheme { bookingLinksPid = # cat=eptheme/200/330; type=string; label=Groups price popup page UID groupsPricePopupPageUid = + # cat=eptheme/200/340; type=string; label='Reisen Alert' page UID + travelAlertPageUid = # cat=eptheme/400/100; type=string; label=Phone number general phoneNumber = 0221 - 272 276 0 diff --git a/public/typo3conf/ext/ep_theme/Configuration/TypoScript/setup.typoscript b/public/typo3conf/ext/ep_theme/Configuration/TypoScript/setup.typoscript index 2eab4fcc..2a66c9cd 100644 --- a/public/typo3conf/ext/ep_theme/Configuration/TypoScript/setup.typoscript +++ b/public/typo3conf/ext/ep_theme/Configuration/TypoScript/setup.typoscript @@ -89,6 +89,7 @@ plugin.tx_eptheme { englishPageUid = {$plugin.tx_eptheme.settings.englishPageUid} germanPageUid = {$plugin.tx_eptheme.settings.germanPageUid} conceptsPageUid = {$plugin.tx_eptheme.settings.conceptsPageUid} + travelAlertPageUid = {$plugin.tx_eptheme.settings.travelAlertPageUid} myEpPageUid = {$plugin.tx_eptheme.settings.myEpPageUid} myEpApiEndpointUrl = {$plugin.tx_eptheme.settings.myEpApiEndpointUrl} myEpApiToken = {$plugin.tx_eptheme.settings.myEpApiToken} diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/DatesTable.vue b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/DatesTable.vue index 41f9f21e..ad9bff32 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/DatesTable.vue +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/DatesTable.vue @@ -73,6 +73,7 @@ Buchen + Reisen-Alert ausgebucht @@ -143,6 +144,10 @@ showHeader: { type: Boolean, default: true + }, + travelAlertUrl: { + type: String, + required: true } }, data () { diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/PriceTable.vue b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/PriceTable.vue index 7c7c25ae..ed6d3288 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/PriceTable.vue +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/js/components/PriceTable.vue @@ -77,6 +77,8 @@ Buchen + Reisen-Alert ausgebucht @@ -132,8 +134,12 @@ default: false }, showHeader: { - typoe: Boolean, + type: Boolean, default: true + }, + travelAlertUrl: { + type: String, + required: true } }, data () { diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/scss/remix/_buttons.scss b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/scss/remix/_buttons.scss index 0312d2a4..1d0b9aaa 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Assets/scss/remix/_buttons.scss +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Assets/scss/remix/_buttons.scss @@ -78,6 +78,11 @@ color: white; } + &--mute { + background-color: $color-grey-dark; + color: white; + } + .button-group &:not(:last-of-type) { margin-right: 8px; } diff --git a/public/typo3conf/ext/ep_theme/Resources/Private/Templates/Product/Detail.html b/public/typo3conf/ext/ep_theme/Resources/Private/Templates/Product/Detail.html index d579aa70..457d9325 100644 --- a/public/typo3conf/ext/ep_theme/Resources/Private/Templates/Product/Detail.html +++ b/public/typo3conf/ext/ep_theme/Resources/Private/Templates/Product/Detail.html @@ -159,6 +159,7 @@ :alt-label="altLabel" hotel-name="{hotel.name}" :bookable="bookable" + travel-alert-url="{f:uri.typolink(parameter: settings.travelAlertPageUid)}" > @@ -175,8 +176,12 @@
- +