feat: add support for attachments in template management

- Enhanced TemplateEditForm to include attachments in the template data.
- Updated createDocumentFromTemplate to handle attachment creation.
- Modified updateTemplate to manage attachment updates and deletions.
- Integrated attachments into ZTemplateSchema and ZAddTemplateSettingsFormSchema for validation.
- Improved getTemplateById to fetch attachments alongside other template data.
This commit is contained in:
Catalin Documenso
2025-05-06 15:48:52 +03:00
parent d10ec437cf
commit cec25ac719
9 changed files with 94 additions and 10 deletions

View File

@ -34,6 +34,7 @@ export const getTemplateById = async ({ id, userId, teamId }: GetTemplateByIdOpt
templateMeta: true,
recipients: true,
fields: true,
attachments: true,
user: {
select: {
id: true,