Adding Multiple file uploader.
This commit is contained in:
parent
339ae31465
commit
6da3f3b1b4
@ -4,7 +4,6 @@ import Label from "../common/Label";
|
|||||||
|
|
||||||
const MultipleFileUploader = ({
|
const MultipleFileUploader = ({
|
||||||
label = "Upload Documents",
|
label = "Upload Documents",
|
||||||
required = false,
|
|
||||||
invoiceAttachmentTypeId,
|
invoiceAttachmentTypeId,
|
||||||
value = [],
|
value = [],
|
||||||
onChange,
|
onChange,
|
||||||
@ -61,7 +60,7 @@ const MultipleFileUploader = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Label required={required}>{label}</Label>
|
<Label >{label}</Label>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
className="border border-secondary border-dashed rounded p-4 text-center"
|
className="border border-secondary border-dashed rounded p-4 text-center"
|
||||||
|
|||||||
@ -160,7 +160,6 @@ const PurchasePaymentDetails = () => {
|
|||||||
onChange={field.onChange}
|
onChange={field.onChange}
|
||||||
isLoading={isLoading}
|
isLoading={isLoading}
|
||||||
className="m-0"
|
className="m-0"
|
||||||
required={false}
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@ -93,7 +93,6 @@ export const PurchaseSchema = z.object({
|
|||||||
paymentDueDate: z.coerce.date().nullable(),
|
paymentDueDate: z.coerce.date().nullable(),
|
||||||
transportCharges: z.number().nullable(),
|
transportCharges: z.number().nullable(),
|
||||||
description: z.string().min(1, { message: "Description is required" }),
|
description: z.string().min(1, { message: "Description is required" }),
|
||||||
invoiceAttachmentTypeId: z.string().nullable(),
|
|
||||||
attachments: z.array(SingleAttachmentSchema).optional(),
|
attachments: z.array(SingleAttachmentSchema).optional(),
|
||||||
|
|
||||||
// attachments: z.array(AttachmentSchema([], 25)).optional(),
|
// attachments: z.array(AttachmentSchema([], 25)).optional(),
|
||||||
@ -134,7 +133,6 @@ export const defaultPurchaseValue = {
|
|||||||
paymentDueDate: null,
|
paymentDueDate: null,
|
||||||
transportCharges: null,
|
transportCharges: null,
|
||||||
description: "",
|
description: "",
|
||||||
invoiceAttachmentTypeId: null,
|
|
||||||
attachments: [],
|
attachments: [],
|
||||||
|
|
||||||
// attachments: [],
|
// attachments: [],
|
||||||
@ -171,7 +169,6 @@ export const getStepFields = (stepIndex) => {
|
|||||||
"transportCharges",
|
"transportCharges",
|
||||||
"paymentDueDate",
|
"paymentDueDate",
|
||||||
"description",
|
"description",
|
||||||
"invoiceAttachmentTypeId"
|
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user