From 6da3f3b1b490ed9b03b83efd97d4e863d760d4ba Mon Sep 17 00:00:00 2001 From: Kartik Sharma Date: Fri, 28 Nov 2025 15:48:01 +0530 Subject: [PATCH] Adding Multiple file uploader. --- src/components/purchase/MultipleFileUploader.jsx | 3 +-- src/components/purchase/PurchasePaymentDetails.jsx | 1 - src/components/purchase/PurchaseSchema.jsx | 3 --- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/components/purchase/MultipleFileUploader.jsx b/src/components/purchase/MultipleFileUploader.jsx index e2d786e6..90e76777 100644 --- a/src/components/purchase/MultipleFileUploader.jsx +++ b/src/components/purchase/MultipleFileUploader.jsx @@ -4,7 +4,6 @@ import Label from "../common/Label"; const MultipleFileUploader = ({ label = "Upload Documents", - required = false, invoiceAttachmentTypeId, value = [], onChange, @@ -61,7 +60,7 @@ const MultipleFileUploader = ({ return (
- +
{ onChange={field.onChange} isLoading={isLoading} className="m-0" - required={false} /> )} /> diff --git a/src/components/purchase/PurchaseSchema.jsx b/src/components/purchase/PurchaseSchema.jsx index e036d0a3..6ef616dd 100644 --- a/src/components/purchase/PurchaseSchema.jsx +++ b/src/components/purchase/PurchaseSchema.jsx @@ -93,7 +93,6 @@ export const PurchaseSchema = z.object({ paymentDueDate: z.coerce.date().nullable(), transportCharges: z.number().nullable(), description: z.string().min(1, { message: "Description is required" }), - invoiceAttachmentTypeId: z.string().nullable(), attachments: z.array(SingleAttachmentSchema).optional(), // attachments: z.array(AttachmentSchema([], 25)).optional(), @@ -134,7 +133,6 @@ export const defaultPurchaseValue = { paymentDueDate: null, transportCharges: null, description: "", - invoiceAttachmentTypeId: null, attachments: [], // attachments: [], @@ -171,7 +169,6 @@ export const getStepFields = (stepIndex) => { "transportCharges", "paymentDueDate", "description", - "invoiceAttachmentTypeId" ], };