Skip to content

feat: Audit logs#500

Draft
sidwebworks wants to merge 5 commits intomainfrom
sid/audit-logs
Draft

feat: Audit logs#500
sidwebworks wants to merge 5 commits intomainfrom
sid/audit-logs

Conversation

@sidwebworks
Copy link
Member

No description provided.

@vercel
Copy link

vercel bot commented Feb 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
academy Ready Ready Preview, Comment Feb 14, 2026 4:28am
carbon Ready Ready Preview, Comment Feb 14, 2026 4:28am
mes Ready Ready Preview, Comment Feb 14, 2026 4:28am

Request Review

sidwebworks and others added 5 commits February 13, 2026 21:35
- Add per-company audit log tables (auditLog_{companyId}) with RPC functions
- Capture INSERT, UPDATE, DELETE operations on key entities (item, itemCost,
  purchaseInvoice, salesInvoice, purchaseOrder, salesOrder, customer, supplier,
  job, quote, employee)
- Store actor ID (from auth.uid()), operation type, entity info, and diff of changes
- Add audit.config.ts for configuration and audit.types.ts for type definitions
- Add audit task handler in Trigger.dev for processing audit events
- Update event system to capture actorId and support dynamic primary keys
- Add global audit log view in Settings with expandable rows showing colored diffs
- Add Table component renderExpandedRow prop for row expansion support
- Add AuditLogDrawer component for entity-level audit history
- Integrate audit log drawer into entity headers (Customer, Supplier, Item, etc.)
Add audit history button to dropdown menus for all item types,
allowing users to view change history for tools, materials, and consumables.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants