diff --git a/apps/scandic-web/components/HotelReservation/EnterDetails/Confirm/index.tsx b/apps/scandic-web/components/HotelReservation/EnterDetails/Confirm/index.tsx index 0431286ca..36e7657db 100644 --- a/apps/scandic-web/components/HotelReservation/EnterDetails/Confirm/index.tsx +++ b/apps/scandic-web/components/HotelReservation/EnterDetails/Confirm/index.tsx @@ -125,3 +125,23 @@ export default function ConfirmBooking({ ) } + +export function ConfirmBookingRedemption() { + const intl = useIntl() + return ( +
+
+ +

+ {intl.formatMessage({ + id: "When you confirm the booking the room will be guaranteed for late arrival. If you fail to arrive without cancelling in advance or if you cancel after 18:00 local time, you will be charged for one reward night.", + })} +

+
+
+
+ +
+
+ ) +} diff --git a/apps/scandic-web/components/HotelReservation/EnterDetails/Payment/PaymentClient.tsx b/apps/scandic-web/components/HotelReservation/EnterDetails/Payment/PaymentClient.tsx index 687a98739..536f37b27 100644 --- a/apps/scandic-web/components/HotelReservation/EnterDetails/Payment/PaymentClient.tsx +++ b/apps/scandic-web/components/HotelReservation/EnterDetails/Payment/PaymentClient.tsx @@ -12,6 +12,7 @@ import { BookingStatusEnum, PAYMENT_METHOD_TITLES, PaymentMethodEnum, + REDEMPTION, } from "@/constants/booking" import { bookingConfirmation, @@ -31,7 +32,7 @@ import useLang from "@/hooks/useLang" import { trackPaymentEvent } from "@/utils/tracking" import { bedTypeMap } from "../../utils" -import ConfirmBooking from "../Confirm" +import ConfirmBooking, { ConfirmBookingRedemption } from "../Confirm" import PriceChangeDialog from "../PriceChangeDialog" import GuaranteeDetails from "./GuaranteeDetails" import { hasFlexibleRate, hasPrepaidRate, isPaymentMethodEnum } from "./helpers" @@ -408,7 +409,9 @@ export default function PaymentClient({ onSubmit={methods.handleSubmit(handleSubmit)} id={formId} > - {hasOnlyFlexRates && !bookingMustBeGuaranteed ? ( + {booking.searchType === REDEMPTION ? ( + + ) : hasOnlyFlexRates && !bookingMustBeGuaranteed ? ( ) : ( <> diff --git a/apps/scandic-web/components/HotelReservation/EnterDetails/Summary/UI/PriceDetailsTable/index.tsx b/apps/scandic-web/components/HotelReservation/EnterDetails/Summary/UI/PriceDetailsTable/index.tsx index c15f96b58..379f7af50 100644 --- a/apps/scandic-web/components/HotelReservation/EnterDetails/Summary/UI/PriceDetailsTable/index.tsx +++ b/apps/scandic-web/components/HotelReservation/EnterDetails/Summary/UI/PriceDetailsTable/index.tsx @@ -108,6 +108,11 @@ export default function PriceDetailsTable({ const duration = ` ${dt(fromDate).locale(lang).format("ddd, D MMM")} - ${dt(toDate).locale(lang).format("ddd, D MMM")} (${nights})` + const noVatCurrencies = [ + CurrencyEnum.CC, + CurrencyEnum.POINTS, + CurrencyEnum.Voucher, + ] return ( {rooms.map((room, idx) => { @@ -133,7 +138,8 @@ export default function PriceDetailsTable({ "corporateCheque" in room.roomRate ? room.roomRate.corporateCheque : undefined - if (!price) { + const redemptionPrice = "redemption" in room.roomRate ? room.roomRate.redemption : undefined + if (!price && !voucherPrice && !chequePrice && !redemptionPrice) { return null } return ( @@ -211,6 +217,19 @@ export default function PriceDetailsTable({ )} /> )} + {redemptionPrice && ( + + )} {room.breakfast ? ( @@ -264,19 +283,25 @@ export default function PriceDetailsTable({ })} - {totalPrice.local.currency !== CurrencyEnum.Voucher && - totalPrice.local.currency !== CurrencyEnum.CC ? ( - <> - - - - ) : null} + { + // @ts-expect-error Currency type is string instead of CurrencyEnum. Change also impacts packages + !noVatCurrencies.includes(totalPrice.local.currency) ? ( + <> + + + + ) : null + } - {totalPrice.local.regularPrice && ( + {totalPrice.local.regularPrice ? ( - )} + ) : null} {bookingCode && totalPrice.local.regularPrice && (
@@ -295,7 +320,7 @@ export default function PriceDetailsTable({
@@ -308,7 +333,7 @@ export default function PriceDetailsTable({
diff --git a/apps/scandic-web/components/HotelReservation/SelectRate/RoomsContainer/RateSummary/index.tsx b/apps/scandic-web/components/HotelReservation/SelectRate/RoomsContainer/RateSummary/index.tsx index f7bbae24a..370cdc08d 100644 --- a/apps/scandic-web/components/HotelReservation/SelectRate/RoomsContainer/RateSummary/index.tsx +++ b/apps/scandic-web/components/HotelReservation/SelectRate/RoomsContainer/RateSummary/index.tsx @@ -3,7 +3,6 @@ import { useRouter } from "next/navigation" import { useState, useTransition } from "react" import { useIntl } from "react-intl" -import { REDEMPTION } from "@/constants/booking" import { dt } from "@/lib/dt" import { useRatesStore } from "@/stores/select-rate" @@ -46,7 +45,6 @@ export default function RateSummary({ isUserLoggedIn }: RateSummaryProps) { searchParams, } = useRatesStore((state) => ({ bookingCode: state.booking.bookingCode, - isRedemption: state.booking.searchType === REDEMPTION, bookingRooms: state.booking.rooms, dates: { checkInDate: state.booking.fromDate, diff --git a/apps/scandic-web/i18n/dictionaries/da.json b/apps/scandic-web/i18n/dictionaries/da.json index d4ed19aa6..2edf3fa11 100644 --- a/apps/scandic-web/i18n/dictionaries/da.json +++ b/apps/scandic-web/i18n/dictionaries/da.json @@ -873,6 +873,7 @@ "When": "Hvornår", "When guaranteeing your booking with a credit card, we will hold the booking until 07:00 the day after check-in.": "Når vi garanterer din reservation med et kreditkort, tilbageholder vi reservationen indtil kl. 07.00 dagen efter indtjekning.", "When guaranteeing your booking, we will hold the booking until 07:00 until the day after check-in. This will provide you as a guest with added flexibility for check-in times.": "Når du garanterer din booking, vil vi holde bookingen indtil 07:00 til dagen efter check-in. Dette vil give dig som gæst tilføjet fleksibilitet til check-in-tider.", + "When you confirm the booking the room will be guaranteed for late arrival. If you fail to arrive without cancelling in advance or if you cancel after 18:00 local time, you will be charged for one reward night.": "Når du bekræfter din booking, vil den være garanteret sen ankomst (efter kl. 18.00) med dine point. Hvis du ikke ankommer og/eller ikke afbestiller din booking inden kl. 18 på ankomstdagen, vil du blive fratrukket point svarende til en nat.", "Where should you go next?": "Find inspiration til dit næste ophold", "Where to?": "Hvor?", "Which room class suits you the best?": "Hvilken rumklasse passer bedst til dig", diff --git a/apps/scandic-web/i18n/dictionaries/de.json b/apps/scandic-web/i18n/dictionaries/de.json index 1b73d0b1c..8f72f9ec2 100644 --- a/apps/scandic-web/i18n/dictionaries/de.json +++ b/apps/scandic-web/i18n/dictionaries/de.json @@ -871,6 +871,7 @@ "When": "Wann", "When guaranteeing your booking with a credit card, we will hold the booking until 07:00 the day after check-in.": "Wenn Sie Ihre Buchung mit einer Kreditkarte garantieren, halten wir die Buchung bis 07:00 Uhr am Tag nach dem Check-in aufrecht.", "When guaranteeing your booking, we will hold the booking until 07:00 until the day after check-in. This will provide you as a guest with added flexibility for check-in times.": "Wenn Sie Ihre Buchung garantieren, halten wir die Buchung bis 07:00 am Tag nach dem Check-in. Dies wird Ihnen als Gast zusätzliche Flexibilität für die Check-in-Zeiten gewähren.", + "When you confirm the booking the room will be guaranteed for late arrival. If you fail to arrive without cancelling in advance or if you cancel after 18:00 local time, you will be charged for one reward night.": "Sobald Sie die Buchung bestätigen, wird das Zimmer für eine späte Anreise garantiert. Sollten Sie nicht im Voraus oder nach 18 Uhr Ortszeit stornieren, dann wird Ihnen eine Bonusnacht berechnet.", "Where should you go next?": "Wo geht es als Nächstes hin?", "Where to?": "Wohin?", "Which room class suits you the best?": "Welche Zimmerklasse passt am besten zu Ihnen?", diff --git a/apps/scandic-web/i18n/dictionaries/en.json b/apps/scandic-web/i18n/dictionaries/en.json index 3c5d32adb..e9f25e02c 100644 --- a/apps/scandic-web/i18n/dictionaries/en.json +++ b/apps/scandic-web/i18n/dictionaries/en.json @@ -869,6 +869,7 @@ "When": "When", "When guaranteeing your booking with a credit card, we will hold the booking until 07:00 the day after check-in.": "When guaranteeing your booking with a credit card, we will hold the booking until 07:00 the day after check-in.", "When guaranteeing your booking, we will hold the booking until 07:00 until the day after check-in. This will provide you as a guest with added flexibility for check-in times.": "When guaranteeing your booking, we will hold the booking until 07:00 until the day after check-in. This will provide you as a guest with added flexibility for check-in times.", + "When you confirm the booking the room will be guaranteed for late arrival. If you fail to arrive without cancelling in advance or if you cancel after 18:00 local time, you will be charged for one reward night.": "When you confirm the booking the room will be guaranteed for late arrival. If you fail to arrive without cancelling in advance or if you cancel after 18:00 local time, you will be charged for one reward night.", "Where should you go next?": "Where should you go next?", "Where to?": "Where to?", "Which room class suits you the best?": "Which room class suits you the best?", diff --git a/apps/scandic-web/i18n/dictionaries/fi.json b/apps/scandic-web/i18n/dictionaries/fi.json index 77fffb6fc..10b8566d8 100644 --- a/apps/scandic-web/i18n/dictionaries/fi.json +++ b/apps/scandic-web/i18n/dictionaries/fi.json @@ -871,6 +871,7 @@ "When": "Kun", "When guaranteeing your booking with a credit card, we will hold the booking until 07:00 the day after check-in.": "Kun takaamme varauksesi luottokortilla, pidätämme varauksen sisäänkirjautumisen jälkeisenä päivänä klo 07.00 asti.", "When guaranteeing your booking, we will hold the booking until 07:00 until the day after check-in. This will provide you as a guest with added flexibility for check-in times.": "Jos varaat varauksen, pidämme varauksen 07:00 päivän jälkeen tarkistuspäivän jälkeen. Tämä tarjoaa sinulle lisään tarkistuspäivän aikaan.", + "When you confirm the booking the room will be guaranteed for late arrival. If you fail to arrive without cancelling in advance or if you cancel after 18:00 local time, you will be charged for one reward night.": "Varaus on taattu myöhäistä saapumista varten. Jos perut saapumispäivänä klo 18.00 jälkeen tai et peru varaustasi ja jätät saapumatta, palkintoyön pisteet veloitetaan tililtäsi.", "Where should you go next?": "Mihin menisit seuraavaksi?", "Where to?": "Minne?", "Which room class suits you the best?": "Mikä huoneluokka sopii sinulle parhaiten?", diff --git a/apps/scandic-web/i18n/dictionaries/no.json b/apps/scandic-web/i18n/dictionaries/no.json index 1a375f2a5..5b5ab5ccc 100644 --- a/apps/scandic-web/i18n/dictionaries/no.json +++ b/apps/scandic-web/i18n/dictionaries/no.json @@ -867,6 +867,7 @@ "When": "Når", "When guaranteeing your booking with a credit card, we will hold the booking until 07:00 the day after check-in.": "Når vi garanterer bestillingen med kredittkort, vil vi holde bestillingen til kl. 07.00 dagen etter innsjekking.", "When guaranteeing your booking, we will hold the booking until 07:00 until the day after check-in. This will provide you as a guest with added flexibility for check-in times.": "Når du garanterer din reservasjon, vil vi holde reservasjonen til 07:00 til dagen etter check-in. Dette vil gi deg som gjest tilføjet fleksibilitet for check-in-tider.", + "When you confirm the booking the room will be guaranteed for late arrival. If you fail to arrive without cancelling in advance or if you cancel after 18:00 local time, you will be charged for one reward night.": "", "Where should you go next?": "Hvor ønsker du å reise neste gang?", "Where to?": "Hvor skal du?", "Which room class suits you the best?": "Hvilken romklasse passer deg best?", diff --git a/apps/scandic-web/i18n/dictionaries/sv.json b/apps/scandic-web/i18n/dictionaries/sv.json index d30dda063..f509852e7 100644 --- a/apps/scandic-web/i18n/dictionaries/sv.json +++ b/apps/scandic-web/i18n/dictionaries/sv.json @@ -869,6 +869,7 @@ "When": "När", "When guaranteeing your booking with a credit card, we will hold the booking until 07:00 the day after check-in.": "När vi garanterar din bokning med kreditkort kommer vi att hålla bokningen till kl. 07.00 dagen efter incheckningen.", "When guaranteeing your booking, we will hold the booking until 07:00 until the day after check-in. This will provide you as a guest with added flexibility for check-in times.": "När du garanterar din bokning kommer vi att hålla bokningen till 07:00 till dagen efter check-in. Detta ger dig som gäst extra flexibilitet för check-in-tider.", + "When you confirm the booking the room will be guaranteed for late arrival. If you fail to arrive without cancelling in advance or if you cancel after 18:00 local time, you will be charged for one reward night.": "När du slutför din bokning är rummet garanterad för sen ankomst. Om du uteblir eller avbokar senare än kl. 18:00 lokal tid, behåller vi poängen för din vistelse.", "Where should you go next?": "Låter inte en spontanweekend härligt?", "Where to?": "Vart?", "Which room class suits you the best?": "Vilken rumsklass passar dig bäst?",