Merged in feat/BOOK-426-add-campaign-tag-select-hotel (pull request #3023)
Feat/BOOK-426 add campaign tag select hotel * feat(BOOK-426): introduce campaign tag on select hotel card * feat(BOOK-426): remove redundant tags * feat(BOOK-426): fix comments, change to typography * feat(BOOK-426): fix comments, update to cx Approved-by: Erik Tiekstra Approved-by: Matilda Landström
This commit is contained in:
@@ -108,7 +108,7 @@ export type HotelCardProps = {
|
||||
isAlternative?: boolean
|
||||
pointsCurrency?: CurrencyEnum
|
||||
fullPrice: boolean
|
||||
|
||||
isCampaignWithBookingCode: boolean
|
||||
lang: Lang
|
||||
|
||||
belowInfoSlot: React.ReactNode
|
||||
@@ -133,6 +133,7 @@ export const HotelCard = memo(
|
||||
lang,
|
||||
belowInfoSlot,
|
||||
fullPrice,
|
||||
isCampaignWithBookingCode,
|
||||
onAddressClick,
|
||||
onHover,
|
||||
onHoverEnd,
|
||||
@@ -166,6 +167,10 @@ export const HotelCard = memo(
|
||||
})
|
||||
|
||||
const isDisabled = prices?.redemptions?.length && hasInsufficientPoints
|
||||
const isCampaign =
|
||||
prices?.public?.rateType === RateTypeEnum.PublicPromotion ||
|
||||
prices?.member?.rateType === RateTypeEnum.PublicPromotion
|
||||
const showBookingCodeChip = bookingCode || isCampaign
|
||||
|
||||
return (
|
||||
<article
|
||||
@@ -267,10 +272,14 @@ export const HotelCard = memo(
|
||||
<NoPriceAvailableCard />
|
||||
) : (
|
||||
<>
|
||||
{bookingCode && (
|
||||
{showBookingCodeChip && (
|
||||
<BookingCodeChip
|
||||
bookingCode={bookingCode}
|
||||
isUnavailable={fullPrice}
|
||||
isCampaignUnavailable={
|
||||
isCampaignWithBookingCode && fullPrice
|
||||
}
|
||||
isCampaign={isCampaign}
|
||||
/>
|
||||
)}
|
||||
{(!isUserLoggedIn ||
|
||||
@@ -280,6 +289,7 @@ export const HotelCard = memo(
|
||||
<HotelPriceCard
|
||||
productTypePrices={prices.public}
|
||||
className={styles.priceCard}
|
||||
isCampaign={isCampaign}
|
||||
/>
|
||||
)}
|
||||
{prices.member && (
|
||||
|
||||
Reference in New Issue
Block a user