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:
@@ -11,11 +11,6 @@
|
|||||||
padding: var(--Spacing-x1) var(--Spacing-x-one-and-half);
|
padding: var(--Spacing-x1) var(--Spacing-x-one-and-half);
|
||||||
}
|
}
|
||||||
|
|
||||||
.bookingCodeErrorContainer {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bookingCodeLabel {
|
.bookingCodeLabel {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -57,10 +52,6 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bookingCodeError {
|
|
||||||
white-space: normal;
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
}
|
|
||||||
@media screen and (max-width: 767px) {
|
@media screen and (max-width: 767px) {
|
||||||
.hideOnMobile {
|
.hideOnMobile {
|
||||||
display: none;
|
display: none;
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import { MaterialIcon } from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
|||||||
|
|
||||||
import { REDEMPTION } from "@/constants/booking"
|
import { REDEMPTION } from "@/constants/booking"
|
||||||
|
|
||||||
import ButtonLink from "@/components/ButtonLink"
|
|
||||||
import Modal from "@/components/Modal"
|
import Modal from "@/components/Modal"
|
||||||
import Button from "@/components/TempDesignSystem/Button"
|
import Button from "@/components/TempDesignSystem/Button"
|
||||||
import Checkbox from "@/components/TempDesignSystem/Form/Checkbox"
|
import Checkbox from "@/components/TempDesignSystem/Form/Checkbox"
|
||||||
@@ -291,26 +290,7 @@ function BookingCodeError({ codeError }: { codeError: FieldError }) {
|
|||||||
}
|
}
|
||||||
className={styles.errorIcon}
|
className={styles.errorIcon}
|
||||||
/>
|
/>
|
||||||
{codeError.message === bookingWidgetErrors.BOOKING_CODE_ONLY_ENGLISH ? (
|
{getErrorMessage(intl, codeError.message)}
|
||||||
<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)
|
|
||||||
)}
|
|
||||||
</Caption>
|
</Caption>
|
||||||
{isMultiroomErr ? (
|
{isMultiroomErr ? (
|
||||||
<RemoveExtraRooms className={styles.hideOnMobile} />
|
<RemoveExtraRooms className={styles.hideOnMobile} />
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ export const bookingWidgetErrors = {
|
|||||||
BED_CHOICE_REQUIRED: "BED_CHOICE_REQUIRED",
|
BED_CHOICE_REQUIRED: "BED_CHOICE_REQUIRED",
|
||||||
CHILDREN_EXCEEDS_ADULTS: "CHILDREN_EXCEEDS_ADULTS",
|
CHILDREN_EXCEEDS_ADULTS: "CHILDREN_EXCEEDS_ADULTS",
|
||||||
BOOKING_CODE_INVALID: "BOOKING_CODE_INVALID",
|
BOOKING_CODE_INVALID: "BOOKING_CODE_INVALID",
|
||||||
BOOKING_CODE_ONLY_ENGLISH: "BOOKING_CODE_ONLY_ENGLISH",
|
|
||||||
REQUIRED: "REQUIRED",
|
REQUIRED: "REQUIRED",
|
||||||
DESTINATION_REQUIRED: "DESTINATION_REQUIRED",
|
DESTINATION_REQUIRED: "DESTINATION_REQUIRED",
|
||||||
MULTIROOM_BOOKING_CODE_UNAVAILABLE: "MULTIROOM_BOOKING_CODE_UNAVAILABLE",
|
MULTIROOM_BOOKING_CODE_UNAVAILABLE: "MULTIROOM_BOOKING_CODE_UNAVAILABLE",
|
||||||
@@ -61,9 +60,6 @@ export const bookingCodeSchema = z
|
|||||||
),
|
),
|
||||||
{ message: bookingWidgetErrors.BOOKING_CODE_INVALID }
|
{ message: bookingWidgetErrors.BOOKING_CODE_INVALID }
|
||||||
)
|
)
|
||||||
.refine((value) => !value.startsWith("B") && !value.startsWith("b"), {
|
|
||||||
message: bookingWidgetErrors.BOOKING_CODE_ONLY_ENGLISH,
|
|
||||||
})
|
|
||||||
.default(""),
|
.default(""),
|
||||||
remember: z.boolean().default(false),
|
remember: z.boolean().default(false),
|
||||||
flag: z.boolean().default(false),
|
flag: z.boolean().default(false),
|
||||||
|
|||||||
Reference in New Issue
Block a user