fixed challan attachmenet

This commit is contained in:
pramod.mahajan 2025-11-28 11:35:59 +05:30
parent 44e1e16d19
commit aec6930e11

View File

@ -180,7 +180,12 @@ export const DeliveryChallanSchema = z.object({
invoiceAttachmentTypeId: z.string().nullable(),
deliveryChallanDate: z.string().min(1, { message: "Deliver date required" }),
description: z.string().min(1, { message: "Description required" }),
attachment: z.object(SingleAttachmentSchema.shape).nullable(),
attachment: z.any().refine(
(val) => val && typeof val === "object" && !!val.base64Data,
{
message: "Please upload document",
}
),
});
export const DeliveryChallanDefaultValue = {