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