mirror of
https://github.com/documenso/documenso.git
synced 2025-11-15 09:12:02 +10:00
feat: enhance document management by adding attachments support
- Updated DocumentEditForm to include attachments in the document data. - Modified getDocumentWithDetailsById to fetch attachments. - Updated ZDocumentSchema to validate attachments. - Enhanced AddSettingsFormPartial to handle attachments with default values and updated field names.
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
import type { z } from 'zod';
|
||||
|
||||
import { AttachmentSchema } from '@documenso/prisma/generated/zod/modelSchema/AttachmentSchema';
|
||||
import { DocumentDataSchema } from '@documenso/prisma/generated/zod/modelSchema/DocumentDataSchema';
|
||||
import { DocumentMetaSchema } from '@documenso/prisma/generated/zod/modelSchema/DocumentMetaSchema';
|
||||
import { DocumentSchema } from '@documenso/prisma/generated/zod/modelSchema/DocumentSchema';
|
||||
@ -59,6 +60,7 @@ export const ZDocumentSchema = DocumentSchema.pick({
|
||||
}).nullable(),
|
||||
recipients: ZRecipientLiteSchema.array(),
|
||||
fields: ZFieldSchema.array(),
|
||||
attachments: AttachmentSchema.array(),
|
||||
});
|
||||
|
||||
export type TDocument = z.infer<typeof ZDocumentSchema>;
|
||||
|
||||
Reference in New Issue
Block a user