Merged in fix/SW-2642-select-hotel-corporate-ch (pull request #2003)
fix: SW-2642 Fixed corporate chq and voucher rates city search * fix: SW-2642 Fixed corporate chq and voucher rates city search * fix: SW-2642 Fixed no availability alert for all hotels * fix: SW-2642 Combined flags to suitable variable * fix: SW-2642 Fixed map view to show prices Approved-by: Arvid Norlin
This commit is contained in:
@@ -95,25 +95,15 @@ export const hotelSchema = z
|
||||
export const hotelsAvailabilitySchema = z.object({
|
||||
data: z.array(
|
||||
z.object({
|
||||
attributes: z
|
||||
.object({
|
||||
bookingCode: z.string().nullish(),
|
||||
checkInDate: z.string(),
|
||||
checkOutDate: z.string(),
|
||||
hotelId: z.number(),
|
||||
occupancy: occupancySchema,
|
||||
productType: productTypeSchema,
|
||||
status: z.string(),
|
||||
})
|
||||
.transform((data) => {
|
||||
if (data.bookingCode && data.productType?.public) {
|
||||
data.productType.public.bookingCode = data.bookingCode
|
||||
}
|
||||
if (data.bookingCode && data.productType?.member) {
|
||||
data.productType.member.bookingCode = data.bookingCode
|
||||
}
|
||||
return data
|
||||
}),
|
||||
attributes: z.object({
|
||||
bookingCode: z.string().nullish(),
|
||||
checkInDate: z.string(),
|
||||
checkOutDate: z.string(),
|
||||
hotelId: z.number(),
|
||||
occupancy: occupancySchema,
|
||||
productType: productTypeSchema,
|
||||
status: z.string(),
|
||||
}),
|
||||
relationships: relationshipsSchema.optional(),
|
||||
type: z.string().optional(),
|
||||
})
|
||||
|
||||
@@ -46,7 +46,6 @@ const partialPriceSchema = z.object({
|
||||
}
|
||||
return RateTypeEnum.Regular
|
||||
}),
|
||||
bookingCode: z.string().nullish(),
|
||||
})
|
||||
|
||||
export const productTypeCorporateChequeSchema = z
|
||||
|
||||
Reference in New Issue
Block a user