fix: avoid localizing currencies and default missing value to N/A
This commit is contained in:
@@ -4,8 +4,6 @@ import { ChildBedTypeEnum } from "@/constants/booking"
|
||||
|
||||
import { phoneValidator } from "@/utils/phoneValidator"
|
||||
|
||||
import { CurrencyEnum } from "@/types/enums/currency"
|
||||
|
||||
// MUTATION
|
||||
export const createBookingSchema = z
|
||||
.object({
|
||||
@@ -80,7 +78,7 @@ const guestSchema = z.object({
|
||||
|
||||
const packageSchema = z.object({
|
||||
code: z.string().nullable().default(""),
|
||||
currency: z.nativeEnum(CurrencyEnum),
|
||||
currency: z.string(),
|
||||
quantity: z.number().int(),
|
||||
totalPrice: z.number(),
|
||||
totalQuantity: z.number().int(),
|
||||
@@ -110,7 +108,7 @@ export const bookingConfirmationSchema = z
|
||||
extraBedTypes: z.array(extraBedTypesSchema).default([]),
|
||||
computedReservationStatus: z.string().nullable().default(""),
|
||||
confirmationNumber: z.string().nullable().default(""),
|
||||
currencyCode: z.nativeEnum(CurrencyEnum),
|
||||
currencyCode: z.string(),
|
||||
guest: guestSchema,
|
||||
hotelId: z.string(),
|
||||
packages: z.array(packageSchema).default([]),
|
||||
|
||||
Reference in New Issue
Block a user