diff --git a/app/[lang]/(live)/(public)/hotelreservation/[step]/page.tsx b/app/[lang]/(live)/(public)/hotelreservation/[step]/page.tsx index 25fcac397..050aa0280 100644 --- a/app/[lang]/(live)/(public)/hotelreservation/[step]/page.tsx +++ b/app/[lang]/(live)/(public)/hotelreservation/[step]/page.tsx @@ -1,41 +1,61 @@ "use client" +import { notFound } from "next/navigation" import { useState } from "react" import { useIntl } from "react-intl" -import { notFound } from "@/server/errors/next" +import { trpc } from "@/lib/trpc/client" +import BedType from "@/components/HotelReservation/EnterDetails/BedType" +import Breakfast from "@/components/HotelReservation/EnterDetails/Breakfast" +import Details from "@/components/HotelReservation/EnterDetails/Details" +import HotelSelectionHeader from "@/components/HotelReservation/HotelSelectionHeader" +import Payment from "@/components/HotelReservation/SelectRate/Payment" import SectionAccordion from "@/components/HotelReservation/SelectRate/SectionAccordion" import Summary from "@/components/HotelReservation/SelectRate/Summary" -import Button from "@/components/TempDesignSystem/Button" +import LoadingSpinner from "@/components/LoadingSpinner" import styles from "./page.module.css" import { LangParams, PageArgs } from "@/types/params" enum StepEnum { - "select-bed" = "select-bed", + selectBed = "select-bed", breakfast = "breakfast", details = "details", payment = "payment", } -type Step = keyof typeof StepEnum - -function isValidStep(step: string): step is Step { - return Object.keys(StepEnum).includes(step) +function isValidStep(step: string): step is StepEnum { + return Object.values(StepEnum).includes(step as StepEnum) } export default function StepPage({ params, -}: PageArgs) { - const [activeStep, setActiveStep] = useState(params.step) +}: PageArgs) { + const { step } = params + const [activeStep, setActiveStep] = useState(step) const intl = useIntl() if (!isValidStep(activeStep)) { return notFound() } + const { data: hotel, isLoading: loadingHotel } = + trpc.hotel.hotelData.get.useQuery({ + hotelId: "811", + language: params.lang, + }) + + if (loadingHotel) { + return + } + + if (!hotel) { + // TODO: handle case with hotel missing + return notFound() + } + switch (activeStep) { case StepEnum.breakfast: //return
Select BREAKFAST
@@ -43,11 +63,11 @@ export default function StepPage({ //return
Select DETAILS
case StepEnum.payment: //return
Select PAYMENT
- case StepEnum["select-bed"]: + case StepEnum.selectBed: // return
Select BED
} - function onNav(step: Step) { + function onNav(step: StepEnum) { setActiveStep(step) if (typeof window !== "undefined") { window.history.pushState({}, "", step) @@ -56,22 +76,17 @@ export default function StepPage({ return (
+
-
- Hejhej lorem ipsim heheheheh andi fpok veoi cdfionaw aoiwube - cskdfaen - -
+
-
- Hejhej lorem ipsim heheheheh andi fpok veoi cdfionaw aoiwube - cskdfaen - -
+
-
- Hejhej lorem ipsim heheheheh andi fpok veoi cdfionaw aoiwube - cskdfaen - -
+
-
- Hejhej lorem ipsim heheheheh andi fpok veoi cdfionaw aoiwube - cskdfaen Hejhej lorem ipsim heheheheh andi fpok veoi cdfionaw - aoiwube cskdfaen Hejhej lorem ipsim heheheheh andi fpok veoi - cdfionaw aoiwube cskdfaen Hejhej lorem ipsim heheheheh andi fpok - veoi cdfionaw aoiwube cskdfaen v Hejhej lorem ipsim heheheheh andi - fpok veoi cdfionaw aoiwube cskdfaen Hejhej lorem ipsim heheheheh - andi fpok veoi cdfionaw aoiwube cskdfaen - -
+
-
+
{label} @@ -85,7 +85,7 @@ export default function SectionAccordion({
{children}
-
+ ) } diff --git a/components/TempDesignSystem/Text/Subtitle/subtitle.module.css b/components/TempDesignSystem/Text/Subtitle/subtitle.module.css index 1fab1f59c..8fdac30c4 100644 --- a/components/TempDesignSystem/Text/Subtitle/subtitle.module.css +++ b/components/TempDesignSystem/Text/Subtitle/subtitle.module.css @@ -59,6 +59,6 @@ color: var(--Scandic-Brand-Pale-Peach); } -.highContrast { +.uiTextHighContrast { color: var(--UI-Text-High-contrast); } diff --git a/components/TempDesignSystem/Text/Subtitle/variants.ts b/components/TempDesignSystem/Text/Subtitle/variants.ts index b73c42230..7a8faa54c 100644 --- a/components/TempDesignSystem/Text/Subtitle/variants.ts +++ b/components/TempDesignSystem/Text/Subtitle/variants.ts @@ -8,7 +8,7 @@ const config = { black: styles.black, burgundy: styles.burgundy, pale: styles.pale, - highContrast: styles.highContrast, + uiTextHighContrast: styles.uiTextHighContrast, }, textAlign: { center: styles.center, diff --git a/i18n/dictionaries/da.json b/i18n/dictionaries/da.json index 26897f291..a260dd068 100644 --- a/i18n/dictionaries/da.json +++ b/i18n/dictionaries/da.json @@ -84,6 +84,7 @@ "Email": "E-mail", "Email address": "E-mailadresse", "Enter destination or hotel": "Indtast destination eller hotel", + "Enter your details": "Indtast dine oplysninger", "Enjoy relaxed restaurant experiences": "Enjoy relaxed restaurant experiences", "Events that make an impression": "Events that make an impression", "Explore all levels and benefits": "Udforsk alle niveauer og fordele", @@ -212,6 +213,7 @@ "Restaurant & Bar": "Restaurant & Bar", "Restaurants & Bars": "Restaurants & Bars", "Retype new password": "Gentag den nye adgangskode", + "Request bedtype": "Anmod om sengetype", "Room & Terms": "Værelse & Vilkår", "Room facilities": "Værelsesfaciliteter", "Rooms": "Værelser", @@ -226,10 +228,12 @@ "See room details": "Se værelsesdetaljer", "See rooms": "Se værelser", "Select a country": "Vælg et land", + "Select breakfast options": "Vælg morgenmadsmuligheder", "Select country of residence": "Vælg bopælsland", "Select date of birth": "Vælg fødselsdato", "Select dates": "Vælg datoer", "Select language": "Vælg sprog", + "Select payment method": "Vælg betalingsmetode", "Select your language": "Vælg dit sprog", "Shopping": "Shopping", "Shopping & Dining": "Shopping & Spisning", diff --git a/i18n/dictionaries/de.json b/i18n/dictionaries/de.json index 13438d8c3..ad755efdc 100644 --- a/i18n/dictionaries/de.json +++ b/i18n/dictionaries/de.json @@ -84,6 +84,7 @@ "Email address": "E-Mail-Adresse", "Enjoy relaxed restaurant experiences": "Enjoy relaxed restaurant experiences", "Enter destination or hotel": "Reiseziel oder Hotel eingeben", + "Enter your details": "Geben Sie Ihre Daten ein", "Events that make an impression": "Events that make an impression", "Explore all levels and benefits": "Entdecken Sie alle Levels und Vorteile", "Explore nearby": "Erkunden Sie die Umgebung", @@ -210,6 +211,7 @@ "Restaurant & Bar": "Restaurant & Bar", "Restaurants & Bars": "Restaurants & Bars", "Retype new password": "Neues Passwort erneut eingeben", + "Request bedtype": "Bettentyp anfragen", "Room & Terms": "Zimmer & Bedingungen", "Room facilities": "Zimmerausstattung", "Rooms": "Räume", @@ -224,10 +226,12 @@ "See room details": "Zimmerdetails ansehen", "See rooms": "Zimmer ansehen", "Select a country": "Wähle ein Land", + "Select breakfast options": "Wählen Sie Frühstücksoptionen", "Select country of residence": "Wählen Sie das Land Ihres Wohnsitzes aus", "Select date of birth": "Geburtsdatum auswählen", "Select dates": "Datum auswählen", "Select language": "Sprache auswählen", + "Select payment method": "Zahlungsart auswählen", "Select your language": "Wählen Sie Ihre Sprache", "Shopping": "Einkaufen", "Shopping & Dining": "Einkaufen & Essen", diff --git a/i18n/dictionaries/en.json b/i18n/dictionaries/en.json index fa0e27a61..43903c4c2 100644 --- a/i18n/dictionaries/en.json +++ b/i18n/dictionaries/en.json @@ -84,6 +84,7 @@ "Email address": "Email address", "Enjoy relaxed restaurant experiences": "Enjoy relaxed restaurant experiences", "Enter destination or hotel": "Enter destination or hotel", + "Enter your details": "Enter your details", "Events that make an impression": "Events that make an impression", "Explore all levels and benefits": "Explore all levels and benefits", "Explore nearby": "Explore nearby", @@ -314,6 +315,9 @@ "number": "number", "or": "or", "points": "Points", + "Request bedtype": "Request bedtype", + "Select breakfast options": "Select breakfast options", + "Select payment method": "Select payment method", "special character": "special character", "spendable points expiring by": "{points} spendable points expiring by {date}", "to": "to", diff --git a/i18n/dictionaries/fi.json b/i18n/dictionaries/fi.json index a00928ad3..558c99dcb 100644 --- a/i18n/dictionaries/fi.json +++ b/i18n/dictionaries/fi.json @@ -83,6 +83,7 @@ "Email": "Sähköposti", "Email address": "Sähköpostiosoite", "Enter destination or hotel": "Anna kohde tai hotelli", + "Enter your details": "Anna tietosi", "Enjoy relaxed restaurant experiences": "Enjoy relaxed restaurant experiences", "Events that make an impression": "Events that make an impression", "Explore all levels and benefits": "Tutustu kaikkiin tasoihin ja etuihin", @@ -216,6 +217,7 @@ "Rooms": "Huoneet", "Rooms & Guests": "Huoneet & Vieraat", "Rooms & Guestss": "Huoneet & Vieraat", + "Request bedtype": "Pyydä sänkytyyppiä", "Sauna and gym": "Sauna and gym", "Save": "Tallenna", "Scandic Friends Mastercard": "Scandic Friends Mastercard", @@ -226,10 +228,12 @@ "See room details": "Katso huoneen tiedot", "See rooms": "Katso huoneet", "Select a country": "Valitse maa", + "Select breakfast options": "Valitse aamiaisvaihtoehdot", "Select country of residence": "Valitse asuinmaa", "Select date of birth": "Valitse syntymäaika", "Select dates": "Valitse päivämäärät", "Select language": "Valitse kieli", + "Select payment method": "Valitse maksutapa", "Select your language": "Valitse kieli", "Shopping": "Ostokset", "Shopping & Dining": "Ostokset & Ravintolat", diff --git a/i18n/dictionaries/no.json b/i18n/dictionaries/no.json index 9a28e6f69..5db6252f3 100644 --- a/i18n/dictionaries/no.json +++ b/i18n/dictionaries/no.json @@ -83,6 +83,7 @@ "Email": "E-post", "Email address": "E-postadresse", "Enter destination or hotel": "Skriv inn destinasjon eller hotell", + "Enter your details": "Skriv inn detaljene dine", "Enjoy relaxed restaurant experiences": "Enjoy relaxed restaurant experiences", "Events that make an impression": "Events that make an impression", "Explore all levels and benefits": "Utforsk alle nivåer og fordeler", @@ -211,6 +212,7 @@ "Restaurant & Bar": "Restaurant & Bar", "Restaurants & Bars": "Restaurants & Bars", "Retype new password": "Skriv inn nytt passord på nytt", + "Request bedtype": "Be om sengetype", "Room & Terms": "Rom & Vilkår", "Room facilities": "Romfasiliteter", "Rooms": "Rom", @@ -225,10 +227,12 @@ "See room details": "Se detaljer om rommet", "See rooms": "Se rom", "Select a country": "Velg et land", + "Select breakfast options": "Velg frokostalternativer", "Select country of residence": "Velg bostedsland", "Select date of birth": "Velg fødselsdato", "Select dates": "Velg datoer", "Select language": "Velg språk", + "Select payment method": "Velg betalingsmetode", "Select your language": "Velg språk", "Shopping": "Shopping", "Shopping & Dining": "Shopping & Spisesteder", diff --git a/i18n/dictionaries/sv.json b/i18n/dictionaries/sv.json index dc6a082c8..e7b55e6f6 100644 --- a/i18n/dictionaries/sv.json +++ b/i18n/dictionaries/sv.json @@ -84,6 +84,7 @@ "Email": "E-post", "Email address": "E-postadress", "Enter destination or hotel": "Ange destination eller hotell", + "Enter your details": "Ange dina uppgifter", "Enjoy relaxed restaurant experiences": "Enjoy relaxed restaurant experiences", "Events that make an impression": "Events that make an impression", "Explore all levels and benefits": "Utforska alla nivåer och fördelar", @@ -213,6 +214,7 @@ "Restaurant & Bar": "Restaurang & Bar", "Restaurants & Bars": "Restaurants & Bars", "Retype new password": "Upprepa nytt lösenord", + "Request bedtype": "Request bedtype", "Room & Terms": "Rum & Villkor", "Room facilities": "Rumfaciliteter", "Rooms": "Rum", @@ -227,10 +229,12 @@ "See room details": "Se rumsdetaljer", "See rooms": "Se rum", "Select a country": "Välj ett land", + "Select breakfast options": "Välj frukostalternativ", "Select country of residence": "Välj bosättningsland", "Select date of birth": "Välj födelsedatum", "Select dates": "Välj datum", "Select language": "Välj språk", + "Select payment method": "Välj betalningsmetod", "Select your language": "Välj ditt språk", "Shopping": "Shopping", "Shopping & Dining": "Shopping & Mat",