Refactor_Expenses #317

Closed
pramod.mahajan wants to merge 247 commits from Refactor_Expenses into Feature_Expense
2 changed files with 2 additions and 1 deletions
Showing only changes of commit 2c3a3ed2bb - Show all commits

View File

@ -39,10 +39,12 @@ export const ExpenseSchema = (expenseTypes) => {
contentType: z.string().refine((val) => ALLOWED_TYPES.includes(val), {
message: "Only PDF, PNG, JPG, or JPEG files are allowed",
}),
documentId:z.string().optional(),
fileSize: z.number().max(MAX_FILE_SIZE, {
message: "File size must be less than or equal to 5MB",
}),
description: z.string().optional(),
isActive:z.boolean().default(true)
})
)
.nonempty({ message: "At least one file attachment is required" }),

View File

@ -71,7 +71,6 @@ const ManageExpense = ({ closeModal, expenseToEdit = null }) => {
error: EmpError,
} = useEmployeesByProject(selectedproject);
const files = watch("billAttachments");
const onFileChange = async (e) => {
const newFiles = Array.from(e.target.files);