feat: SW-1422 Updated UX for booking code desktop and mobile

This commit is contained in:
Hrishikesh Vaipurkar
2025-01-30 23:14:07 +01:00
parent 6741a0a21c
commit 63f456da5a
14 changed files with 313 additions and 115 deletions
+20 -16
View File
@@ -37,22 +37,26 @@ export const guestRoomsSchema = z.array(guestRoomSchema)
export const bookingCodeSchema = z
.object({
value: z.string().refine(
(value) => {
if (
!value ||
/(^D\d*$)|(^DSH[0-9a-z]*$)|(^L\d*$)|(^LH[0-9a-z]*$)|(^B[a-z]{3}\d{6})|(^VO[0-9a-z]*$)|^[0-9a-z]*$/i.test(
value
)
) {
return true
} else {
return false
}
},
{ message: "Invalid booking code" }
),
remember: z.boolean(),
value: z
.string()
.refine(
(value) => {
if (
!value ||
/(^D\d*$)|(^DSH[0-9a-z]*$)|(^L\d*$)|(^LH[0-9a-z]*$)|(^B[a-z]{3}\d{6})|(^VO[0-9a-z]*$)|^[0-9a-z]*$/i.test(
value
)
) {
return true
} else {
return false
}
},
{ message: "Invalid booking code" }
)
.default(""),
remember: z.boolean().default(false),
flag: z.boolean().default(false),
})
.optional()