feat: SW-1583 Optmized after rebase
This commit is contained in:
@@ -275,6 +275,7 @@ export function RemoveExtraRooms({ ...props }: ButtonProps) {
|
|||||||
const rooms = getValues("rooms")[0]
|
const rooms = getValues("rooms")[0]
|
||||||
setValue("rooms", [rooms], { shouldValidate: true })
|
setValue("rooms", [rooms], { shouldValidate: true })
|
||||||
trigger("bookingCode.value")
|
trigger("bookingCode.value")
|
||||||
|
trigger(REDEMPTION)
|
||||||
}, 300)
|
}, 300)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,9 +8,10 @@ import { REDEMPTION } from "@/constants/booking"
|
|||||||
|
|
||||||
import { ErrorCircleIcon } from "@/components/Icons"
|
import { ErrorCircleIcon } from "@/components/Icons"
|
||||||
import Checkbox from "@/components/TempDesignSystem/Form/Checkbox"
|
import Checkbox from "@/components/TempDesignSystem/Form/Checkbox"
|
||||||
import Body from "@/components/TempDesignSystem/Text/Body"
|
|
||||||
import Caption from "@/components/TempDesignSystem/Text/Caption"
|
import Caption from "@/components/TempDesignSystem/Text/Caption"
|
||||||
|
|
||||||
|
import { RemoveExtraRooms } from "../BookingCode"
|
||||||
|
|
||||||
import styles from "./reward-night.module.css"
|
import styles from "./reward-night.module.css"
|
||||||
|
|
||||||
import type { BookingWidgetSchema } from "@/types/components/bookingWidget"
|
import type { BookingWidgetSchema } from "@/types/components/bookingWidget"
|
||||||
@@ -97,10 +98,7 @@ export default function RewardNight() {
|
|||||||
/>
|
/>
|
||||||
{intl.formatMessage({ id: redemptionErr.message })}
|
{intl.formatMessage({ id: redemptionErr.message })}
|
||||||
</Caption>
|
</Caption>
|
||||||
{isMultiRoomError ? (
|
{isMultiRoomError ? <RemoveExtraRooms /> : null}
|
||||||
// ToDo: Replace with Remove extra rooms JSX element after SW-963 is merged
|
|
||||||
<Body>{"Remove extra rooms"}</Body>
|
|
||||||
) : null}
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import { useIntl } from "react-intl"
|
|||||||
import { REDEMPTION } from "@/constants/booking"
|
import { REDEMPTION } from "@/constants/booking"
|
||||||
|
|
||||||
import { CloseLargeIcon, PlusCircleIcon, PlusIcon } from "../Icons"
|
import { CloseLargeIcon, PlusCircleIcon, PlusIcon } from "../Icons"
|
||||||
|
|
||||||
import Button from "../TempDesignSystem/Button"
|
import Button from "../TempDesignSystem/Button"
|
||||||
import { Tooltip } from "../TempDesignSystem/Tooltip"
|
import { Tooltip } from "../TempDesignSystem/Tooltip"
|
||||||
import { GuestsRoom } from "./GuestsRoom"
|
import { GuestsRoom } from "./GuestsRoom"
|
||||||
@@ -143,7 +142,7 @@ export default function GuestsRoomsPickerDialog({
|
|||||||
<div className={styles.hideOnMobile}>
|
<div className={styles.hideOnMobile}>
|
||||||
<Tooltip
|
<Tooltip
|
||||||
text={addRoomDisabledTextForSpecialRate}
|
text={addRoomDisabledTextForSpecialRate}
|
||||||
position="bottom"
|
position="top"
|
||||||
arrow="left"
|
arrow="left"
|
||||||
>
|
>
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
Reference in New Issue
Block a user