From 5c8d4397d5ed02df877518f3054e700030cc0a07 Mon Sep 17 00:00:00 2001 From: Linus Flood Date: Wed, 14 May 2025 08:20:44 +0000 Subject: [PATCH] Merged in fix/remove-b-code-check (pull request #2091) fix/removed temp block for b codes * fix/removed temp block for b codes * Removed dead css Approved-by: Michael Zetterberg --- .../BookingCode/booking-code.module.css | 9 -------- .../FormContent/BookingCode/index.tsx | 22 +------------------ .../components/Forms/BookingWidget/schema.ts | 4 ---- 3 files changed, 1 insertion(+), 34 deletions(-) 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 76609930c..e422d18ca 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 @@ -11,11 +11,6 @@ padding: var(--Spacing-x1) var(--Spacing-x-one-and-half); } -.bookingCodeErrorContainer { - display: flex; - flex-direction: column; -} - .bookingCodeLabel { display: flex; align-items: center; @@ -57,10 +52,6 @@ align-items: center; } -.bookingCodeError { - white-space: normal; - margin-bottom: 1rem; -} @media screen and (max-width: 767px) { .hideOnMobile { display: none; 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 46f217625..8bdcfc0ef 100644 --- a/apps/scandic-web/components/Forms/BookingWidget/FormContent/BookingCode/index.tsx +++ b/apps/scandic-web/components/Forms/BookingWidget/FormContent/BookingCode/index.tsx @@ -8,7 +8,6 @@ import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon" import { REDEMPTION } from "@/constants/booking" -import ButtonLink from "@/components/ButtonLink" import Modal from "@/components/Modal" import Button from "@/components/TempDesignSystem/Button" import Checkbox from "@/components/TempDesignSystem/Form/Checkbox" @@ -291,26 +290,7 @@ function BookingCodeError({ codeError }: { codeError: FieldError }) { } className={styles.errorIcon} /> - {codeError.message === bookingWidgetErrors.BOOKING_CODE_ONLY_ENGLISH ? ( -
- - { - /* eslint-disable-next-line formatjs/no-literal-string-in-jsx */ - "Dieser Code ist nur auf unserer englischen Website gültig" - } - - - {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */} - {"Englischen Website"} - -
- ) : ( - getErrorMessage(intl, codeError.message) - )} + {getErrorMessage(intl, codeError.message)} {isMultiroomErr ? ( diff --git a/apps/scandic-web/components/Forms/BookingWidget/schema.ts b/apps/scandic-web/components/Forms/BookingWidget/schema.ts index d31e7782f..4d3d71468 100644 --- a/apps/scandic-web/components/Forms/BookingWidget/schema.ts +++ b/apps/scandic-web/components/Forms/BookingWidget/schema.ts @@ -9,7 +9,6 @@ export const bookingWidgetErrors = { BED_CHOICE_REQUIRED: "BED_CHOICE_REQUIRED", CHILDREN_EXCEEDS_ADULTS: "CHILDREN_EXCEEDS_ADULTS", BOOKING_CODE_INVALID: "BOOKING_CODE_INVALID", - BOOKING_CODE_ONLY_ENGLISH: "BOOKING_CODE_ONLY_ENGLISH", REQUIRED: "REQUIRED", DESTINATION_REQUIRED: "DESTINATION_REQUIRED", MULTIROOM_BOOKING_CODE_UNAVAILABLE: "MULTIROOM_BOOKING_CODE_UNAVAILABLE", @@ -61,9 +60,6 @@ export const bookingCodeSchema = z ), { message: bookingWidgetErrors.BOOKING_CODE_INVALID } ) - .refine((value) => !value.startsWith("B") && !value.startsWith("b"), { - message: bookingWidgetErrors.BOOKING_CODE_ONLY_ENGLISH, - }) .default(""), remember: z.boolean().default(false), flag: z.boolean().default(false),