Adds a company selector to the contact details form so agents can associate a contact with an existing company directly from the contact page. Closes - None Why Contacts already expose company information through the CRM fields, but the form only accepted free-text company names. As we split company CRM work into smaller PRs, this keeps the contact page aligned with the structured company model while preserving the existing company-name behavior used by automations. What changed - Shows a company dropdown in the contact details form when the Companies feature is enabled. - Keeps legacy free-text company names editable when a contact has no structured `company_id`. - Allows Enterprise contact create/update APIs to accept account-scoped `company_id`. - Syncs `additional_attributes.company_name` when a contact is associated with a company, including the existing email-domain auto-association path. - Serializes `company_id` in the contact model payload so the form can show the current association. How to test 1. Enable Companies for an account and open a contact details page. 2. In Edit contact details, use the Company field to select an existing company. 3. Save the contact and refresh the page. 4. Confirm the selected company remains visible and the contact is associated with that company. 5. Confirm contacts with only a legacy free-text company name still show the text input instead of an empty selector. --------- Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> Co-authored-by: iamsivin <iamsivin@gmail.com> Co-authored-by: Sony Mathew <2040199+sony-mathew@users.noreply.github.com>
154 lines
5.2 KiB
JSON
154 lines
5.2 KiB
JSON
{
|
||
"COMPANIES": {
|
||
"HEADER": "Companies",
|
||
"SORT_BY": {
|
||
"LABEL": "Sort by",
|
||
"OPTIONS": {
|
||
"NAME": "Name",
|
||
"DOMAIN": "Domain",
|
||
"CREATED_AT": "Created at",
|
||
"LAST_ACTIVITY_AT": "Last activity",
|
||
"CONTACTS_COUNT": "Contacts count"
|
||
}
|
||
},
|
||
"ORDER": {
|
||
"LABEL": "Order",
|
||
"OPTIONS": {
|
||
"ASCENDING": "Ascending",
|
||
"DESCENDING": "Descending"
|
||
}
|
||
},
|
||
"SEARCH_PLACEHOLDER": "Search companies...",
|
||
"LOADING": "Loading companies...",
|
||
"UNNAMED": "Unnamed Company",
|
||
"CONTACTS_COUNT": "{n} contact | {n} contacts",
|
||
"ACTIONS": {
|
||
"CREATE": "Add company"
|
||
},
|
||
"SELECTOR": {
|
||
"PLACEHOLDER": "Select company",
|
||
"CREATE_OPTION": "Add \"{name}\""
|
||
},
|
||
"CREATE": {
|
||
"TITLE": "Add company details",
|
||
"ACTIONS": {
|
||
"SAVE": "Add company"
|
||
},
|
||
"MESSAGES": {
|
||
"SUCCESS": "Company created.",
|
||
"ERROR": "Could not create the company."
|
||
}
|
||
},
|
||
"DETAIL": {
|
||
"LOADING": "Loading company details...",
|
||
"EMPTY_STATE": {
|
||
"TITLE": "Company not found",
|
||
"SUBTITLE": "This company may have been removed or is no longer available in this account."
|
||
},
|
||
"SIDEBAR": {
|
||
"TABS": {
|
||
"ATTRIBUTES": "Attributes",
|
||
"CONTACTS": "Contacts",
|
||
"HISTORY": "History",
|
||
"NOTES": "Notes"
|
||
}
|
||
},
|
||
"HISTORY": {
|
||
"EMPTY": "No conversations found for this company's contacts yet."
|
||
},
|
||
"NOTES": {
|
||
"EMPTY": "No notes found for this company's contacts yet."
|
||
},
|
||
"ATTRIBUTES": {
|
||
"SEARCH_PLACEHOLDER": "Search attributes...",
|
||
"EMPTY_STATE": "There are no company custom attributes configured yet.",
|
||
"NO_ATTRIBUTES": "No matching attributes found.",
|
||
"UNUSED_ATTRIBUTES": "{count} unused attribute | {count} unused attributes",
|
||
"MESSAGES": {
|
||
"UPDATE_SUCCESS": "Company attribute updated.",
|
||
"UPDATE_ERROR": "Could not update company attribute.",
|
||
"DELETE_SUCCESS": "Company attribute removed.",
|
||
"DELETE_ERROR": "Could not remove company attribute."
|
||
}
|
||
},
|
||
"CONTACTS": {
|
||
"LOADING": "Loading contacts...",
|
||
"EMPTY": "No contacts are linked to this company yet.",
|
||
"UNNAMED_CONTACT": "Unnamed contact",
|
||
"ACTIONS": {
|
||
"ADD": "Add contact",
|
||
"REMOVE": "Remove contact"
|
||
},
|
||
"DIALOGS": {
|
||
"ADD": {
|
||
"DESCRIPTION": "Search for an existing contact and link it to this company.",
|
||
"SEARCH_PLACEHOLDER": "Search contacts...",
|
||
"INITIAL": "Start typing to search contacts.",
|
||
"EMPTY": "No contacts found.",
|
||
"CONFIRM_TITLE": "Link contact",
|
||
"CONFIRM_DESCRIPTION": "Confirm the company and contact before linking them.",
|
||
"COMPANY_LABEL": "Company",
|
||
"CONTACT_LABEL": "Contact",
|
||
"CURRENT_COMPANY": "Currently linked to {companyName}",
|
||
"ADD": "Link contact",
|
||
"CANCEL": "Cancel"
|
||
}
|
||
},
|
||
"MESSAGES": {
|
||
"ADD_SUCCESS": "Contact linked to company.",
|
||
"ADD_ERROR": "Could not link contact to company.",
|
||
"REASSIGN_SUCCESS": "Contact reassigned to company.",
|
||
"REASSIGN_ERROR": "Could not reassign contact to company.",
|
||
"REMOVE_SUCCESS": "Contact removed from company.",
|
||
"REMOVE_ERROR": "Could not remove contact from company."
|
||
}
|
||
},
|
||
"AVATAR": {
|
||
"UPDATING": "Updating company avatar...",
|
||
"UPLOAD_SUCCESS": "Company avatar updated.",
|
||
"UPLOAD_ERROR": "Could not update the company avatar.",
|
||
"DELETE_SUCCESS": "Company avatar removed.",
|
||
"DELETE_ERROR": "Could not remove the company avatar."
|
||
},
|
||
"PROFILE": {
|
||
"TITLE": "Edit company details",
|
||
"CREATED_AT": "Created {date}",
|
||
"LAST_ACTIVE": "Last active {date}",
|
||
"DESCRIPTION_PLACEHOLDER": "Add a short description for this company",
|
||
"ACTIONS": {
|
||
"SAVE": "Update company"
|
||
},
|
||
"MESSAGES": {
|
||
"UPDATE_SUCCESS": "Company updated.",
|
||
"UPDATE_ERROR": "Could not update the company."
|
||
},
|
||
"FIELDS": {
|
||
"NAME": "Name",
|
||
"DOMAIN": "Domain"
|
||
}
|
||
},
|
||
"DELETE": {
|
||
"SECTION_TITLE": "Danger zone",
|
||
"SECTION_DESCRIPTION": "Delete this company and unlink its contacts. The contacts will remain in the account.",
|
||
"BUTTON": "Delete company",
|
||
"TITLE": "Delete company?",
|
||
"DESCRIPTION": "This will remove the company and unlink all associated contacts. Contacts themselves will be preserved.",
|
||
"DESCRIPTION_WITH_NAME": "This will remove {companyName} and unlink all associated contacts. Contacts themselves will be preserved.",
|
||
"CONFIRM": "Delete company",
|
||
"MESSAGES": {
|
||
"SUCCESS": "Company deleted.",
|
||
"ERROR": "Could not delete the company."
|
||
}
|
||
}
|
||
},
|
||
"EMPTY_STATE": {
|
||
"TITLE": "No companies found"
|
||
}
|
||
},
|
||
"COMPANIES_LAYOUT": {
|
||
"PAGINATION_FOOTER": {
|
||
"SHOWING": "Showing {startItem} – {endItem} of {totalItems} company | Showing {startItem} – {endItem} of {totalItems} companies"
|
||
}
|
||
}
|
||
}
|