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
This commit is contained in:
Linus Flood
2025-05-14 08:20:44 +00:00
parent 0845b979cd
commit 5c8d4397d5
3 changed files with 1 additions and 34 deletions

View File

@@ -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;

View File

@@ -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 ? (
<div className={styles.bookingCodeErrorContainer}>
<span className={styles.bookingCodeError}>
{
/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */
"Dieser Code ist nur auf unserer englischen Website gültig"
}
</span>
<ButtonLink
target="_self"
href="https://www.scandichotels.com"
variant="Tertiary"
>
{/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */}
{"Englischen Website"}
</ButtonLink>
</div>
) : (
getErrorMessage(intl, codeError.message)
)}
{getErrorMessage(intl, codeError.message)}
</Caption>
{isMultiroomErr ? (
<RemoveExtraRooms className={styles.hideOnMobile} />

View File

@@ -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),