2026-05-16-paid-lock-activity-log

activetype/changelog

TL;DR

Shipped paid invoice immutability (PUT 409 + read-only editor until Mark unpaid), invoiceactivities Mongo collection with GET /api/invoices/:id/activity, and an Activity panel on the invoice editor. Repo docs/ and API reference updated.

Details

  • API: PUT /api/invoices/[id] rejects edits when status === paid; PATCH unpaid remains the unlock path. POST/PUT/PATCH append lifecycle rows (created, updated, status transitions, payment_date_changed); logging failures do not fail the primary write (console-only).
  • UI: Paid banner + disabled Save on persisted paid invoices (new drafts marked paid locally still save via POST); list/receipt routes use Details labeling where appropriate.
  • Docs: App submodule updates under docs/ (api-reference, invoice-receipt-flow, entities, manual-scenarios).

Links

  • App repo: src/app/api/invoices/[id]/route.ts, src/app/api/invoices/[id]/activity/route.ts, src/models/InvoiceActivity.ts, src/components/InvoiceApp.tsx