diff --git a/components/HotelReservation/EnterDetails/Breakfast/breakfast.module.css b/components/HotelReservation/EnterDetails/Breakfast/breakfast.module.css index f24c6ba64..3fad97a5a 100644 --- a/components/HotelReservation/EnterDetails/Breakfast/breakfast.module.css +++ b/components/HotelReservation/EnterDetails/Breakfast/breakfast.module.css @@ -1,3 +1,9 @@ +.container { + display: flex; + flex-direction: column; + gap: var(--Spacing-x2); +} + .form { display: grid; gap: var(--Spacing-x2); diff --git a/components/HotelReservation/EnterDetails/Breakfast/index.tsx b/components/HotelReservation/EnterDetails/Breakfast/index.tsx index 088aa2974..8ecb9b68d 100644 --- a/components/HotelReservation/EnterDetails/Breakfast/index.tsx +++ b/components/HotelReservation/EnterDetails/Breakfast/index.tsx @@ -9,6 +9,7 @@ import { useEnterDetailsStore } from "@/stores/enter-details" import { Highlight } from "@/components/TempDesignSystem/Form/ChoiceCard/_Card" import RadioCard from "@/components/TempDesignSystem/Form/ChoiceCard/Radio" +import Body from "@/components/TempDesignSystem/Text/Body" import { breakfastFormSchema } from "./schema" @@ -43,6 +44,11 @@ export default function Breakfast({ packages }: BreakfastProps) { const updateBreakfast = useEnterDetailsStore( (state) => state.actions.updateBreakfast ) + + const children = useEnterDetailsStore( + (state) => state.booking.rooms[0].children + ) + const methods = useForm({ defaultValues: formValuesBreakfast ? { breakfast: formValuesBreakfast } @@ -75,60 +81,62 @@ export default function Breakfast({ packages }: BreakfastProps) { return ( -
- {packages.map((pkg) => ( - ( - { id: "breakfast.price.free" }, - { - amount: pkg.localPrice.price, - currency: pkg.localPrice.currency, - free: (str) => {str}, - strikethrough: (str) => {str}, - } - ) - : intl.formatMessage( - { id: "breakfast.price" }, - { - amount: pkg.localPrice.price, - currency: pkg.localPrice.currency, - } - ) - } - text={intl.formatMessage({ - id: "All our breakfast buffets offer gluten free, vegan, and allergy-friendly options.", +
+ {children?.length ? ( + + {intl.formatMessage({ + id: "Children's breakfast is always free as part of the adult's breakfast.", })} - title={intl.formatMessage({ id: "Breakfast buffet" })} - value={pkg.code} + + ) : null} + + {packages.map((pkg) => ( + ( + { id: "breakfast.price.free" }, + { + amount: pkg.localPrice.price, + currency: pkg.localPrice.currency, + free: (str) => {str}, + strikethrough: (str) => {str}, + } + ) + : intl.formatMessage( + { id: "breakfast.price" }, + { + amount: pkg.localPrice.price, + currency: pkg.localPrice.currency, + } + ) + } + text={intl.formatMessage({ + id: "All our breakfast buffets offer gluten free, vegan, and allergy-friendly options.", + })} + title={intl.formatMessage({ id: "Breakfast buffet" })} + value={pkg.code} + handleSelectedOnClick={ + breakfast === pkg.code ? completeStep : undefined + } + /> + ))} + - ))} - - + +
) } diff --git a/components/HotelReservation/EnterDetails/Summary/UI/index.tsx b/components/HotelReservation/EnterDetails/Summary/UI/index.tsx index 5b01a1c01..5a84dde6e 100644 --- a/components/HotelReservation/EnterDetails/Summary/UI/index.tsx +++ b/components/HotelReservation/EnterDetails/Summary/UI/index.tsx @@ -115,19 +115,18 @@ export default function SummaryUI({ - {intl.formatMessage( + {`${intl.formatMessage( { id: "booking.adults" }, { totalAdults: adults } - )} + )}${ + children?.length + ? `, ${intl.formatMessage( + { id: "booking.children" }, + { totalChildren: children.length } + )}` + : "" + }`} - {children?.length ? ( - - {intl.formatMessage( - { id: "booking.children" }, - { totalChildren: children.length } - )} - - ) : null} {cancellationText} ) : null} {breakfast ? ( -
+
{intl.formatMessage({ id: "Breakfast buffet" })} - - {intl.formatNumber(parseInt(breakfast.localPrice.totalPrice), { - currency: breakfast.localPrice.currency, - style: "currency", - })} - +
+ + {intl.formatMessage( + { id: "booking.adults" }, + { totalAdults: adults } + )} + + + {intl.formatNumber(parseInt(breakfast.localPrice.totalPrice), { + currency: breakfast.localPrice.currency, + style: "currency", + })} + +
+ {children?.length ? ( +
+ + {intl.formatMessage( + { id: "booking.children" }, + { totalChildren: children.length } + )} + + + {intl.formatNumber(0, { + currency: breakfast.localPrice.currency, + style: "currency", + })} + +
+ ) : null}
) : null}
diff --git a/i18n/dictionaries/da.json b/i18n/dictionaries/da.json index ab489fcc6..20ca8dea2 100644 --- a/i18n/dictionaries/da.json +++ b/i18n/dictionaries/da.json @@ -70,6 +70,7 @@ "Check out the credit cards saved to your profile. Pay with a saved card when signed in for a smoother web experience.": "Tjek de kreditkort, der er gemt på din profil. Betal med et gemt kort, når du er logget ind for en mere jævn weboplevelse.", "Check-in/Check-out": "Indtjekning/Udtjekning", "Children": "børn", + "Children's breakfast is always free as part of the adult's breakfast.": "Barnemorgenmad er altid gratis som en del af voksenmorgenmaden.", "Choose room": "Vælg rum", "Cities": "Byer", "City": "By", diff --git a/i18n/dictionaries/de.json b/i18n/dictionaries/de.json index 8003f98cb..61450323b 100644 --- a/i18n/dictionaries/de.json +++ b/i18n/dictionaries/de.json @@ -70,6 +70,7 @@ "Check out the credit cards saved to your profile. Pay with a saved card when signed in for a smoother web experience.": "Sehen Sie sich die in Ihrem Profil gespeicherten Kreditkarten an. Bezahlen Sie mit einer gespeicherten Karte, wenn Sie angemeldet sind, für ein reibungsloseres Web-Erlebnis.", "Check-in/Check-out": "Einchecken/Auschecken", "Children": "Kinder", + "Children's breakfast is always free as part of the adult's breakfast.": "Kinderfrühstück ist immer kostenlos als Teil des Frühstücks der Erwachsenen.", "Choose room": "Zimmer wählen", "Cities": "Städte", "City": "Stadt", diff --git a/i18n/dictionaries/en.json b/i18n/dictionaries/en.json index e74b72323..0852ec63c 100644 --- a/i18n/dictionaries/en.json +++ b/i18n/dictionaries/en.json @@ -78,6 +78,7 @@ "Check-out": "Check-out", "Child age is required": "Child age is required", "Children": "Children", + "Children's breakfast is always free as part of the adult's breakfast.": "Children's breakfast is always free as part of the adult's breakfast.", "Choose room": "Choose room", "Cities": "Cities", "City": "City", diff --git a/i18n/dictionaries/fi.json b/i18n/dictionaries/fi.json index 69f7fdc41..078d8ce4b 100644 --- a/i18n/dictionaries/fi.json +++ b/i18n/dictionaries/fi.json @@ -70,6 +70,7 @@ "Check out the credit cards saved to your profile. Pay with a saved card when signed in for a smoother web experience.": "Tarkista profiiliisi tallennetut luottokortit. Maksa tallennetulla kortilla kirjautuneena, jotta verkkokokemus on sujuvampi.", "Check-in/Check-out": "Sisäänkirjautuminen/Uloskirjautuminen", "Children": "Lasta", + "Children's breakfast is always free as part of the adult's breakfast.": "Lapsen ateria on aina ilmainen osana isojen aterioita.", "Choose room": "Valitse huone", "Cities": "Kaupungit", "City": "Kaupunki", diff --git a/i18n/dictionaries/no.json b/i18n/dictionaries/no.json index 5f8855417..110f6a8d6 100644 --- a/i18n/dictionaries/no.json +++ b/i18n/dictionaries/no.json @@ -70,6 +70,7 @@ "Check out the credit cards saved to your profile. Pay with a saved card when signed in for a smoother web experience.": "Sjekk ut kredittkortene som er lagret på profilen din. Betal med et lagret kort når du er pålogget for en jevnere nettopplevelse.", "Check-in/Check-out": "Innsjekking/Utsjekking", "Children": "Barn", + "Children's breakfast is always free as part of the adult's breakfast.": "Barnemorgenmad er altid gratis som en del af voksenmorgenmaden.", "Choose room": "Velg rom", "Cities": "Byer", "City": "By", diff --git a/i18n/dictionaries/sv.json b/i18n/dictionaries/sv.json index fd945aa99..001c4a209 100644 --- a/i18n/dictionaries/sv.json +++ b/i18n/dictionaries/sv.json @@ -70,6 +70,7 @@ "Check out the credit cards saved to your profile. Pay with a saved card when signed in for a smoother web experience.": "Kolla in kreditkorten som sparats i din profil. Betala med ett sparat kort när du är inloggad för en smidigare webbupplevelse.", "Check-in/Check-out": "Inchecking/Utcheckning", "Children": "Barn", + "Children's breakfast is always free as part of the adult's breakfast.": "Barnens frukost är alltid gratis som en del av vuxnas frukost.", "Choose room": "Välj rum", "Cities": "Städer", "City": "Ort",