feat: add no breakfast message to price details modal and to conf page receipt
This commit is contained in:
@@ -13,6 +13,7 @@ import Button from "@/components/TempDesignSystem/Button"
|
||||
import Link from "@/components/TempDesignSystem/Link"
|
||||
import { formatPrice } from "@/utils/numberFormatting"
|
||||
|
||||
import Breakfast from "./Breakfast"
|
||||
import RoomSkeletonLoader from "./RoomSkeletonLoader"
|
||||
|
||||
import styles from "./room.module.css"
|
||||
@@ -34,8 +35,7 @@ export default function ReceiptRoom({
|
||||
if (!room) {
|
||||
return <RoomSkeletonLoader />
|
||||
}
|
||||
const breakfastIncluded =
|
||||
room.breakfastIncluded || room.rateDefinition.breakfastIncluded
|
||||
|
||||
const childBedCrib = room.childBedPreferences.find(
|
||||
(c) => c.bedType === ChildBedTypeEnum.Crib
|
||||
)
|
||||
@@ -63,6 +63,8 @@ export default function ReceiptRoom({
|
||||
guestsParts.push(childrenMsg)
|
||||
}
|
||||
|
||||
const guests = guestsParts.join(", ")
|
||||
|
||||
return (
|
||||
<article className={styles.room}>
|
||||
<header className={styles.roomHeader}>
|
||||
@@ -83,9 +85,7 @@ export default function ReceiptRoom({
|
||||
</Typography>
|
||||
)}
|
||||
<Typography variant="Body/Paragraph/mdRegular">
|
||||
<p className={styles.uiTextMediumContrast}>
|
||||
{guestsParts.join(", ")}
|
||||
</p>
|
||||
<p className={styles.uiTextMediumContrast}>{guests}</p>
|
||||
</Typography>
|
||||
<Typography variant="Body/Paragraph/mdRegular">
|
||||
<p className={styles.uiTextMediumContrast}>
|
||||
@@ -226,37 +226,11 @@ export default function ReceiptRoom({
|
||||
</Typography>
|
||||
</div>
|
||||
) : null}
|
||||
{room.breakfast || breakfastIncluded ? (
|
||||
<div className={styles.entry}>
|
||||
<Typography variant="Body/Paragraph/mdRegular">
|
||||
<p>
|
||||
{intl.formatMessage({
|
||||
defaultMessage: "Breakfast buffet",
|
||||
})}
|
||||
</p>
|
||||
</Typography>
|
||||
{breakfastIncluded ? (
|
||||
<Typography variant="Body/Paragraph/mdRegular">
|
||||
<p className={styles.red}>
|
||||
{intl.formatMessage({
|
||||
defaultMessage: "Included",
|
||||
})}
|
||||
</p>
|
||||
</Typography>
|
||||
) : null}
|
||||
{room.breakfast && !breakfastIncluded ? (
|
||||
<Typography variant="Body/Paragraph/mdRegular">
|
||||
<p className={styles.uiTextHighContrast}>
|
||||
{formatPrice(
|
||||
intl,
|
||||
room.breakfast.totalPrice,
|
||||
room.breakfast.currency
|
||||
)}
|
||||
</p>
|
||||
</Typography>
|
||||
) : null}
|
||||
</div>
|
||||
) : null}
|
||||
<Breakfast
|
||||
breakfast={room.breakfast}
|
||||
breakfastIncluded={room.breakfastIncluded}
|
||||
guests={guests}
|
||||
/>
|
||||
</article>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user