Merged in feat/SW-1026-breakfast-for-kids (pull request #1038)

feat(SW-1026): added info regarding children breakfast

* feat(SW-1026): added info regarding children breakfast

* fix: remove hardcoded currency

* fix(SW-1026): remove price for no breakfast

* fix: missing translation


Approved-by: Christian Andolf
Approved-by: Arvid Norlin
This commit is contained in:
Tobias Johansson
2024-12-09 14:58:54 +00:00
parent 420bf88820
commit 9b1d70b3be
9 changed files with 110 additions and 67 deletions

View File

@@ -115,19 +115,18 @@ export default function SummaryUI({
</Body>
</div>
<Caption color="uiTextMediumContrast">
{intl.formatMessage(
{`${intl.formatMessage(
{ id: "booking.adults" },
{ totalAdults: adults }
)}
)}${
children?.length
? `, ${intl.formatMessage(
{ id: "booking.children" },
{ totalChildren: children.length }
)}`
: ""
}`}
</Caption>
{children?.length ? (
<Caption color="uiTextMediumContrast">
{intl.formatMessage(
{ id: "booking.children" },
{ totalChildren: children.length }
)}
</Caption>
) : null}
<Caption color="uiTextMediumContrast">{cancellationText}</Caption>
<Popover
placement="bottom left"
@@ -197,16 +196,40 @@ export default function SummaryUI({
</div>
) : null}
{breakfast ? (
<div className={styles.entry}>
<div>
<Body color="uiTextHighContrast">
{intl.formatMessage({ id: "Breakfast buffet" })}
</Body>
<Body color="uiTextHighContrast">
{intl.formatNumber(parseInt(breakfast.localPrice.totalPrice), {
currency: breakfast.localPrice.currency,
style: "currency",
})}
</Body>
<div className={styles.entry}>
<Caption color="uiTextMediumContrast">
{intl.formatMessage(
{ id: "booking.adults" },
{ totalAdults: adults }
)}
</Caption>
<Body color="uiTextHighContrast">
{intl.formatNumber(parseInt(breakfast.localPrice.totalPrice), {
currency: breakfast.localPrice.currency,
style: "currency",
})}
</Body>
</div>
{children?.length ? (
<div className={styles.entry}>
<Caption color="uiTextMediumContrast">
{intl.formatMessage(
{ id: "booking.children" },
{ totalChildren: children.length }
)}
</Caption>
<Body color="uiTextHighContrast">
{intl.formatNumber(0, {
currency: breakfast.localPrice.currency,
style: "currency",
})}
</Body>
</div>
) : null}
</div>
) : null}
</div>