Chandler Copeland 10ea48d5ba feat(19-02): template editor page, TemplatePageClient, and TemplatePanel
- Server component at /portal/templates/[id] queries documentTemplates with formTemplate relation
- notFound() for archived/missing templates
- TemplatePageClient: state owner mirroring DocumentPageClient pattern
  - deriveRolesFromFields initializes Buyer/Seller defaults or extracts from existing fields
  - handlePersist merges textFillData hints into f.hint for type='text' fields
  - handleAiAutoPlace POSTs to /api/templates/[id]/ai-prepare and increments aiPlacementKey
  - Role rename/remove re-fetches fields and PATCHes with updated signerEmail values
- TemplatePanel: 280px right panel with inline styles matching portal design system
  - Signers/Roles section with color dots, click-to-rename, remove with ConfirmDialog
  - Add role input with preset chips (Buyer, Co-Buyer, Seller, Co-Seller)
  - AI Auto-place button (navy) with spinner/loading state and error display
  - Save Template button (gold) with success 'Saved' text fading after 3s
2026-04-06 13:15:23 -06:00
Description
No description provided
19 MiB
Languages
TypeScript 97.5%
Shell 1.6%
Dockerfile 0.4%
JavaScript 0.3%
CSS 0.2%