Skip to content

Build per-invoice activity export to JSON for archival #250

Description

@Kingsman-99

Description

AuditLogTable.tsx displays an invoice's audit log in the UI but offers no export for offline archival/compliance record-keeping. This issue adds a structured JSON export.

Technical Context

Involves src/components/AuditLogTable.tsx. Add an "Export JSON" button producing a complete structured record: invoice metadata, full audit log entries, and payment history, suitable for long-term archival outside the app.

Acceptance Criteria

  • Export includes invoice core fields, full audit log (action, actor, timestamp), and payment list
  • Output is valid, pretty-printed JSON with a documented schema version field
  • Filename includes invoice ID and export timestamp: invoice-{id}-archive-{timestamp}.json
  • Works correctly for invoices with empty audit logs (no payments/actions yet)
  • Unit test: schema version field present, correct filename format, empty-log handling

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions