Merged in feat/SW-1308-booking-codes-track-b (pull request #1607)
Feat/SW-1308 booking codes track b * feat: SW-1308 Booking codes track b * feat: SW-1308 Booking codes Track B implementation * feat: SW-1308 Optimized after rebase Approved-by: Arvid Norlin
This commit is contained in:
@@ -104,10 +104,7 @@ export const bookingWidgetSchema = z
|
||||
path: ["search"],
|
||||
})
|
||||
}
|
||||
if (
|
||||
value.rooms.length > 1 &&
|
||||
value.bookingCode?.value.toLowerCase().startsWith("vo")
|
||||
) {
|
||||
if (value.rooms.length > 1 && value.bookingCode?.value.startsWith("VO")) {
|
||||
ctx.addIssue({
|
||||
code: z.ZodIssueCode.custom,
|
||||
message: "Multi-room booking is not available with this booking code.",
|
||||
@@ -119,18 +116,6 @@ export const bookingWidgetSchema = z
|
||||
path: ["rooms"],
|
||||
})
|
||||
}
|
||||
if (value.rooms.length > 1 && value.redemption) {
|
||||
ctx.addIssue({
|
||||
code: z.ZodIssueCode.custom,
|
||||
message: "Multi-room booking is not available with reward night.",
|
||||
path: ["bookingCode.value"],
|
||||
})
|
||||
ctx.addIssue({
|
||||
code: z.ZodIssueCode.custom,
|
||||
message: "Multi-room booking is not available with reward night.",
|
||||
path: ["rooms"],
|
||||
})
|
||||
}
|
||||
if (value.rooms.length > 1 && value.redemption) {
|
||||
ctx.addIssue({
|
||||
code: z.ZodIssueCode.custom,
|
||||
|
||||
Reference in New Issue
Block a user