feat(contacts): freeform company entry on contact form (+ Add Company) #258
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/mapps-251-freeform-company-contact"
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?
The New / Edit Contact form previously hard-required selecting an existing CRM company before a contact could be saved. A contact is closer to a Google Contacts entry (a name plus a phone), so the company must be optional and accept a freeform typed value that creates no
companiesrow.Frontend DTOs:
CreateContactRequest.company_idis nowOption<Uuid>with a newcompany_name: Option<String>;Contact.company_idandContactResponse.company_idareOption<Uuid>. The local page structsContactDetailandContactEditPayloadcarrycompany_id: Option<Uuid>with serde defaults so a freeform-only contact deserializes without panicking.Contact form: a "+ Add Company" toggle flips the company field between the existing
CompanyPicker(link an existing CRM company) and a freeform text input. Switching modes clears the other mode's value so only one source is ever submitted. The picker is no longerrequired.handle_submitsendscompany_idwhen a CRM company is picked,company_namewhen a freeform name is typed, neither when blank, and blocks supplying both with an inline error. On Edit the form opens in freeform mode when the loaded contact has acompany_namebut no resolvablecompany_id.Render paths: the contact list row and detail view render a freeform company name as plain text (no
CompanyDetaillink) and an FK-linked company name as a link, with no panic on aNonecompany_id.#MAPPS-251
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com
85367f1605005739dc09