diff --git a/apps/scandic-web/components/HotelReservation/EnterDetails/Breakfast/BreakfastChoiceCard/ancillaryChoiceCard.module.css b/apps/scandic-web/components/HotelReservation/EnterDetails/Breakfast/BreakfastChoiceCard/ancillaryChoiceCard.module.css deleted file mode 100644 index be166de5e..000000000 --- a/apps/scandic-web/components/HotelReservation/EnterDetails/Breakfast/BreakfastChoiceCard/ancillaryChoiceCard.module.css +++ /dev/null @@ -1,3 +0,0 @@ -.ancillaryChoiceCard:hover { - cursor: pointer; -} diff --git a/apps/scandic-web/components/HotelReservation/EnterDetails/Breakfast/BreakfastChoiceCard/index.tsx b/apps/scandic-web/components/HotelReservation/EnterDetails/Breakfast/BreakfastChoiceCard/index.tsx deleted file mode 100644 index a6a1d7df0..000000000 --- a/apps/scandic-web/components/HotelReservation/EnterDetails/Breakfast/BreakfastChoiceCard/index.tsx +++ /dev/null @@ -1,39 +0,0 @@ -import { useFormContext } from "react-hook-form" - -import { AncillaryCard } from "@/components/TempDesignSystem/AncillaryCard" - -import styles from "./ancillaryChoiceCard.module.css" - -import type { BreakfastChoiceCardProps } from "@/types/components/ancillaryCard" - -export default function BreakfastChoiceCard({ - name, - id, - value, - ancillary, -}: BreakfastChoiceCardProps) { - const { register, setValue } = useFormContext() - - function onLabelClick(event: React.MouseEvent) { - // Preventing click event on label elements firing twice: https://github.com/facebook/react/issues/14295 - event.preventDefault() - setValue(name, value) - } - return ( - - ) -} diff --git a/apps/scandic-web/components/HotelReservation/EnterDetails/Breakfast/breakfast.module.css b/apps/scandic-web/components/HotelReservation/EnterDetails/Breakfast/breakfast.module.css index 3fad97a5a..2428d1a5a 100644 --- a/apps/scandic-web/components/HotelReservation/EnterDetails/Breakfast/breakfast.module.css +++ b/apps/scandic-web/components/HotelReservation/EnterDetails/Breakfast/breakfast.module.css @@ -8,5 +8,5 @@ display: grid; gap: var(--Spacing-x2); grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); - width: min(600px, 100%); + width: min(700px, 100%); } diff --git a/apps/scandic-web/components/HotelReservation/EnterDetails/Breakfast/index.tsx b/apps/scandic-web/components/HotelReservation/EnterDetails/Breakfast/index.tsx index 2d458dd2b..f8425c717 100644 --- a/apps/scandic-web/components/HotelReservation/EnterDetails/Breakfast/index.tsx +++ b/apps/scandic-web/components/HotelReservation/EnterDetails/Breakfast/index.tsx @@ -5,11 +5,17 @@ import { useCallback, useEffect } from "react" import { FormProvider, useForm } from "react-hook-form" import { useIntl } from "react-intl" +import { + BreakfastBuffetIcon, + NoBreakfastBuffetIcon, +} from "@scandic-hotels/design-system/Icons" + import { useEnterDetailsStore } from "@/stores/enter-details" -import BreakfastChoiceCard from "@/components/HotelReservation/EnterDetails/Breakfast/BreakfastChoiceCard" +import RadioCard from "@/components/TempDesignSystem/Form/RadioCard" import Body from "@/components/TempDesignSystem/Text/Body" import { useRoomContext } from "@/contexts/Details/Room" +import { formatPrice } from "@/utils/numberFormatting" import { breakfastFormSchema } from "./schema" @@ -26,6 +32,9 @@ export default function Breakfast() { room, } = useRoomContext() + const hasChildrenInRoom = !!room.childrenInRoom?.length + const totalPriceForNoBreakfast = 0 + const breakfastSelection = room?.breakfast ? room.breakfast.code : room?.breakfast === false @@ -64,7 +73,7 @@ export default function Breakfast() { return (
- {room.childrenInRoom?.length ? ( + {hasChildrenInRoom ? ( {intl.formatMessage({ id: "Children's breakfast is always free as part of the adult's breakfast.", @@ -73,42 +82,45 @@ export default function Breakfast() { ) : null}
{packages?.map((pkg) => ( - ))} -
diff --git a/apps/scandic-web/components/TempDesignSystem/Form/RadioCard/index.tsx b/apps/scandic-web/components/TempDesignSystem/Form/RadioCard/index.tsx index 76c30251c..08e2bb957 100644 --- a/apps/scandic-web/components/TempDesignSystem/Form/RadioCard/index.tsx +++ b/apps/scandic-web/components/TempDesignSystem/Form/RadioCard/index.tsx @@ -6,6 +6,8 @@ import { useFormContext } from "react-hook-form" import { MaterialIcon } from "@scandic-hotels/design-system/Icons" import { Typography } from "@scandic-hotels/design-system/Typography" +import Divider from "@/components/TempDesignSystem/Divider" + import styles from "./radioCard.module.css" import type { RadioCardProps } from "./types" @@ -15,10 +17,13 @@ export default function RadioCard({ iconHeight = 32, id, name, - subtitle, title, + subtitleSecondary, + subtitle, value, disabled = false, + description, + descriptionSecondary, }: RadioCardProps) { const { register, setValue } = useFormContext() @@ -52,9 +57,44 @@ export default function RadioCard({

{title}

+ {subtitleSecondary ? ( + +

{subtitleSecondary}

+
+ ) : null}

{subtitle}

+ + {description || descriptionSecondary ? ( + + ) : null} + + {description ? ( + +

{description}

+
+ ) : null} + + {descriptionSecondary ? ( + +

{descriptionSecondary}

+
+ ) : null} + JSX.Element iconHeight?: number name: string - subtitle?: React.ReactNode + subtitle: React.ReactNode + subtitleSecondary?: React.ReactNode title: React.ReactNode value?: string disabled?: boolean + description?: React.ReactNode + descriptionSecondary?: React.ReactNode } diff --git a/apps/scandic-web/i18n/dictionaries/da.json b/apps/scandic-web/i18n/dictionaries/da.json index 3f25bd9fa..9ff6413e1 100644 --- a/apps/scandic-web/i18n/dictionaries/da.json +++ b/apps/scandic-web/i18n/dictionaries/da.json @@ -132,6 +132,8 @@ "Breakfast ({totalChildren, plural, one {# child} other {# children}}) x {totalBreakfasts}": "Morgenmad ({totalChildren, plural, one {# barn} other {# børn}}) x {totalBreakfasts}", "Breakfast Restaurant": "Breakfast Restaurant", "Breakfast buffet": "Morgenbuffet", + "Breakfast can be added after booking for an additional fee.": "Morgenmad kan tilføjes efter booking for en ekstra omkostning.", + "Breakfast can be added after booking for an extra cost for adults and kids ages 4 and up.": "Morgenmad kan tilføjes efter booking for en ekstra omkostning for voksne og børn fra 4 år.", "Breakfast can only be added for the entire duration of the stay and for all guests.": "Morgenmad kan kun tilføjes for hele opholdets varighed og for alle gæster.", "Breakfast charge": "Morgenmadsgebyr", "Breakfast deal can be purchased at the hotel.": "Morgenmad kan købes på hotellet.", @@ -312,6 +314,7 @@ "Former Scandic Hotel": "Tidligere Scandic Hotel", "Free": "Gratis", "Free cancellation": "Gratis afbestilling", + "Free for kids aged 12 and under.": "Gratis for børn under 12 år.", "Free parking": "Gratis parkering", "Free rebooking": "Gratis ombooking", "Free until": "Free until", @@ -394,6 +397,7 @@ "In order to view your booking, please log in.": "Log ind for at se din reservation.", "Incl. VAT": "Inkl. moms", "Included": "Inkluderet", + "Includes vegan, gluten-free, and other allergy-friendly options.": "Inkluderer veganske, glutenfrie og andre allergivenlige muligheder.", "Indoor pool": "Indendørs pool", "Indoor windows and excellent lighting": "Indoor windows and excellent lighting", "Indoor windows facing the hotel": "Indoor windows facing the hotel", @@ -595,6 +599,7 @@ "Payment received": "Payment received", "Payment status": "Payment status", "Payment will be made on check-in. The card will be only used to guarantee the ancillary in case of no-show.": "Betaling vil ske ved check-in. Kortet vil kun blive brugt til at garantere tillægget i tilfælde af en no-show.", + "Per adult/night": "Pr. voksen/nat", "Per night from": "Per nat fra", "Pet room": "Kæledyrsrum", "Pet room charge including VAT": "Gebyr for kæledyrsværelse inkl. moms", diff --git a/apps/scandic-web/i18n/dictionaries/de.json b/apps/scandic-web/i18n/dictionaries/de.json index dd74e4abb..cc98a5934 100644 --- a/apps/scandic-web/i18n/dictionaries/de.json +++ b/apps/scandic-web/i18n/dictionaries/de.json @@ -133,6 +133,8 @@ "Breakfast ({totalChildren, plural, one {# child} other {# children}}) x {totalBreakfasts}": "Frühstück ({totalChildren, plural, one {# kind} other {# kinder}}) x {totalBreakfasts}", "Breakfast Restaurant": "Breakfast Restaurant", "Breakfast buffet": "Frühstücksbuffet", + "Breakfast can be added after booking for an additional fee.": "Frühstück kann nach der Buchung für einen Aufpreis hinzugefügt werden.", + "Breakfast can be added after booking for an extra cost for adults and kids ages 4 and up.": "Frühstück kann nach der Buchung für einen Aufpreis für Erwachsene und Kinder ab 4 Jahren hinzugefügt werden.", "Breakfast can only be added for the entire duration of the stay and for all guests.": "Frühstück kann nur für die gesamte Aufenthaltsdauer und für alle Gäste hinzugefügt werden.", "Breakfast charge": "Frühstücksgebühr", "Breakfast deal can be purchased at the hotel.": "Frühstücksangebot kann im Hotel gekauft werden.", @@ -313,6 +315,7 @@ "Former Scandic Hotel": "Ehemaliges Scandic Hotel", "Free": "Kostenlos", "Free cancellation": "Kostenlose Stornierung", + "Free for kids aged 12 and under.": "Kostenlos für Kinder bis 12 Jahre.", "Free parking": "Kostenloses Parken", "Free rebooking": "Kostenlose Umbuchung", "Free until": "Free until", @@ -395,6 +398,7 @@ "In order to view your booking, please log in.": "Um Ihre Buchung einzusehen, loggen Sie sich bitte ein.", "Incl. VAT": "Inkl. MwSt.", "Included": "Iinklusive", + "Includes vegan, gluten-free, and other allergy-friendly options.": "Enthält vegane, glutenfreie und andere allergiefreundliche Optionen.", "Indoor pool": "Innenpool", "Indoor windows and excellent lighting": "Indoor windows and excellent lighting", "Indoor windows facing the hotel": "Indoor windows facing the hotel", @@ -594,6 +598,7 @@ "Payment received": "Payment received", "Payment status": "Payment status", "Payment will be made on check-in. The card will be only used to guarantee the ancillary in case of no-show.": "Die Zahlung erfolgt beim Check-in. Die Karte wird nur zur Garantie der Nebenkosten im Falle eines No-Shows verwendet.", + "Per adult/night": "Pro Erwachsenem/Nacht", "Per night from": "Pro Nacht ab", "Pet room": "Haustierzimmer", "Pet room charge including VAT": "Haustierzimmergebühr inkl. MwSt.", diff --git a/apps/scandic-web/i18n/dictionaries/en.json b/apps/scandic-web/i18n/dictionaries/en.json index 7601d9629..a7e3911dd 100644 --- a/apps/scandic-web/i18n/dictionaries/en.json +++ b/apps/scandic-web/i18n/dictionaries/en.json @@ -132,6 +132,9 @@ "Breakfast Restaurant": "Breakfast Restaurant", "Breakfast buffet": "Breakfast buffet", "Breakfast can only be added for the entire duration of the stay and for all guests.": "Breakfast can only be added for the entire duration of the stay and for all guests.", + "Breakfast can be added after booking for an additional fee.": "Breakfast can be added after booking for an additional fee.", + "Breakfast can be added after booking for an extra cost for adults and kids ages 4 and up.": "Breakfast can be added after booking for an extra cost for adults and kids ages 4 and up.", + "Breakfast can only be added for the entire duration of the stay
and for all guests.": "Breakfast can only be added for the entire duration of the stay
and for all guests.", "Breakfast charge": "Breakfast charge", "Breakfast deal can be purchased at the hotel.": "Breakfast deal can be purchased at the hotel.", "Breakfast excluded": "Breakfast excluded", @@ -311,6 +314,7 @@ "Former Scandic Hotel": "Former Scandic Hotel", "Free": "Free", "Free cancellation": "Free cancellation", + "Free for kids aged 12 and under.": "Free for kids aged 12 and under.", "Free parking": "Free parking", "Free rebooking": "Free rebooking", "Free until": "Free until", @@ -393,6 +397,7 @@ "In order to view your booking, please log in.": "In order to view your booking, please log in.", "Incl. VAT": "Incl. VAT", "Included": "Included", + "Includes vegan, gluten-free, and other allergy-friendly options.": "Includes vegan, gluten-free, and other allergy-friendly options.", "Indoor pool": "Indoor pool", "Indoor windows and excellent lighting": "Indoor windows and excellent lighting", "Indoor windows facing the hotel": "Indoor windows facing the hotel", @@ -593,6 +598,7 @@ "Payment received": "Payment received", "Payment status": "Payment status", "Payment will be made on check-in. The card will be only used to guarantee the ancillary in case of no-show.": "Payment will be made on check-in. The card will be only used to guarantee the ancillary in case of no-show.", + "Per adult/night": "Per adult/night", "Per night from": "Per night from", "Pet room": "Pet room", "Pet room charge including VAT": "Pet room charge including VAT", diff --git a/apps/scandic-web/i18n/dictionaries/fi.json b/apps/scandic-web/i18n/dictionaries/fi.json index 296b612aa..944c74b4d 100644 --- a/apps/scandic-web/i18n/dictionaries/fi.json +++ b/apps/scandic-web/i18n/dictionaries/fi.json @@ -131,6 +131,8 @@ "Breakfast ({totalChildren, plural, one {# child} other {# children}}) x {totalBreakfasts}": "Aamiainen ({totalChildren, plural, one {# lapsi} other {# lasta}}) x {totalBreakfasts}", "Breakfast Restaurant": "Breakfast Restaurant", "Breakfast buffet": "Aamiaisbuffet", + "Breakfast can be added after booking for an additional fee.": "Aamiaista voi lisätä varauksen jälkeen lisämaksulla.", + "Breakfast can be added after booking for an extra cost for adults and kids ages 4 and up.": "Aamiaista voi lisätä varauksen jälkeen lisämaksulla aikuisille ja 4-vuotiaille ja sitä vanhemmille lapsille.", "Breakfast can only be added for the entire duration of the stay and for all guests.": "Aamiainen voidaan lisätä vain koko oleskelun ajaksi ja kaikille asiakkaille.", "Breakfast charge": "Aamiaismaksu", "Breakfast deal can be purchased at the hotel.": "Aamiaisdeali voidaan ostaa hotellissa.", @@ -312,6 +314,7 @@ "Former Scandic Hotel": "Entinen Scandic-hotelli", "Free": "Ilmainen", "Free cancellation": "Ilmainen peruutus", + "Free for kids aged 12 and under.": "Ilmainen alle 12-vuotiaille lapsille.", "Free parking": "Ilmainen pysäköinti", "Free rebooking": "Ilmainen uudelleenvaraus", "Free until": "Free until", @@ -394,6 +397,7 @@ "In order to view your booking, please log in.": "Nähdäksesi varauksesi, ole hyvä ja kirjaudu sisään.", "Incl. VAT": "Sis. ALV", "Included": "Sisälly hintaan", + "Includes vegan, gluten-free, and other allergy-friendly options.": "Sisältää vegaanisia, gluteenittomia ja muita allergiaystävällisiä vaihtoehtoja.", "Indoor pool": "Sisäuima-allas", "Indoor windows and excellent lighting": "Indoor windows and excellent lighting", "Indoor windows facing the hotel": "Indoor windows facing the hotel", @@ -593,6 +597,7 @@ "Payment received": "Payment received", "Payment status": "Payment status", "Payment will be made on check-in. The card will be only used to guarantee the ancillary in case of no-show.": "Maksu suoritetaan sisäänkirjautumisen yhteydessä. Korttia käytetään vain lisäpalvelun varmistamiseen, jos varausmyyntiä ei tapahdu.", + "Per adult/night": "Aikuista kohden/yö", "Per night from": "Per yö alkaen", "Pet room": "Lemmikkihuone", "Pet room charge including VAT": "Lemmikkihuoneen maksu sis. ALV", diff --git a/apps/scandic-web/i18n/dictionaries/no.json b/apps/scandic-web/i18n/dictionaries/no.json index 99fb7d733..8e4946505 100644 --- a/apps/scandic-web/i18n/dictionaries/no.json +++ b/apps/scandic-web/i18n/dictionaries/no.json @@ -131,6 +131,8 @@ "Breakfast ({totalChildren, plural, one {# child} other {# children}}) x {totalBreakfasts}": "Frokost ({totalChildren, plural, one {# barn} other {# barn}}) x {totalBreakfasts}", "Breakfast Restaurant": "Breakfast Restaurant", "Breakfast buffet": "Breakfast buffet", + "Breakfast can be added after booking for an additional fee.": "Frokost kan legges til etter bestilling for en ekstra kostnad.", + "Breakfast can be added after booking for an extra cost for adults and kids ages 4 and up.": "Frokost kan legges til etter bestilling for en ekstra kostnad for voksne og barn fra 4 år.", "Breakfast can only be added for the entire duration of the stay and for all guests.": "Frokost kan bare legges til for hele oppholdets varighet og for alle gjester.", "Breakfast charge": "Pris for frokost", "Breakfast deal can be purchased at the hotel.": "Frokostdeal kan kjøpes på hotellet.", @@ -311,6 +313,7 @@ "Former Scandic Hotel": "Tidligere Scandic-hotell", "Free": "Gratis", "Free cancellation": "Gratis avbestilling", + "Free for kids aged 12 and under.": "Gratis for barn under 12 år.", "Free parking": "Gratis parkering", "Free rebooking": "Gratis ombooking", "Free until": "Free until", @@ -393,6 +396,7 @@ "In order to view your booking, please log in.": "For å se bestillingen din, vennligst logg inn.", "Incl. VAT": "Inkl. MVA", "Included": "Inkludert", + "Includes vegan, gluten-free, and other allergy-friendly options.": "Inkluderer veganske, glutenfrie og andre allergivennlige alternativer.", "Indoor pool": "Innendørs basseng", "Indoor windows and excellent lighting": "Indoor windows and excellent lighting", "Indoor windows facing the hotel": "Indoor windows facing the hotel", @@ -592,6 +596,7 @@ "Payment received": "Payment received", "Payment status": "Payment status", "Payment will be made on check-in. The card will be only used to guarantee the ancillary in case of no-show.": "Betaling vil skje ved innsjekking. Kortet vil kun bli brukt til å garantere tillegget i tilfelle av en no-show.", + "Per adult/night": "Per voksen/natt", "Per night from": "Per nat fra", "Pet room": "Kjæledyrsrom", "Pet room charge including VAT": "Kjæledyrromsgebyr inkl. MVA", diff --git a/apps/scandic-web/i18n/dictionaries/sv.json b/apps/scandic-web/i18n/dictionaries/sv.json index 603f4113c..b5f32af1c 100644 --- a/apps/scandic-web/i18n/dictionaries/sv.json +++ b/apps/scandic-web/i18n/dictionaries/sv.json @@ -131,6 +131,8 @@ "Breakfast ({totalChildren, plural, one {# child} other {# children}}) x {totalBreakfasts}": "Frukost ({totalChildren, plural, one {# barn} other {# barn}}) x {totalBreakfasts}", "Breakfast Restaurant": "Breakfast Restaurant", "Breakfast buffet": "Frukostbuffé", + "Breakfast can be added after booking for an additional fee.": "Frukost kan läggas till efter bokning för en extra kostnad.", + "Breakfast can be added after booking for an extra cost for adults and kids ages 4 and up.": "Frukost kan läggas till efter bokning för en extra kostnad för vuxna och barn från 4 år.", "Breakfast can only be added for the entire duration of the stay and for all guests.": "Frukost kan endast läggas till för hela vistelsens varaktighet och för alla gäster.", "Breakfast charge": "Frukostpris", "Breakfast deal can be purchased at the hotel.": "Frukostdeal kan köpas på hotellet.", @@ -311,6 +313,7 @@ "Former Scandic Hotel": "Tidigare Scandichotell", "Free": "Gratis", "Free cancellation": "Fri avbokning", + "Free for kids aged 12 and under.": "Gratis för barn under 12 år.", "Free parking": "Gratis parkering", "Free rebooking": "Fri ombokning", "Free until": "Free until", @@ -393,6 +396,7 @@ "In order to view your booking, please log in.": "För att se din bokning, vänligen logga in.", "Incl. VAT": "Inkl. moms", "Included": "Inkluderad", + "Includes vegan, gluten-free, and other allergy-friendly options.": "Inkluderar veganska, glutenfria och andra allergivänliga alternativ.", "Indoor pool": "Inomhuspool", "Indoor windows and excellent lighting": "Fönster inomhus och utmärkt belysning", "Indoor windows facing the hotel": "Inomhusfönster mot hotellet", @@ -592,6 +596,7 @@ "Payment received": "Payment received", "Payment status": "Payment status", "Payment will be made on check-in. The card will be only used to guarantee the ancillary in case of no-show.": "Betalning kommer att ske vid incheckning. Kortet kommer endast att användas för att garantera tillägget i händelse av no-show.", + "Per adult/night": "Per vuxen/natt", "Per night from": "Per natt från", "Pet room": "Husdjursrum", "Pet room charge including VAT": "Avgift för husdjursrum inkl. moms", diff --git a/apps/scandic-web/types/components/ancillaryCard.ts b/apps/scandic-web/types/components/ancillaryCard.ts index c300d7723..3b326443b 100644 --- a/apps/scandic-web/types/components/ancillaryCard.ts +++ b/apps/scandic-web/types/components/ancillaryCard.ts @@ -14,12 +14,6 @@ export interface AncillaryCardProps { } } -export interface BreakfastChoiceCardProps extends AncillaryCardProps { - name: string - id?: string - value: string -} - export interface AncillaryChoiceCardProps extends AncillaryCardProps { name: string id?: string diff --git a/packages/design-system/lib/components/Icons/Illustrations/BreakfastBuffet.tsx b/packages/design-system/lib/components/Icons/Illustrations/BreakfastBuffet.tsx new file mode 100644 index 000000000..358ffdc39 --- /dev/null +++ b/packages/design-system/lib/components/Icons/Illustrations/BreakfastBuffet.tsx @@ -0,0 +1,37 @@ +import type { IllustrationProps } from '../icon' + +export default function BreakfastBuffetIcon(props: IllustrationProps) { + return ( + + + + + + + + ) +} diff --git a/packages/design-system/lib/components/Icons/Illustrations/NoBreakfastBuffet.tsx b/packages/design-system/lib/components/Icons/Illustrations/NoBreakfastBuffet.tsx new file mode 100644 index 000000000..46763d2b3 --- /dev/null +++ b/packages/design-system/lib/components/Icons/Illustrations/NoBreakfastBuffet.tsx @@ -0,0 +1,45 @@ +import type { IllustrationProps } from '../icon' + +export default function NoBreakfastBuffetIcon(props: IllustrationProps) { + return ( + + + + + + + + + + ) +} diff --git a/packages/design-system/lib/components/Icons/index.tsx b/packages/design-system/lib/components/Icons/index.tsx index af6632116..839669167 100644 --- a/packages/design-system/lib/components/Icons/index.tsx +++ b/packages/design-system/lib/components/Icons/index.tsx @@ -36,6 +36,8 @@ export { default as BedSofaIcon } from './Illustrations/BedSofa' export { default as BedSofaExtraIcon } from './Illustrations/BedSofaExtra' export { default as BedTwinIcon } from './Illustrations/BedTwin' export { default as BedWallExtraIcon } from './Illustrations/BedWallExtra' +export { default as BreakfastBuffetIcon } from './Illustrations/BreakfastBuffet' +export { default as NoBreakfastBuffetIcon } from './Illustrations/NoBreakfastBuffet' export { default as CoinIcon } from './Illustrations/Coin' export { default as CroissantCoffeeEggIcon } from './Illustrations/CroissantCoffeeEgg' export { default as CutleryOneIcon } from './Illustrations/CutleryOne'