2026-04-06 02:32:47 +03:00

22 lines
645 B
TypeScript

import { z } from "zod"
const relationFieldSchema = z
.object({ value: z.string(), label: z.string() })
.nullable()
const vendorCreditFormSchema = z.object({
vendor: relationFieldSchema,
bill: relationFieldSchema,
department: relationFieldSchema,
subject: z.string().min(1, "Subject is required"),
vendor_credit_date: z.string().optional(),
status: z.string().optional(),
discount: z.string().optional(),
notes: z.string().optional(),
})
type VendorCreditFormValues = z.infer<typeof vendorCreditFormSchema>
export { vendorCreditFormSchema, relationFieldSchema }
export type { VendorCreditFormValues }