From 4c06a1b98ddcb84fba340811720c28668baaa999 Mon Sep 17 00:00:00 2001 From: Pontus Dreij Date: Thu, 10 Oct 2024 10:34:00 +0200 Subject: [PATCH] feat(SW-415): Added content from API --- .../select-rate/page.module.css | 3 +- .../hotelreservation/select-rate/page.tsx | 27 +++- .../FlexibilityOption/Popover/index.tsx | 44 ++++++ .../Popover/popover.module.css | 12 ++ .../FlexibilityOption/PriceTable/index.tsx | 98 ++++++++---- .../PriceTable/priceTable.module.css | 14 ++ .../flexibilityOption.module.css | 56 ++++++- .../RoomSelection/FlexibilityOption/index.tsx | 87 +++++++++-- .../RoomSelection/RoomCard/index.tsx | 147 ++++++++++-------- .../RoomCard/roomCard.module.css | 17 +- .../SelectRate/RoomSelection/index.tsx | 4 + .../RoomSelection/roomSelection.module.css | 18 ++- .../Text/Body/body.module.css | 4 + .../TempDesignSystem/Text/Body/variants.ts | 1 + .../Text/Subtitle/subtitle.module.css | 8 + .../Text/Subtitle/variants.ts | 2 + i18n/dictionaries/da.json | 6 + i18n/dictionaries/de.json | 6 + i18n/dictionaries/en.json | 6 + i18n/dictionaries/fi.json | 6 + i18n/dictionaries/no.json | 7 + i18n/dictionaries/sv.json | 6 + server/routers/hotels/query.ts | 1 + .../selectRate/flexibilityOption.ts | 1 + .../hotelReservation/selectRate/roomCard.ts | 3 + .../selectRate/roomSelection.ts | 3 + 26 files changed, 467 insertions(+), 120 deletions(-) create mode 100644 components/HotelReservation/SelectRate/RoomSelection/FlexibilityOption/Popover/index.tsx create mode 100644 components/HotelReservation/SelectRate/RoomSelection/FlexibilityOption/Popover/popover.module.css create mode 100644 components/HotelReservation/SelectRate/RoomSelection/FlexibilityOption/PriceTable/priceTable.module.css diff --git a/app/[lang]/(live)/(public)/hotelreservation/select-rate/page.module.css b/app/[lang]/(live)/(public)/hotelreservation/select-rate/page.module.css index 125a12aa2..8edfdc8f0 100644 --- a/app/[lang]/(live)/(public)/hotelreservation/select-rate/page.module.css +++ b/app/[lang]/(live)/(public)/hotelreservation/select-rate/page.module.css @@ -8,11 +8,10 @@ .content { max-width: 1434px; - margin-top: var(--Spacing-x5); margin-left: auto; margin-right: auto; display: flex; - justify-content: space-between; + flex-direction: column; gap: var(--Spacing-x7); padding: var(--Spacing-x2); } diff --git a/app/[lang]/(live)/(public)/hotelreservation/select-rate/page.tsx b/app/[lang]/(live)/(public)/hotelreservation/select-rate/page.tsx index 7c849d948..6c3a45365 100644 --- a/app/[lang]/(live)/(public)/hotelreservation/select-rate/page.tsx +++ b/app/[lang]/(live)/(public)/hotelreservation/select-rate/page.tsx @@ -15,8 +15,11 @@ export default async function SelectRatePage({ }: PageArgs) { setLang(params.lang) - // TODO: Use real endpoint. - const hotel = tempHotelData.data.attributes + const hotelData = await serverClient().hotel.hotelData.get({ + hotelId: searchParams.hotel, + language: params.lang, + include: ["RoomCategories"], + }) const roomConfigurations = await serverClient().hotel.availability.rooms({ hotelId: parseInt(searchParams.hotel, 10), @@ -24,19 +27,27 @@ export default async function SelectRatePage({ roomStayEndDate: "2024-11-03", adults: 1, }) - console.log("roomConfigurations", roomConfigurations) + if (!roomConfigurations) { - return "No rooms found" + return "No rooms found" // TODO: Add a proper error message } + if (!hotelData) { + return "No hotel data found" // TODO: Add a proper error message + } + + const roomCategories = hotelData?.included + return (
- {/* TODO: Add Hotel Listing Card */} -
Hotel Listing Card TBI
-
+ {/* TODO: Add Hotel Listing Card */} +
Hotel Listing Card TBI
- +
diff --git a/components/HotelReservation/SelectRate/RoomSelection/FlexibilityOption/Popover/index.tsx b/components/HotelReservation/SelectRate/RoomSelection/FlexibilityOption/Popover/index.tsx new file mode 100644 index 000000000..60efe49b2 --- /dev/null +++ b/components/HotelReservation/SelectRate/RoomSelection/FlexibilityOption/Popover/index.tsx @@ -0,0 +1,44 @@ +import { + Button, + Dialog, + OverlayArrow, + Popover, + type PopoverProps, +} from "react-aria-components" + +import { CloseIcon } from "@/components/Icons" + +import styles from "./popover.module.css" + +interface PricePopoverProps extends Omit { + children: React.ReactNode +} + +export default function PricePopover({ + children, + ...props +}: PricePopoverProps) { + return ( + + + + + + + + + {children} + + + ) +} diff --git a/components/HotelReservation/SelectRate/RoomSelection/FlexibilityOption/Popover/popover.module.css b/components/HotelReservation/SelectRate/RoomSelection/FlexibilityOption/Popover/popover.module.css new file mode 100644 index 000000000..bb60ba100 --- /dev/null +++ b/components/HotelReservation/SelectRate/RoomSelection/FlexibilityOption/Popover/popover.module.css @@ -0,0 +1,12 @@ +.arrow { + top: -6px; +} + +.closeButton { + position: absolute; + top: 5px; + right: 5px; + background: none; + border: none; + cursor: pointer; +} diff --git a/components/HotelReservation/SelectRate/RoomSelection/FlexibilityOption/PriceTable/index.tsx b/components/HotelReservation/SelectRate/RoomSelection/FlexibilityOption/PriceTable/index.tsx index d6ec617d2..07e618b7c 100644 --- a/components/HotelReservation/SelectRate/RoomSelection/FlexibilityOption/PriceTable/index.tsx +++ b/components/HotelReservation/SelectRate/RoomSelection/FlexibilityOption/PriceTable/index.tsx @@ -1,7 +1,11 @@ import { useIntl } from "react-intl" +import Body from "@/components/TempDesignSystem/Text/Body" +import Caption from "@/components/TempDesignSystem/Text/Caption" import Subtitle from "@/components/TempDesignSystem/Text/Subtitle" +import styles from "./priceTable.module.css" + import { PriceTableProps } from "@/types/components/hotelReservation/selectRate/flexibilityOption" export default function PriceTable({ @@ -18,39 +22,81 @@ export default function PriceTable({ const showRequestedPrice = publicRequestedPrice && memberRequestedPrice return ( -
-
-
{intl.formatMessage({ id: "Standard price" })}
+
+
+
+ + {intl.formatMessage({ id: "Standard price" })} + +
{publicLocalPrice ? ( - <> - {publicLocalPrice.pricePerNight} {publicLocalPrice.currency}/ - {intl.formatMessage({ id: "night" })} - +
+ + {publicLocalPrice.pricePerNight} + + + {publicLocalPrice.currency} + +
) : ( - {intl.formatMessage({ id: "n/a" })} + + {intl.formatMessage({ id: "n/a" })} + )}
- {memberLocalPrice && ( -
-
{intl.formatMessage({ id: "Member price" })}
-
- {memberLocalPrice.pricePerNight} {memberLocalPrice.currency}/ - {intl.formatMessage({ id: "night" })} -
-
- )} - {showRequestedPrice && ( -
-
{intl.formatMessage({ id: "Approx." })}
-
- {publicRequestedPrice.pricePerNight}/ - {memberRequestedPrice.pricePerNight} {publicRequestedPrice.currency} -
-
- )} +
+
+ + {intl.formatMessage({ id: "Member price" })} + +
+
+ {memberLocalPrice ? ( +
+ + {memberLocalPrice.pricePerNight} + + + {memberLocalPrice.currency} + +
+ ) : ( + + - {intl.formatMessage({ id: "Currency Code" })} + + )} +
+
+ +
+
+ + {intl.formatMessage({ id: "Approx." })} + +
+
+ {showRequestedPrice ? ( + + {publicRequestedPrice.pricePerNight}/ + {memberRequestedPrice.pricePerNight}{" "} + {publicRequestedPrice.currency} + + ) : ( + - / - EUR + )} +
+
) } diff --git a/components/HotelReservation/SelectRate/RoomSelection/FlexibilityOption/PriceTable/priceTable.module.css b/components/HotelReservation/SelectRate/RoomSelection/FlexibilityOption/PriceTable/priceTable.module.css new file mode 100644 index 000000000..7320cf1be --- /dev/null +++ b/components/HotelReservation/SelectRate/RoomSelection/FlexibilityOption/PriceTable/priceTable.module.css @@ -0,0 +1,14 @@ +.priceRow { + display: flex; + justify-content: space-between; + padding: var(--Spacing-x-quarter) 0; +} + +.priceTable { + margin: 0; +} + +.price { + display: flex; + gap: var(--Spacing-x-half); +} diff --git a/components/HotelReservation/SelectRate/RoomSelection/FlexibilityOption/flexibilityOption.module.css b/components/HotelReservation/SelectRate/RoomSelection/FlexibilityOption/flexibilityOption.module.css index 1cbfa9ec3..6d7bc5daf 100644 --- a/components/HotelReservation/SelectRate/RoomSelection/FlexibilityOption/flexibilityOption.module.css +++ b/components/HotelReservation/SelectRate/RoomSelection/FlexibilityOption/flexibilityOption.module.css @@ -2,7 +2,11 @@ .disabledCard { border-radius: var(--Corner-radius-Large); padding: var(--Spacing-x-one-and-half) var(--Spacing-x2); - background-color: var(--Base-Surface-Primary-light-Hover); + background-color: var(--Base-Surface-Secondary-light-Normal); + position: relative; + display: flex; + flex-direction: column; + gap: var(--Spacing-x-half); } .disabledCard { @@ -15,10 +19,21 @@ .card:hover { cursor: pointer; + background-color: var(--Base-Surface-Primary-light-Hover-alt); +} +.checkIcon { + display: none; } input[type="radio"]:checked + .card { + border: 1px solid var(--Primary-Dark-On-Surface-Divider); background-color: var(--Base-Surface-Primary-light-Hover-alt); } +input[type="radio"]:checked + .card .checkIcon { + display: block; + position: absolute; + top: -10px; + right: -10px; +} .header { display: flex; @@ -26,7 +41,40 @@ input[type="radio"]:checked + .card { } .header .infoIcon, -.header .infoIcon * { - stroke: var(--Base-Text-Disabled); - fill: var(--Base-Surface-Primary-light-Hover); +.header .infoIcon path { + stroke: var(--UI-Text-Medium-contrast); + fill: transparent; +} + +.button { + background: none; + border: none; + cursor: pointer; + grid-area: chevron; + height: 100%; + justify-self: flex-end; + padding: 0; +} + +.popover { + background-color: var(--Main-Grey-White); + + border-radius: var(--Corner-radius-Medium); + left: 0px; + max-height: 400px; + padding: var(--Spacing-x2); + top: calc(55px + var(--Spacing-x1)); + width: 100%; + box-shadow: 0px 0px 14px 6px rgba(0, 0, 0, 0.1); +} + +.popover section:focus-visible { + outline: none; +} +.popover .popoverText { + margin-bottom: var(--Spacing-x-half); +} +.popover .popoverHeading { + margin-bottom: var(--Spacing-x1); + font-weight: 600; /* TODO: Remove when this is updated in Design system */ } diff --git a/components/HotelReservation/SelectRate/RoomSelection/FlexibilityOption/index.tsx b/components/HotelReservation/SelectRate/RoomSelection/FlexibilityOption/index.tsx index 4c3b2f803..17475727c 100644 --- a/components/HotelReservation/SelectRate/RoomSelection/FlexibilityOption/index.tsx +++ b/components/HotelReservation/SelectRate/RoomSelection/FlexibilityOption/index.tsx @@ -1,9 +1,11 @@ "use client" -import { useIntl } from "react-intl" +import { useState } from "react" +import { Button, DialogTrigger } from "react-aria-components" -import { InfoCircleIcon } from "@/components/Icons" +import { CheckCircleIcon, InfoCircleIcon } from "@/components/Icons" import Caption from "@/components/TempDesignSystem/Text/Caption" +import PricePopover from "./Popover" import PriceTable from "./PriceTable" import styles from "./flexibilityOption.module.css" @@ -14,18 +16,26 @@ export default function FlexibilityOption({ product, name, paymentTerm, + priceInformation, }: FlexibilityOptionProps) { - const intl = useIntl() + const [rootDiv, setRootDiv] = useState(undefined) + const [isPopoverOpen, setIsPopoverOpen] = useState(false) + + function setRef(node: Element | null) { + if (node) { + setRootDiv(node) + } + } if (!product) { return (
- {name} - ({paymentTerm}) - + {name} + ({paymentTerm})
+
) } @@ -35,18 +45,65 @@ export default function FlexibilityOption({ return (
) } diff --git a/components/HotelReservation/SelectRate/RoomSelection/RoomCard/roomCard.module.css b/components/HotelReservation/SelectRate/RoomSelection/RoomCard/roomCard.module.css index 30807a916..0e794cf94 100644 --- a/components/HotelReservation/SelectRate/RoomSelection/RoomCard/roomCard.module.css +++ b/components/HotelReservation/SelectRate/RoomSelection/RoomCard/roomCard.module.css @@ -5,12 +5,12 @@ background-color: #fff; border-radius: var(--Corner-radius-Large); border: 1px solid var(--Base-Border-Subtle); + position: relative; } .cardBody { display: flex; flex-direction: column; - gap: var(--Spacing-x1); } .specification { @@ -35,6 +35,12 @@ .container { padding: var(--Spacing-x1) var(--Spacing-x2) var(--Spacing-x2); + display: flex; + flex-direction: column; + gap: var(--Spacing-x2); +} + +.roomDetails { display: flex; flex-direction: column; gap: var(--Spacing-x1); @@ -50,3 +56,12 @@ object-fit: cover; border-radius: var(--Corner-radius-Medium) var(--Corner-radius-Medium) 0 0; } + +.roomsLeft { + position: absolute; + top: 12px; + left: 12px; + background-color: var(--Main-Grey-White); + padding: var(--Spacing-x-half) var(--Spacing-x1); + border-radius: var(--Corner-radius-Small); +} diff --git a/components/HotelReservation/SelectRate/RoomSelection/index.tsx b/components/HotelReservation/SelectRate/RoomSelection/index.tsx index 39800b245..09855f5d8 100644 --- a/components/HotelReservation/SelectRate/RoomSelection/index.tsx +++ b/components/HotelReservation/SelectRate/RoomSelection/index.tsx @@ -12,11 +12,14 @@ import { RoomSelectionProps } from "@/types/components/hotelReservation/selectRa export default function RoomSelection({ roomConfigurations, + roomCategories, }: RoomSelectionProps) { const router = useRouter() const searchParams = useSearchParams() const intl = useIntl() + console.log(roomConfigurations) + function handleSubmit(e: React.FormEvent) { e.preventDefault() const queryParams = new URLSearchParams(searchParams) @@ -38,6 +41,7 @@ export default function RoomSelection({ ))} diff --git a/components/HotelReservation/SelectRate/RoomSelection/roomSelection.module.css b/components/HotelReservation/SelectRate/RoomSelection/roomSelection.module.css index 8b9fa698b..dbd50de4b 100644 --- a/components/HotelReservation/SelectRate/RoomSelection/roomSelection.module.css +++ b/components/HotelReservation/SelectRate/RoomSelection/roomSelection.module.css @@ -1,5 +1,4 @@ .wrapper { - border-bottom: 1px solid rgba(17, 17, 17, 0.2); padding-bottom: var(--Spacing-x3); } @@ -7,7 +6,7 @@ margin-top: var(--Spacing-x4); list-style: none; display: grid; - grid-template-columns: 1fr 1fr 1fr 1fr; + grid-template-columns: 1fr; gap: var(--Spacing-x3); } @@ -29,3 +28,18 @@ background-color: white; padding: var(--Spacing-x3) var(--Spacing-x7) var(--Spacing-x5); } + +@media (min-width: 767px) { + .roomList { + grid-template-columns: minmax(240px, 1fr) minmax(240px, 1fr) minmax( + 240px, + 1fr + ); + } +} + +@media (min-width: 1367px) { + .roomList { + grid-template-columns: 1fr 1fr 1fr 1fr; + } +} diff --git a/components/TempDesignSystem/Text/Body/body.module.css b/components/TempDesignSystem/Text/Body/body.module.css index fd605447d..4243eb690 100644 --- a/components/TempDesignSystem/Text/Body/body.module.css +++ b/components/TempDesignSystem/Text/Body/body.module.css @@ -99,3 +99,7 @@ .uiTextPlaceholder { color: var(--UI-Text-Placeholder); } + +.disabled { + color: var(--Base-Text-Disabled); +} diff --git a/components/TempDesignSystem/Text/Body/variants.ts b/components/TempDesignSystem/Text/Body/variants.ts index 0509c6bcd..5c23fe506 100644 --- a/components/TempDesignSystem/Text/Body/variants.ts +++ b/components/TempDesignSystem/Text/Body/variants.ts @@ -7,6 +7,7 @@ const config = { color: { black: styles.black, burgundy: styles.burgundy, + disabled: styles.disabled, grey: styles.grey, pale: styles.pale, red: styles.red, diff --git a/components/TempDesignSystem/Text/Subtitle/subtitle.module.css b/components/TempDesignSystem/Text/Subtitle/subtitle.module.css index 22d09e16e..d558d36ca 100644 --- a/components/TempDesignSystem/Text/Subtitle/subtitle.module.css +++ b/components/TempDesignSystem/Text/Subtitle/subtitle.module.css @@ -66,3 +66,11 @@ .uiTextMediumContrast { color: var(--UI-Text-Medium-contrast); } + +.red { + color: var(--Scandic-Brand-Scandic-Red); +} + +.disabled { + color: var(--Base-Text-Disabled); +} diff --git a/components/TempDesignSystem/Text/Subtitle/variants.ts b/components/TempDesignSystem/Text/Subtitle/variants.ts index 3e36d39e0..b29b4405d 100644 --- a/components/TempDesignSystem/Text/Subtitle/variants.ts +++ b/components/TempDesignSystem/Text/Subtitle/variants.ts @@ -7,9 +7,11 @@ const config = { color: { black: styles.black, burgundy: styles.burgundy, + disabled: styles.disabled, pale: styles.pale, uiTextHighContrast: styles.uiTextHighContrast, uiTextMediumContrast: styles.uiTextMediumContrast, + red: styles.red, }, textAlign: { center: styles.center, diff --git a/i18n/dictionaries/da.json b/i18n/dictionaries/da.json index 3b8c8174c..c9fa31e4b 100644 --- a/i18n/dictionaries/da.json +++ b/i18n/dictionaries/da.json @@ -34,6 +34,7 @@ "Book reward night": "Book bonusnat", "Booking number": "Bookingnummer", "booking.adults": "{totalAdults, plural, one {# voksen} other {# voksne}}", + "booking.guests": "Maks {nrOfGuests, plural, one {# gæst} other {# gæster}}", "booking.nights": "{totalNights, plural, one {# nat} other {# nætter}}", "booking.rooms": "{totalRooms, plural, one {# værelse} other {# værelser}}", "Breakfast": "Morgenmad", @@ -41,6 +42,7 @@ "Breakfast excluded": "Morgenmad ikke inkluderet", "Breakfast included": "Morgenmad inkluderet", "Breakfast restaurant": "Breakfast restaurant", + "Breakfast selection in next step.": "Valg af morgenmad i næste trin.", "Bus terminal": "Busstation", "Business": "Forretning", "by": "inden", @@ -72,6 +74,7 @@ "Country": "Land", "Country code": "Landekode", "Credit card deleted successfully": "Kreditkort blev slettet", + "Currency Code": "DKK", "Current password": "Nuværende kodeord", "Customer service": "Kundeservice", "Date of Birth": "Fødselsdato", @@ -136,6 +139,7 @@ "Language": "Sprog", "Lastname": "Efternavn", "Latest searches": "Seneste søgninger", + "Left": "tilbage", "Level": "Niveau", "Level 1": "Niveau 1", "Level 2": "Niveau 2", @@ -237,6 +241,8 @@ "Room & Terms": "Værelse & Vilkår", "Room facilities": "Værelsesfaciliteter", "Rooms": "Værelser", + "guest": "gæst", + "guests": "gæster", "Rooms & Guests": "Værelser & gæster", "Sauna and gym": "Sauna and gym", "Save": "Gemme", diff --git a/i18n/dictionaries/de.json b/i18n/dictionaries/de.json index 0ddcc5d70..144fe2ca4 100644 --- a/i18n/dictionaries/de.json +++ b/i18n/dictionaries/de.json @@ -34,6 +34,7 @@ "Book reward night": "Bonusnacht buchen", "Booking number": "Buchungsnummer", "booking.adults": "{totalAdults, plural, one {# erwachsene} other {# erwachsene}}", + "booking.guests": "Max {nrOfGuests, plural, one {# gast} other {# gäste}}", "booking.nights": "{totalNights, plural, one {# nacht} other {# Nächte}}", "booking.rooms": "{totalRooms, plural, one {# zimmer} other {# räume}}", "Breakfast": "Frühstück", @@ -41,6 +42,7 @@ "Breakfast excluded": "Frühstück nicht inbegriffen", "Breakfast included": "Frühstück inbegriffen", "Breakfast restaurant": "Breakfast restaurant", + "Breakfast selection in next step.": "Frühstücksauswahl in nächsten Schritt.", "Bus terminal": "Busbahnhof", "Business": "Geschäft", "by": "bis", @@ -72,6 +74,7 @@ "Country": "Land", "Country code": "Landesvorwahl", "Credit card deleted successfully": "Kreditkarte erfolgreich gelöscht", + "Currency Code": "EUR", "Current password": "Aktuelles Passwort", "Customer service": "Kundendienst", "Date of Birth": "Geburtsdatum", @@ -113,6 +116,8 @@ "Get member benefits & offers": "Holen Sie sich Vorteile und Angebote für Mitglieder", "Go back to edit": "Zurück zum Bearbeiten", "Go back to overview": "Zurück zur Übersicht", + "guest": "gast", + "guests": "gäste", "Guest information": "Informationen für Gäste", "Guests & Rooms": "Gäste & Zimmer", "Hi": "Hallo", @@ -137,6 +142,7 @@ "Language": "Sprache", "Lastname": "Nachname", "Latest searches": "Letzte Suchanfragen", + "Left": "übrig", "Level": "Level", "Level 1": "Level 1", "Level 2": "Level 2", diff --git a/i18n/dictionaries/en.json b/i18n/dictionaries/en.json index 5841856c5..d9cc6f9e5 100644 --- a/i18n/dictionaries/en.json +++ b/i18n/dictionaries/en.json @@ -34,6 +34,7 @@ "Book reward night": "Book reward night", "Booking number": "Booking number", "booking.adults": "{totalAdults, plural, one {# adult} other {# adults}}", + "booking.guests": "Max {nrOfGuests, plural, one {# guest} other {# guests}}", "booking.nights": "{totalNights, plural, one {# night} other {# nights}}", "booking.rooms": "{totalRooms, plural, one {# room} other {# rooms}}", "Breakfast": "Breakfast", @@ -41,6 +42,7 @@ "Breakfast excluded": "Breakfast excluded", "Breakfast included": "Breakfast included", "Breakfast restaurant": "Breakfast restaurant", + "Breakfast selection in next step.": "Breakfast selection in next step.", "Bus terminal": "Bus terminal", "Business": "Business", "by": "by", @@ -72,6 +74,7 @@ "Country": "Country", "Country code": "Country code", "Credit card deleted successfully": "Credit card deleted successfully", + "Currency Code": "EUR", "Current password": "Current password", "Customer service": "Customer service", "Date of Birth": "Date of Birth", @@ -113,6 +116,8 @@ "Get member benefits & offers": "Get member benefits & offers", "Go back to edit": "Go back to edit", "Go back to overview": "Go back to overview", + "guest": "guest", + "guests": "guests", "Guest information": "Guest information", "Guests & Rooms": "Guests & Rooms", "Hi": "Hi", @@ -135,6 +140,7 @@ "King bed": "King bed", "Language": "Language", "Lastname": "Lastname", + "Left": "left", "Latest searches": "Latest searches", "Level": "Level", "Level 1": "Level 1", diff --git a/i18n/dictionaries/fi.json b/i18n/dictionaries/fi.json index a68bb6664..77bc9c6c1 100644 --- a/i18n/dictionaries/fi.json +++ b/i18n/dictionaries/fi.json @@ -34,6 +34,7 @@ "Book reward night": "Kirjapalkinto-ilta", "Booking number": "Varausnumero", "booking.adults": "{totalAdults, plural, one {# aikuinen} other {# aikuiset}}", + "booking.guests": "Max {nrOfGuests, plural, one {# vieras} other {# vieraita}}", "booking.nights": "{totalNights, plural, one {# yö} other {# yötä}}", "booking.rooms": "{totalRooms, plural, one {# huone} other {# sviitti}}", "Breakfast": "Aamiainen", @@ -41,6 +42,7 @@ "Breakfast excluded": "Aamiainen ei sisälly", "Breakfast included": "Aamiainen sisältyy", "Breakfast restaurant": "Breakfast restaurant", + "Breakfast selection in next step.": "Aamiaisvalinta seuraavassa vaiheessa.", "Bus terminal": "Bussiasema", "Business": "Business", "by": "mennessä", @@ -72,6 +74,7 @@ "Country": "Maa", "Country code": "Maatunnus", "Credit card deleted successfully": "Luottokortti poistettu onnistuneesti", + "Currency Code": "EUR", "Current password": "Nykyinen salasana", "Customer service": "Asiakaspalvelu", "Date of Birth": "Syntymäaika", @@ -113,6 +116,8 @@ "Get member benefits & offers": "Hanki jäsenetuja ja -tarjouksia", "Go back to edit": "Palaa muokkaamaan", "Go back to overview": "Palaa yleiskatsaukseen", + "guest": "Vieras", + "guests": "Vieraita", "Guest information": "Vieraan tiedot", "Guests & Rooms": "Vieraat & Huoneet", "Hi": "Hi", @@ -136,6 +141,7 @@ "Language": "Kieli", "Lastname": "Sukunimi", "Latest searches": "Viimeisimmät haut", + "Left": "jäljellä", "Level": "Level", "Level 1": "Taso 1", "Level 2": "Taso 2", diff --git a/i18n/dictionaries/no.json b/i18n/dictionaries/no.json index c3da52178..63a8399ac 100644 --- a/i18n/dictionaries/no.json +++ b/i18n/dictionaries/no.json @@ -33,12 +33,15 @@ "Book reward night": "Bestill belønningskveld", "Booking number": "Bestillingsnummer", "booking.adults": "{totalAdults, plural, one {# voksen} other {# voksne}}", + "booking.guests": "Maks {nrOfGuests, plural, one {# gjest} other {# gjester}}", "booking.nights": "{totalNights, plural, one {# natt} other {# netter}}", "booking.rooms": "{totalRooms, plural, one {# rom} other {# rom}}", "Breakfast": "Frokost", "Breakfast buffet": "Breakfast buffet", "Breakfast excluded": "Frokost ekskludert", "Breakfast included": "Frokost inkludert", + "Breakfast restaurant": "Breakfast restaurant", + "Breakfast selection in next step.": "Frokostvalg i neste steg.", "Bus terminal": "Bussterminal", "Business": "Forretnings", "by": "innen", @@ -70,6 +73,7 @@ "Country": "Land", "Country code": "Landskode", "Credit card deleted successfully": "Kredittkort slettet", + "Currency Code": "NOK", "Current password": "Nåværende passord", "Customer service": "Kundeservice", "Date of Birth": "Fødselsdato", @@ -111,6 +115,8 @@ "Get member benefits & offers": "Få medlemsfordeler og tilbud", "Go back to edit": "Gå tilbake til redigering", "Go back to overview": "Gå tilbake til oversikten", + "guest": "gjest", + "guests": "gjester", "Guest information": "Informasjon til gjester", "Guests & Rooms": "Gjester & rom", "Hi": "Hei", @@ -134,6 +140,7 @@ "Language": "Språk", "Lastname": "Etternavn", "Latest searches": "Siste søk", + "Left": "igjen", "Level": "Nivå", "Level 1": "Nivå 1", "Level 2": "Nivå 2", diff --git a/i18n/dictionaries/sv.json b/i18n/dictionaries/sv.json index 57b4fb047..64076bbf1 100644 --- a/i18n/dictionaries/sv.json +++ b/i18n/dictionaries/sv.json @@ -33,6 +33,7 @@ "Book reward night": "Boka frinatt", "Booking number": "Bokningsnummer", "booking.adults": "{totalAdults, plural, one {# vuxen} other {# vuxna}}", + "booking.guests": "Max {nrOfGuests, plural, one {# gäst} other {# gäster}}", "booking.nights": "{totalNights, plural, one {# natt} other {# nätter}}", "booking.rooms": "{totalRooms, plural, one {# rum} other {# rum}}", "Breakfast": "Frukost", @@ -40,6 +41,7 @@ "Breakfast excluded": "Frukost ingår ej", "Breakfast included": "Frukost ingår", "Breakfast restaurant": "Breakfast restaurant", + "Breakfast selection in next step.": "Frukostval i nästa steg.", "Bus terminal": "Bussterminal", "Business": "Business", "by": "innan", @@ -71,6 +73,7 @@ "Country": "Land", "Country code": "Landskod", "Credit card deleted successfully": "Kreditkort har tagits bort", + "Currency Code": "SEK", "Current password": "Nuvarande lösenord", "Customer service": "Kundservice", "Date of Birth": "Födelsedatum", @@ -112,6 +115,8 @@ "Get member benefits & offers": "Ta del av medlemsförmåner och erbjudanden", "Go back to edit": "Gå tillbaka till redigeringen", "Go back to overview": "Gå tillbaka till översikten", + "guest": "gäst", + "guests": "gäster", "Guest information": "Information till gästerna", "Guests & Rooms": "Gäster & rum", "Hi": "Hej", @@ -135,6 +140,7 @@ "Language": "Språk", "Lastname": "Efternamn", "Latest searches": "Senaste sökningarna", + "Left": "kvar", "Level": "Nivå", "Level 1": "Nivå 1", "Level 2": "Nivå 2", diff --git a/server/routers/hotels/query.ts b/server/routers/hotels/query.ts index f0c5e1ef8..1b740afb2 100644 --- a/server/routers/hotels/query.ts +++ b/server/routers/hotels/query.ts @@ -635,6 +635,7 @@ export const hotelQueryRouter = router({ query: { hotelId, params: params }, }) ) + return validateHotelData.data }), }), diff --git a/types/components/hotelReservation/selectRate/flexibilityOption.ts b/types/components/hotelReservation/selectRate/flexibilityOption.ts index c2f077178..f2107cc6a 100644 --- a/types/components/hotelReservation/selectRate/flexibilityOption.ts +++ b/types/components/hotelReservation/selectRate/flexibilityOption.ts @@ -5,6 +5,7 @@ export type FlexibilityOptionProps = { name: string value: string paymentTerm: string + priceInformation?: Array } export interface PriceTableProps { diff --git a/types/components/hotelReservation/selectRate/roomCard.ts b/types/components/hotelReservation/selectRate/roomCard.ts index b51b3d8ab..834c9dea3 100644 --- a/types/components/hotelReservation/selectRate/roomCard.ts +++ b/types/components/hotelReservation/selectRate/roomCard.ts @@ -3,7 +3,10 @@ import { RoomConfiguration, } from "@/server/routers/hotels/output" +import { RoomData } from "@/types/hotel" + export type RoomCardProps = { roomConfiguration: RoomConfiguration rateDefinitions: RateDefinition[] + roomCategories: RoomData[] } diff --git a/types/components/hotelReservation/selectRate/roomSelection.ts b/types/components/hotelReservation/selectRate/roomSelection.ts index 33dae631b..16c26fd90 100644 --- a/types/components/hotelReservation/selectRate/roomSelection.ts +++ b/types/components/hotelReservation/selectRate/roomSelection.ts @@ -1,5 +1,8 @@ import { RoomsAvailability } from "@/server/routers/hotels/output" +import { RoomData } from "@/types/hotel" + export interface RoomSelectionProps { roomConfigurations: RoomsAvailability + roomCategories: RoomData[] }