fix: correct membershipFailedError logic
This commit is contained in:
committed by
Michael Zetterberg
parent
7213bde423
commit
afda7f851a
@@ -13,7 +13,6 @@ import Divider from "@/components/TempDesignSystem/Divider"
|
||||
import { getIntl } from "@/i18n"
|
||||
import BookingConfirmationProvider from "@/providers/BookingConfirmationProvider"
|
||||
|
||||
import Alerts from "./Alerts"
|
||||
import Confirmation from "./Confirmation"
|
||||
import Tracking from "./Tracking"
|
||||
import { mapRoomState } from "./utils"
|
||||
@@ -21,9 +20,11 @@ import { mapRoomState } from "./utils"
|
||||
import styles from "./bookingConfirmation.module.css"
|
||||
|
||||
import type { BookingConfirmationProps } from "@/types/components/hotelReservation/bookingConfirmation/bookingConfirmation"
|
||||
import { AlertTypeEnum } from "@/types/enums/alert"
|
||||
|
||||
export default async function BookingConfirmation({
|
||||
refId,
|
||||
membershipFailedError,
|
||||
}: BookingConfirmationProps) {
|
||||
const bookingConfirmation = await getBookingConfirmation(refId)
|
||||
|
||||
@@ -54,7 +55,18 @@ export default async function BookingConfirmation({
|
||||
>
|
||||
<Confirmation booking={booking} hotel={hotel} room={room} refId={refId}>
|
||||
<div className={styles.booking}>
|
||||
<Alerts booking={booking} />
|
||||
{membershipFailedError && (
|
||||
<Alert
|
||||
type={AlertTypeEnum.Info}
|
||||
heading={intl.formatMessage({
|
||||
defaultMessage: "Failed to verify membership",
|
||||
})}
|
||||
text={intl.formatMessage({
|
||||
defaultMessage:
|
||||
"Your booking(s) is confirmed but we could not verify your membership. If you have booked with a member discount, you'll either need to present your existing membership number upon check-in, become a member or pay the price difference at the hotel. Signing up is preferably done online before the stay.",
|
||||
})}
|
||||
/>
|
||||
)}
|
||||
<Rooms
|
||||
booking={booking}
|
||||
checkInTime={hotel.hotelFacts.checkin.checkInTime}
|
||||
|
||||
Reference in New Issue
Block a user