feat(contacts): free-text Title/Department with server-sourced suggestions (PMS-583) #390
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/PMS-583-contact-field-suggestions"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
PMS-583 (frontend half)
Title and Department on the contact form stay free-text, but now suggest from the tenant's own past entries (server-sourced, not browser cache, not a fixed dropdown). This is the agreed direction from the ticket discussion: job titles in particular are open-ended, so a closed dropdown is the wrong tool; the suggestion list nudges consistency without blocking new values.
Change
SuggestInputcomponent (src/components/suggest_input.rs): wraps the sharedInputand adds a server-fed suggestion dropdown. Modelled onCompanyPickerbut it never forces selection. Typing updates the value directly; picking a suggestion just fills the text. FetchesGET /contacts/field-values?field=<field>&q=<text>and lists the matches; a suggestion equal to the current text is dropped.field: "title") and Department (field: "department") fields, each with help text noting the values come from the workspace.No migration
Existing free-text values are exactly what the endpoint suggests from. Nothing to migrate.
Dependency
Needs the mokosh-server
GET /contacts/field-valuesendpoint (companion PR). The dev server is already running that branch, so this is testable end to end now.Test
Contacts -> New (or edit) -> focus Title and type a letter that matches existing titles: a dropdown of the workspace's past titles appears; click one to fill, or keep typing a brand-new title (preserved). Same for Department.
🤖 Generated with Claude Code