fb02f3d5e196e05ccfce00b93f6efe8b96e596bd
The new smart-archive backend (d07f1ed) is now wired to the existing
bulk-archive endpoint. Previously /api/v1/clients/bulk just called the
legacy archiveClient — bypassing the dossier and the per-client
decisions. That's now a regression hazard: a power-user could bulk-
archive a client mid-deposit with no audit trail.
New behaviour:
- bulk action='archive' fetches the dossier per client.
- Low-stakes clients (open through eoi_signed) auto-archive with the
same default decisions the single-client modal would pick: release
available/under-offer berths, retain sold berths, cancel active
reservations, leave invoices, leave Documenso envelopes pending,
acknowledge signed documents inline.
- High-stakes clients (deposit_10pct and beyond) refuse with a clear
message: "open the client to confirm + supply a reason". The bulk
summary surfaces the failure per row so the user knows which clients
need individual handling.
- Pre-flight blocker check (e.g. active reservation on a sold berth)
also rejects with a per-row error instead of crashing.
The proper "bulk wizard" UI (per-high-stakes-client confirmation panel
with reason fields) is still TODO — this commit just makes the existing
button safe.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Description
No description provided
Languages
TypeScript
98%
HTML
1.7%
Shell
0.2%
CSS
0.1%