diff --git a/apps/scandic-web/components/Forms/BookingWidget/FormContent/BookingCode/booking-code.module.css b/apps/scandic-web/components/Forms/BookingWidget/FormContent/BookingCode/booking-code.module.css index e422d18ca..03bcb5173 100644 --- a/apps/scandic-web/components/Forms/BookingWidget/FormContent/BookingCode/booking-code.module.css +++ b/apps/scandic-web/components/Forms/BookingWidget/FormContent/BookingCode/booking-code.module.css @@ -16,20 +16,20 @@ align-items: center; gap: var(--Spacing-x-half); position: relative; + color: var(--Text-Accent-Primary); } .errorContainer { display: flex; flex-direction: column; - gap: var(--Spacing-x1); -} -.error { - display: flex; - gap: var(--Spacing-x-half); + gap: var(--Space-x2); } -.errorIcon { - min-width: 20px; +.error { + display: flex; + gap: var(--Space-x1); + white-space: break-spaces; + color: var(--UI-Text-Error); } .bookingCodeRemember, @@ -52,10 +52,17 @@ align-items: center; } +.removeButton { + width: 100%; +} + @media screen and (max-width: 767px) { .hideOnMobile { display: none; } + .removeButton { + display: none; + } } @media screen and (min-width: 768px) { @@ -69,6 +76,9 @@ justify-content: space-between; border-radius: var(--Spacing-x-one-and-half); } + .error { + color: var(--Text-Default); + } } @media screen and (min-width: 768px) and (max-width: 1366px) { diff --git a/apps/scandic-web/components/Forms/BookingWidget/FormContent/BookingCode/index.tsx b/apps/scandic-web/components/Forms/BookingWidget/FormContent/BookingCode/index.tsx index 8a53dd364..474a1edbb 100644 --- a/apps/scandic-web/components/Forms/BookingWidget/FormContent/BookingCode/index.tsx +++ b/apps/scandic-web/components/Forms/BookingWidget/FormContent/BookingCode/index.tsx @@ -5,6 +5,7 @@ import { useIntl } from "react-intl" import { useMediaQuery } from "usehooks-ts" import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" +import { Typography } from "@scandic-hotels/design-system/Typography" import { REDEMPTION } from "@/constants/booking" @@ -17,8 +18,8 @@ import Switch from "@/components/TempDesignSystem/Form/Switch" import Body from "@/components/TempDesignSystem/Text/Body" import Caption from "@/components/TempDesignSystem/Text/Caption" -import { bookingWidgetErrors } from "../../schema" import { Input as BookingWidgetInput } from "../Input" +import { isMultiRoomError } from "../utils" import styles from "./booking-code.module.css" @@ -70,6 +71,7 @@ export default function BookingCode() { // Add delay to handle table mode rendering setTimeout(function () { setValue(REDEMPTION, false, { + shouldValidate: true, shouldDirty: true, }) }) @@ -147,13 +149,9 @@ export default function BookingCode() { >