feat: add audit logs to document details page (#2379)

- Add collapsible audit logs section with paginated table
- Add View JSON button to inspect raw audit log entries
- Display legacy document ID and recipient roles
- Add admin TRPC endpoint for fetching audit logs
- Add database index on envelopeId for DocumentAuditLog table

<img width="887" height="724" alt="image"
src="https://github.com/user-attachments/assets/aeb904c9-515f-49e1-9f8f-513aef455678"
/>
This commit is contained in:
Lucas Smith
2026-01-13 14:18:10 +11:00
committed by GitHub
parent cf6f6bcea0
commit cef7987a72
8 changed files with 326 additions and 0 deletions
@@ -0,0 +1,2 @@
-- CreateIndex
CREATE INDEX IF NOT EXISTS "DocumentAuditLog_envelopeId_idx" ON "DocumentAuditLog"("envelopeId");
+2
View File
@@ -472,6 +472,8 @@ model DocumentAuditLog {
ipAddress String?
envelope Envelope @relation(fields: [envelopeId], references: [id], onDelete: Cascade)
@@index([envelopeId])
}
enum DocumentDataType {