mirror of
https://github.com/documenso/documenso.git
synced 2025-11-15 09:12:02 +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:
@ -361,6 +361,25 @@ export const DocumentHistorySheet = ({
|
||||
]}
|
||||
/>
|
||||
))
|
||||
.with(
|
||||
{ type: DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_ATTACHMENTS_UPDATED },
|
||||
({ data }) => (
|
||||
<DocumentHistorySheetChanges
|
||||
values={[
|
||||
{
|
||||
key: 'Old',
|
||||
value:
|
||||
data.from.map((attachment) => attachment.label).join(', ') || 'None',
|
||||
},
|
||||
{
|
||||
key: 'New',
|
||||
value:
|
||||
data.to.map((attachment) => attachment.label).join(', ') || 'None',
|
||||
},
|
||||
]}
|
||||
/>
|
||||
),
|
||||
)
|
||||
.exhaustive()}
|
||||
|
||||
{isUserDetailsVisible && (
|
||||
|
||||
Reference in New Issue
Block a user