feat: SW-1589 Obtain bookingCode from booking object via store
This commit is contained in:
@@ -73,7 +73,6 @@ export default function PaymentClient({
|
|||||||
const lang = useLang()
|
const lang = useLang()
|
||||||
const intl = useIntl()
|
const intl = useIntl()
|
||||||
const searchParams = useSearchParams()
|
const searchParams = useSearchParams()
|
||||||
const bookingCode = searchParams.get("bookingCode")
|
|
||||||
|
|
||||||
const { booking, canProceedToPayment, rooms, totalPrice } =
|
const { booking, canProceedToPayment, rooms, totalPrice } =
|
||||||
useEnterDetailsStore((state) => ({
|
useEnterDetailsStore((state) => ({
|
||||||
@@ -342,7 +341,7 @@ export default function PaymentClient({
|
|||||||
memberPrice: room.roomRate.memberRate?.localPrice.pricePerStay,
|
memberPrice: room.roomRate.memberRate?.localPrice.pricePerStay,
|
||||||
publicPrice: room.roomRate.publicRate?.localPrice.pricePerStay,
|
publicPrice: room.roomRate.publicRate?.localPrice.pricePerStay,
|
||||||
},
|
},
|
||||||
bookingCode,
|
bookingCode: booking.bookingCode,
|
||||||
roomTypeCode: room.bedType!.roomTypeCode, // A selection has been made in order to get to this step.
|
roomTypeCode: room.bedType!.roomTypeCode, // A selection has been made in order to get to this step.
|
||||||
smsConfirmationRequested: data.smsConfirmation,
|
smsConfirmationRequested: data.smsConfirmation,
|
||||||
specialRequest: {
|
specialRequest: {
|
||||||
@@ -363,7 +362,6 @@ export default function PaymentClient({
|
|||||||
rooms,
|
rooms,
|
||||||
booking,
|
booking,
|
||||||
isFlexRate,
|
isFlexRate,
|
||||||
bookingCode,
|
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ const roomsSchema = z
|
|||||||
.array(
|
.array(
|
||||||
z.object({
|
z.object({
|
||||||
adults: z.number().int().nonnegative(),
|
adults: z.number().int().nonnegative(),
|
||||||
bookingCode: z.string().nullable(),
|
bookingCode: z.string().optional(),
|
||||||
childrenAges: z
|
childrenAges: z
|
||||||
.array(
|
.array(
|
||||||
z.object({
|
z.object({
|
||||||
|
|||||||
Reference in New Issue
Block a user