Merged in feat/SW-1308-booking-codes-track-b (pull request #1607)
Feat/SW-1308 booking codes track b * feat: SW-1308 Booking codes track b * feat: SW-1308 Booking codes Track B implementation * feat: SW-1308 Optimized after rebase Approved-by: Arvid Norlin
This commit is contained in:
@@ -13,6 +13,7 @@ import HotelLogo from "@/components/Icons/Logos"
|
||||
import ImageGallery from "@/components/ImageGallery"
|
||||
import Button from "@/components/TempDesignSystem/Button"
|
||||
import Divider from "@/components/TempDesignSystem/Divider"
|
||||
import IconChip from "@/components/TempDesignSystem/IconChip"
|
||||
import Link from "@/components/TempDesignSystem/Link"
|
||||
import Body from "@/components/TempDesignSystem/Text/Body"
|
||||
import Caption from "@/components/TempDesignSystem/Text/Caption"
|
||||
@@ -22,8 +23,10 @@ import { getSingleDecimal } from "@/utils/numberFormatting"
|
||||
|
||||
import ReadMore from "../ReadMore"
|
||||
import TripAdvisorChip from "../TripAdvisorChip"
|
||||
import HotelChequeCard from "./HotelChequeCard"
|
||||
import HotelPointsRow from "./HotelPointsRow"
|
||||
import HotelPriceCard from "./HotelPriceCard"
|
||||
import HotelVoucherCard from "./HotelVoucherCard"
|
||||
import NoPriceAvailableCard from "./NoPriceAvailableCard"
|
||||
import { hotelCardVariants } from "./variants"
|
||||
|
||||
@@ -31,6 +34,7 @@ import styles from "./hotelCard.module.css"
|
||||
|
||||
import { HotelCardListingTypeEnum } from "@/types/components/hotelReservation/selectHotel/hotelCardListingProps"
|
||||
import type { HotelCardProps } from "@/types/components/hotelReservation/selectHotel/hotelCardProps"
|
||||
import { RateTypeEnum } from "@/types/enums/rateType"
|
||||
import type { Lang } from "@/constants/languages"
|
||||
|
||||
function HotelCard({
|
||||
@@ -64,7 +68,8 @@ function HotelCard({
|
||||
const addressStr = `${hotel.address.streetAddress}, ${hotel.address.city}`
|
||||
const galleryImages = mapApiImagesToGalleryImages(hotel.galleryImages || [])
|
||||
const fullPrice =
|
||||
availability.productType?.public?.rateType?.toLowerCase() === "regular"
|
||||
availability.productType?.public?.rateType === RateTypeEnum.Regular ||
|
||||
availability.productType?.member?.rateType === RateTypeEnum.Regular
|
||||
const price = availability.productType
|
||||
|
||||
return (
|
||||
@@ -155,8 +160,12 @@ function HotelCard({
|
||||
<>
|
||||
{bookingCode && (
|
||||
<span className={`${fullPrice ? styles.strikedText : ""}`}>
|
||||
<PriceTagIcon height={20} width={20} />
|
||||
{bookingCode}
|
||||
<IconChip
|
||||
color="blue"
|
||||
icon={<PriceTagIcon height={20} width={20} />}
|
||||
>
|
||||
{bookingCode}
|
||||
</IconChip>
|
||||
</span>
|
||||
)}
|
||||
{(!isUserLoggedIn ||
|
||||
@@ -171,6 +180,12 @@ function HotelCard({
|
||||
isMemberPrice
|
||||
/>
|
||||
)}
|
||||
{price?.voucher && (
|
||||
<HotelVoucherCard productTypeVoucher={price.voucher} />
|
||||
)}
|
||||
{price?.bonusCheque && (
|
||||
<HotelChequeCard productTypeCheque={price.bonusCheque} />
|
||||
)}
|
||||
{!!price?.redemptions?.length && (
|
||||
<div className={styles.pointsCard}>
|
||||
<Caption>
|
||||
|
||||
Reference in New Issue
Block a user