| 20-apply-template-and-portal-nav |
02 |
ui |
| react |
| nextjs |
| typescript |
| templates |
| quick-fill |
|
| phase |
provides |
| 20-01 |
Start from template in AddDocumentModal, field snapshot with fresh UUIDs, role mapping |
|
| phase |
provides |
| 18-template-schema-and-crud-api |
documentTemplates table, SignatureFieldData.hint field in schema |
|
|
| Template Hint quick-fill chip in PreparePanel for text fields with hints |
| DocumentPageClient fetches fields and derives hint for selected field |
|
| future template enhancements |
| PreparePanel quick-fill UI |
|
| added |
patterns |
|
|
| Fields state fetched in DocumentPageClient using same /api/documents/:id/fields endpoint used by handlePrepare |
| selectedFieldHint derived from fields array lookup — no new API endpoint needed |
| Optional prop pattern: selectedFieldHint? — undefined means no chip, existing callers unaffected |
|
|
| created |
modified |
|
|
| teressa-copeland-homes/src/app/portal/(protected)/documents/[docId]/_components/DocumentPageClient.tsx |
| teressa-copeland-homes/src/app/portal/(protected)/documents/[docId]/_components/PreparePanel.tsx |
|
|
| Fields fetched on mount and on aiPlacementKey change so hint stays current after AI auto-place |
| selectedFieldHint passed as optional prop to PreparePanel — undefined means chip not rendered, backwards-compatible |
| Template Hint chip placed after Client Email chip in Quick Fill section, matching exact same markup pattern |
|
| Hint chip: two-span button (label + value) matching Client Name / Property Address / Email pattern |
|
|
2min |
2026-04-06 |