mirror of
https://github.com/documenso/documenso.git
synced 2025-11-12 15:53:02 +10:00
feat: add sequential document view logs (#1871)
## Description Add a new document audit log to detect when the document is viewed. This should only be visible in the document audit log page Notes: 1. I wanted to reuse the `DOCUMENT_OPENED` event and add an additional paramter to track sequential views, but it's not query-able 2. This will log "DOCUMENT_VIEWED" before "DOCUMENT_OPENED" but i don't think it matters
This commit is contained in:
@ -338,6 +338,10 @@ export const formatDocumentAuditLogAction = (
|
||||
anonymous: msg`Document opened`,
|
||||
identified: msg`${prefix} opened the document`,
|
||||
}))
|
||||
.with({ type: DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_VIEWED }, () => ({
|
||||
anonymous: msg`Document viewed`,
|
||||
identified: msg`${prefix} viewed the document`,
|
||||
}))
|
||||
.with({ type: DOCUMENT_AUDIT_LOG_TYPE.DOCUMENT_TITLE_UPDATED }, () => ({
|
||||
anonymous: msg`Document title updated`,
|
||||
identified: msg`${prefix} updated the document title`,
|
||||
|
||||
Reference in New Issue
Block a user