feat: SW-2028 Updated Guarantee notification
This commit is contained in:
@@ -125,3 +125,23 @@ export default function ConfirmBooking({
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export function ConfirmBookingRedemption() {
|
||||
const intl = useIntl()
|
||||
return (
|
||||
<div className={styles.container}>
|
||||
<div className={styles.guaranteeContainer}>
|
||||
<Typography variant="Body/Supporting text (caption)/smRegular">
|
||||
<p>
|
||||
{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.",
|
||||
})}
|
||||
</p>
|
||||
</Typography>
|
||||
</div>
|
||||
<div className={styles.checkboxContainer}>
|
||||
<TermsAndConditions />
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -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 ? (
|
||||
<ConfirmBookingRedemption />
|
||||
) : hasOnlyFlexRates && !bookingMustBeGuaranteed ? (
|
||||
<ConfirmBooking savedCreditCards={savedCreditCards} />
|
||||
) : (
|
||||
<>
|
||||
|
||||
@@ -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 (
|
||||
<table className={styles.priceDetailsTable}>
|
||||
{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 && (
|
||||
<Row
|
||||
bold
|
||||
label={intl.formatMessage({ id: "Room charge" })}
|
||||
value={formatPrice(
|
||||
intl,
|
||||
redemptionPrice.localPrice.pointsPerStay,
|
||||
CurrencyEnum.POINTS,
|
||||
redemptionPrice.localPrice.additionalPricePerStay,
|
||||
redemptionPrice.localPrice.currency ?? undefined
|
||||
)}
|
||||
/>
|
||||
)}
|
||||
</TableSection>
|
||||
|
||||
{room.breakfast ? (
|
||||
@@ -264,19 +283,25 @@ export default function PriceDetailsTable({
|
||||
})}
|
||||
<TableSection>
|
||||
<TableSectionHeader title={intl.formatMessage({ id: "Total" })} />
|
||||
{totalPrice.local.currency !== CurrencyEnum.Voucher &&
|
||||
totalPrice.local.currency !== CurrencyEnum.CC ? (
|
||||
<>
|
||||
<Row
|
||||
label={intl.formatMessage({ id: "Price excluding VAT" })}
|
||||
value={formatPrice(intl, priceExclVat, totalPrice.local.currency)}
|
||||
/>
|
||||
<Row
|
||||
label={intl.formatMessage({ id: "VAT {vat}%" }, { vat })}
|
||||
value={formatPrice(intl, vatAmount, totalPrice.local.currency)}
|
||||
/>
|
||||
</>
|
||||
) : null}
|
||||
{
|
||||
// @ts-expect-error Currency type is string instead of CurrencyEnum. Change also impacts packages
|
||||
!noVatCurrencies.includes(totalPrice.local.currency) ? (
|
||||
<>
|
||||
<Row
|
||||
label={intl.formatMessage({ id: "Price excluding VAT" })}
|
||||
value={formatPrice(
|
||||
intl,
|
||||
priceExclVat,
|
||||
totalPrice.local.currency
|
||||
)}
|
||||
/>
|
||||
<Row
|
||||
label={intl.formatMessage({ id: "VAT {vat}%" }, { vat })}
|
||||
value={formatPrice(intl, vatAmount, totalPrice.local.currency)}
|
||||
/>
|
||||
</>
|
||||
) : null
|
||||
}
|
||||
<tr className={styles.row}>
|
||||
<td>
|
||||
<Body textTransform="bold">
|
||||
@@ -295,7 +320,7 @@ export default function PriceDetailsTable({
|
||||
</Body>
|
||||
</td>
|
||||
</tr>
|
||||
{totalPrice.local.regularPrice && (
|
||||
{totalPrice.local.regularPrice ? (
|
||||
<tr className={styles.row}>
|
||||
<td></td>
|
||||
<td className={styles.price}>
|
||||
@@ -308,7 +333,7 @@ export default function PriceDetailsTable({
|
||||
</Caption>
|
||||
</td>
|
||||
</tr>
|
||||
)}
|
||||
) : null}
|
||||
{bookingCode && totalPrice.local.regularPrice && (
|
||||
<tr className={styles.row}>
|
||||
<td>
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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?",
|
||||
|
||||
@@ -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?",
|
||||
|
||||
@@ -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?",
|
||||
|
||||
@@ -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?",
|
||||
|
||||
@@ -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?",
|
||||
|
||||
Reference in New Issue
Block a user