Merged in feat/BOOK-426-campaign-tag-select-hotel (pull request #3037)
Feat/BOOK-426 campaign tag select hotel * fix(BOOK-426): do not show campaign tag if a regular booking code is used and the rate is a campaign * fix(BOOK-426): if no availability show booking code striketrough as default Approved-by: Erik Tiekstra
This commit is contained in:
@@ -83,11 +83,13 @@ export default function HotelCardListing({
|
||||
isBookingCodeRateAvailable &&
|
||||
activeCodeFilter === BookingCodeFilterEnum.Discounted
|
||||
|
||||
const hotelsWithBookingCode = hotelData.filter(
|
||||
(hotel) => hotel.availability?.bookingCode
|
||||
)
|
||||
const isCampaignWithBookingCode =
|
||||
!!bookingCode &&
|
||||
hotelData
|
||||
.filter((hotel) => hotel.availability.bookingCode)
|
||||
.every(
|
||||
hotelsWithBookingCode.length > 0 &&
|
||||
hotelsWithBookingCode.every(
|
||||
(hotel) =>
|
||||
hotel.availability.productType?.public?.rateType ===
|
||||
RateTypeEnum.PublicPromotion ||
|
||||
|
||||
@@ -279,7 +279,7 @@ export const HotelCard = memo(
|
||||
isCampaignUnavailable={
|
||||
isCampaignWithBookingCode && fullPrice
|
||||
}
|
||||
isCampaign={isCampaign}
|
||||
isCampaign={isCampaign && !(fullPrice && bookingCode)}
|
||||
/>
|
||||
)}
|
||||
{(!isUserLoggedIn ||
|
||||
|
||||
Reference in New Issue
Block a user