feat: adjust select rate ui to latest design
This commit is contained in:
@@ -1,14 +1,21 @@
|
||||
import { z } from "zod"
|
||||
|
||||
import {
|
||||
nullableArrayObjectValidator,
|
||||
nullableArrayStringValidator,
|
||||
} from "@/utils/zod/arrayValidator"
|
||||
import { nullableNumberValidator } from "@/utils/zod/numberValidator"
|
||||
import { nullableStringValidator } from "@/utils/zod/stringValidator"
|
||||
|
||||
import { addressSchema } from "./hotel/address"
|
||||
import { contactInformationSchema } from "./hotel/contactInformation"
|
||||
import { hotelContentSchema } from "./hotel/content"
|
||||
import { detailedFacilitiesSchema } from "./hotel/detailedFacility"
|
||||
import { hotelFactsSchema } from "./hotel/facts"
|
||||
import { gallerySchema } from "./hotel/gallery"
|
||||
import { healthFacilitySchema } from "./hotel/healthFacilities"
|
||||
import { healthFacilitiesSchema } from "./hotel/healthFacilities"
|
||||
import { displayWebPageSchema } from "./hotel/include/additionalData/displayWebPage"
|
||||
import { facilitySchema } from "./hotel/include/additionalData/facility"
|
||||
import { gallerySchema } from "./hotel/include/additionalData/gallery"
|
||||
import { includeSchema } from "./hotel/include/include"
|
||||
import { locationSchema } from "./hotel/location"
|
||||
import { merchantInformationSchema } from "./hotel/merchantInformation"
|
||||
@@ -18,41 +25,41 @@ import { ratingsSchema } from "./hotel/rating"
|
||||
import { rewardNightSchema } from "./hotel/rewardNight"
|
||||
import { socialMediaSchema } from "./hotel/socialMedia"
|
||||
import { specialAlertsSchema } from "./hotel/specialAlerts"
|
||||
import { specialNeedGroupSchema } from "./hotel/specialNeedGroups"
|
||||
import { facilitySchema } from "./additionalData"
|
||||
import { imageSchema } from "./image"
|
||||
|
||||
export const attributesSchema = z.object({
|
||||
id: z.string().optional(),
|
||||
address: addressSchema,
|
||||
cityId: z.string(),
|
||||
cityName: z.string(),
|
||||
conferencesAndMeetings: facilitySchema.optional(),
|
||||
cityId: nullableStringValidator,
|
||||
cityName: nullableStringValidator,
|
||||
conferencesAndMeetings: facilitySchema.nullish(),
|
||||
contactInformation: contactInformationSchema,
|
||||
countryCode: nullableStringValidator,
|
||||
detailedFacilities: detailedFacilitiesSchema,
|
||||
gallery: gallerySchema.optional(),
|
||||
galleryImages: z.array(imageSchema).optional(),
|
||||
healthAndWellness: facilitySchema.optional(),
|
||||
healthFacilities: z.array(healthFacilitySchema),
|
||||
displayWebPage: displayWebPageSchema,
|
||||
gallery: gallerySchema.nullish(),
|
||||
galleryImages: z
|
||||
.array(imageSchema)
|
||||
.nullish()
|
||||
.transform((arr) => (arr ? arr.filter(Boolean) : [])),
|
||||
healthAndWellness: facilitySchema.nullish(),
|
||||
healthFacilities: healthFacilitiesSchema,
|
||||
hotelContent: hotelContentSchema,
|
||||
hotelFacts: hotelFactsSchema,
|
||||
hotelRoomElevatorPitchText: z.string().optional(),
|
||||
hotelType: z.string().optional(),
|
||||
hotelType: nullableStringValidator,
|
||||
isActive: z.boolean(),
|
||||
isPublished: z.boolean(),
|
||||
keywords: z.array(z.string()),
|
||||
keywords: nullableArrayStringValidator,
|
||||
location: locationSchema,
|
||||
merchantInformationData: merchantInformationSchema,
|
||||
name: z.string(),
|
||||
operaId: z.string(),
|
||||
parking: z.array(parkingSchema),
|
||||
name: nullableStringValidator,
|
||||
operaId: nullableStringValidator,
|
||||
parking: nullableArrayObjectValidator(parkingSchema),
|
||||
pointsOfInterest: pointOfInterestsSchema,
|
||||
ratings: ratingsSchema,
|
||||
restaurantImages: facilitySchema.nullish(),
|
||||
rewardNight: rewardNightSchema,
|
||||
restaurantImages: facilitySchema.optional(),
|
||||
socialMedia: socialMediaSchema,
|
||||
specialAlerts: specialAlertsSchema,
|
||||
specialNeedGroups: z.array(specialNeedGroupSchema),
|
||||
vat: nullableNumberValidator,
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user