fix(05-04): pre-select document client and add manual email entry

- PreparePanel now receives separate assignedClientId (nullable) and
  defaultClientId props so it can distinguish an explicitly locked
  client from just a default
- When document already has assignedClientId: show locked read-only
  display; user cannot change the primary recipient
- When document has no assignedClientId: default to document owner in
  dropdown but allow changing; option to clear and enter email manually
- Added textarea for additional/CC email addresses (comma or newline
  separated) that is always visible for either mode
- POST /api/documents/[id]/prepare now accepts and stores emailAddresses
  array alongside assignedClientId
- Added email_addresses jsonb column to documents table via migration
  0004_military_maximus.sql

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Chandler Copeland
2026-03-20 00:21:34 -06:00
parent 126e10dc1d
commit 05915aa562
7 changed files with 445 additions and 17 deletions

View File

@@ -29,6 +29,13 @@
"when": 1773985969484,
"tag": "0003_cool_natasha_romanoff",
"breakpoints": true
},
{
"idx": 4,
"version": "7",
"when": 1773987640772,
"tag": "0004_military_maximus",
"breakpoints": true
}
]
}