Merged in fix/SW-1153-correct-breakfast-message (pull request #1060)
fix(SW-1153): fix breakfast message for ScandicGo hotels Approved-by: Pontus Dreij
This commit is contained in:
@@ -20,9 +20,11 @@ import styles from "./roomCard.module.css"
|
||||
|
||||
import type { RoomCardProps } from "@/types/components/hotelReservation/selectRate/roomCard"
|
||||
import { RoomPackageCodeEnum } from "@/types/components/hotelReservation/selectRate/roomFilter"
|
||||
import { HotelTypeEnum } from "@/types/enums/hotelType"
|
||||
|
||||
export default function RoomCard({
|
||||
hotelId,
|
||||
hotelType,
|
||||
rateDefinitions,
|
||||
roomConfiguration,
|
||||
roomCategories,
|
||||
@@ -59,17 +61,14 @@ export default function RoomCard({
|
||||
}
|
||||
|
||||
const getBreakfastMessage = (rate: RateDefinition | undefined) => {
|
||||
const breakfastIncluded = getRateDefinitionForRate(rate)?.breakfastIncluded
|
||||
switch (breakfastIncluded) {
|
||||
case true:
|
||||
return intl.formatMessage({ id: "Breakfast is included." })
|
||||
case false:
|
||||
return intl.formatMessage({ id: "Breakfast selection in next step." })
|
||||
default:
|
||||
return intl.formatMessage({
|
||||
id: "Breakfast deal can be purchased at the hotel.",
|
||||
})
|
||||
if (hotelType === HotelTypeEnum.ScandicGo) {
|
||||
return intl.formatMessage({
|
||||
id: "Breakfast deal can be purchased at the hotel.",
|
||||
})
|
||||
}
|
||||
return getRateDefinitionForRate(rate)?.breakfastIncluded
|
||||
? intl.formatMessage({ id: "Breakfast is included." })
|
||||
: intl.formatMessage({ id: "Breakfast selection in next step." })
|
||||
}
|
||||
|
||||
const petRoomPackage =
|
||||
|
||||
Reference in New Issue
Block a user