Merged in BOOK-448-select-rate-reload-bookingcode (pull request #2974)
(BOOK-448): prevent refetching select rate availability when adding room bookingcode * (BOOK-448): prevent refetching select rate availability when adding room bookingcode Approved-by: Linus Flood
This commit is contained in:
@@ -16,13 +16,19 @@ const childrenInRoomSchema = z
|
||||
)
|
||||
.optional()
|
||||
|
||||
export const baseRoomSchema = z.object({
|
||||
const sharedRoomFields = {
|
||||
adults: z.number().int().min(1),
|
||||
bookingCode: z.string().optional(),
|
||||
childrenInRoom: childrenInRoomSchema,
|
||||
packages: z
|
||||
.array(z.nativeEnum({ ...BreakfastPackageEnum, ...RoomPackageCodeEnum }))
|
||||
.optional(),
|
||||
}
|
||||
|
||||
export const selectRoomSchema = z.object(sharedRoomFields)
|
||||
|
||||
export const baseRoomSchema = z.object({
|
||||
...sharedRoomFields,
|
||||
bookingCode: z.string().optional(),
|
||||
})
|
||||
|
||||
export const selectedRoomSchema = z.object({
|
||||
|
||||
Reference in New Issue
Block a user