From 241e354fc5e13ed4040fc1101921f1e807b4c660 Mon Sep 17 00:00:00 2001 From: Christel Westerberg Date: Tue, 10 Dec 2024 14:40:26 +0100 Subject: [PATCH] fix: special requests --- .../EnterDetails/Details/details.module.css | 6 +- .../EnterDetails/Details/index.tsx | 80 +++++++++++++++-- .../EnterDetails/Details/schema.ts | 20 +++++ .../Form/Label/label.module.css | 23 +++++ .../TempDesignSystem/Form/Select/index.tsx | 2 + .../TempDesignSystem/Form/TextArea/index.tsx | 90 +++++++++++++++++++ .../TempDesignSystem/Form/TextArea/input.ts | 9 ++ .../Form/TextArea/textarea.module.css | 72 +++++++++++++++ components/TempDesignSystem/Select/index.tsx | 28 ++++-- components/TempDesignSystem/Select/select.ts | 2 +- i18n/dictionaries/da.json | 14 +++ i18n/dictionaries/de.json | 14 +++ i18n/dictionaries/en.json | 8 ++ i18n/dictionaries/fi.json | 14 +++ i18n/dictionaries/no.json | 15 ++++ i18n/dictionaries/sv.json | 14 +++ 16 files changed, 393 insertions(+), 18 deletions(-) create mode 100644 components/TempDesignSystem/Form/TextArea/index.tsx create mode 100644 components/TempDesignSystem/Form/TextArea/input.ts create mode 100644 components/TempDesignSystem/Form/TextArea/textarea.module.css diff --git a/components/HotelReservation/EnterDetails/Details/details.module.css b/components/HotelReservation/EnterDetails/Details/details.module.css index 8781a9be2..219168dc7 100644 --- a/components/HotelReservation/EnterDetails/Details/details.module.css +++ b/components/HotelReservation/EnterDetails/Details/details.module.css @@ -9,11 +9,7 @@ width: min(100%, 600px); } -.header, -.country, -.email, -.signup, -.phone { +.fullWidth { grid-column: 1/-1; } diff --git a/components/HotelReservation/EnterDetails/Details/index.tsx b/components/HotelReservation/EnterDetails/Details/index.tsx index 4dc55859c..33adf16a3 100644 --- a/components/HotelReservation/EnterDetails/Details/index.tsx +++ b/components/HotelReservation/EnterDetails/Details/index.tsx @@ -10,10 +10,17 @@ import Button from "@/components/TempDesignSystem/Button" import CountrySelect from "@/components/TempDesignSystem/Form/Country" import Input from "@/components/TempDesignSystem/Form/Input" import Phone from "@/components/TempDesignSystem/Form/Phone" +import Select from "@/components/TempDesignSystem/Form/Select" +import TextArea from "@/components/TempDesignSystem/Form/TextArea" import Footnote from "@/components/TempDesignSystem/Text/Footnote" import JoinScandicFriendsCard from "./JoinScandicFriendsCard" -import { guestDetailsSchema, signedInDetailsSchema } from "./schema" +import { + ElevatorPreference, + FloorPreference, + guestDetailsSchema, + signedInDetailsSchema, +} from "./schema" import Signup from "./Signup" import styles from "./details.module.css" @@ -71,7 +78,7 @@ export default function Details({ user, memberPrice }: DetailsProps) { color="uiTextHighContrast" textTransform="uppercase" type="label" - className={styles.header} + className={styles.fullWidth} > {intl.formatMessage({ id: "Guest information" })} @@ -90,31 +97,92 @@ export default function Details({ user, memberPrice }: DetailsProps) { registerOptions={{ required: true }} /> {user ? null : ( -
+
)} + + {intl.formatMessage({ id: "Special requests" })} + + +