diff --git a/apps/scandic-web/components/BookingCodeChip/bookingCodeChip.module.css b/apps/scandic-web/components/BookingCodeChip/bookingCodeChip.module.css index 5d439bbfa..97e4fd9a2 100644 --- a/apps/scandic-web/components/BookingCodeChip/bookingCodeChip.module.css +++ b/apps/scandic-web/components/BookingCodeChip/bookingCodeChip.module.css @@ -3,7 +3,7 @@ gap: var(--Space-x05); } -.bookingCodeChip .unavailable { +.unavailable { text-decoration: line-through; } diff --git a/apps/scandic-web/components/BookingCodeChip/index.tsx b/apps/scandic-web/components/BookingCodeChip/index.tsx index e76d61fcd..9c5813b2f 100644 --- a/apps/scandic-web/components/BookingCodeChip/index.tsx +++ b/apps/scandic-web/components/BookingCodeChip/index.tsx @@ -65,24 +65,16 @@ export default function BookingCodeChip({ icon={} className={alignCenter ? styles.center : undefined} > -

+

{intl.formatMessage({ defaultMessage: "Booking code" })} - - {isUnavailable - ? intl.formatMessage( - { defaultMessage: "{code} unavailable" }, - { code: bookingCode } - ) - : intl.formatMessage( - { defaultMessage: "{code} applied" }, - { code: bookingCode } - )} - + {bookingCode}

diff --git a/apps/scandic-web/components/HotelReservation/HotelCard/HotelChequeCard/index.tsx b/apps/scandic-web/components/HotelReservation/HotelCard/HotelChequeCard/index.tsx index c7c81a192..c40713e1a 100644 --- a/apps/scandic-web/components/HotelReservation/HotelCard/HotelChequeCard/index.tsx +++ b/apps/scandic-web/components/HotelReservation/HotelCard/HotelChequeCard/index.tsx @@ -27,7 +27,7 @@ export default function HotelChequeCard({ {productTypeCheque.localPrice.numberOfCheques} {CurrencyEnum.CC} - {productTypeCheque.localPrice.additionalPricePerStay && ( + {productTypeCheque.localPrice.additionalPricePerStay > 0 ? ( <> {"+"} @@ -37,10 +37,11 @@ export default function HotelChequeCard({ {productTypeCheque.localPrice.currency} - )} + ) : null} - {productTypeCheque.requestedPrice ? ( + {productTypeCheque.requestedPrice && + productTypeCheque.requestedPrice.additionalPricePerStay > 0 ? (
{intl.formatMessage({ diff --git a/apps/scandic-web/components/HotelReservation/HotelCard/index.tsx b/apps/scandic-web/components/HotelReservation/HotelCard/index.tsx index ec2933243..f525626ba 100644 --- a/apps/scandic-web/components/HotelReservation/HotelCard/index.tsx +++ b/apps/scandic-web/components/HotelReservation/HotelCard/index.tsx @@ -69,9 +69,7 @@ function HotelCard({ const addressStr = `${hotel.address.streetAddress}, ${hotel.address.city}` const galleryImages = mapApiImagesToGalleryImages(hotel.galleryImages || []) - const fullPrice = - !availability.productType?.public?.bookingCode && - !availability.productType?.member?.bookingCode + const fullPrice = !availability.bookingCode const price = availability.productType const hasInsufficientPoints = !price?.redemptions?.some( diff --git a/apps/scandic-web/components/HotelReservation/HotelCardDialog/ListingHotelCardDialog/index.tsx b/apps/scandic-web/components/HotelReservation/HotelCardDialog/ListingHotelCardDialog/index.tsx index db216eb16..85d5cfe98 100644 --- a/apps/scandic-web/components/HotelReservation/HotelCardDialog/ListingHotelCardDialog/index.tsx +++ b/apps/scandic-web/components/HotelReservation/HotelCardDialog/ListingHotelCardDialog/index.tsx @@ -2,6 +2,8 @@ import { useSession } from "next-auth/react" import { useIntl } from "react-intl" +import { Typography } from "@scandic-hotels/design-system/Typography" + import { selectRate } from "@/constants/routes/hotelReservation" import { FacilityToIcon } from "@/components/ContentType/HotelPage/data" @@ -47,6 +49,8 @@ export default function ListingHotelCardDialog({ ratings, operaId, redemptionPrice, + chequePrice, + voucherPrice, } = data const firstImage = images[0]?.imageSizes?.small @@ -81,7 +85,11 @@ export default function ListingHotelCardDialog({
- {publicPrice || memberPrice || redemptionPrice ? ( + {publicPrice || + memberPrice || + redemptionPrice || + voucherPrice || + chequePrice ? (
{redemptionPrice ? ( @@ -130,6 +138,63 @@ export default function ListingHotelCardDialog({ {redemptionPrice && ( )} + {chequePrice && ( + + {intl.formatMessage( + { + defaultMessage: "{price} {currency}", + }, + { + price: chequePrice.numberOfCheques, + currency: "CC", + } + )} + {chequePrice.additionalPricePerStay > 0 + ? // eslint-disable-next-line formatjs/no-literal-string-in-jsx + " + " + + intl.formatMessage( + { + defaultMessage: "{price} {currency}", + }, + { + price: chequePrice.additionalPricePerStay, + currency: chequePrice.currency, + } + ) + : null} + + {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */} + + / + {intl.formatMessage({ + defaultMessage: "night", + })} + + + + )} + {voucherPrice && ( + + {intl.formatMessage( + { + defaultMessage: "{price} {currency}", + }, + { + price: voucherPrice, + currency, + } + )} + + {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */} + + / + {intl.formatMessage({ + defaultMessage: "night", + })} + + + + )}