mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 08:13:56 +10:00
feat: enhance document attachment updates and audit logging
- Implemented detailed handling for document attachment updates in DocumentHistorySheet. - Updated updateDocument function to log changes only when attachments differ. - Enhanced ZDocumentSchema to include attachment type validation. - Refined audit log formatting for document attachment updates to improve clarity.
This commit is contained in:
@ -242,7 +242,7 @@ export const updateDocument = async ({
|
||||
);
|
||||
}
|
||||
|
||||
if (data.attachments) {
|
||||
if (!isAttachmentsSame) {
|
||||
auditLogs.push(
|
||||
createDocumentAuditLogData({
|
||||
type: DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_ATTACHMENTS_UPDATED,
|
||||
@ -250,7 +250,7 @@ export const updateDocument = async ({
|
||||
metadata: requestMetadata,
|
||||
data: {
|
||||
from: document.attachments,
|
||||
to: data.attachments,
|
||||
to: data.attachments ?? [],
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user