EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
email address add impr
Yuri Kuznetsovc426a637feac
diff --git a/client/src/views/email/fields/email-address-varchar.js b/client/src/views/email/fields/email-address-varchar.jsindex 3c8be77ecc..ba1b0a609c 100644--- a/client/src/views/email/fields/email-address-varchar.js+++ b/client/src/views/email/fields/email-address-varchar.js@@ -420,7 +420,38 @@ class EmailAddressVarcharFieldView extends BaseFieldView {return true;}+ /**+ *+ * @param {string} address+ * @param {string} name+ * @param {string} [type]+ * @param {string} [id]+ */addAddress(address, name, type, id) {+ if (name === '') {+ const nameHash = this.model.attributes.nameHash ?? {};++ if (address in nameHash) {+ name = nameHash[address];+ }+ }++ if (type === undefined) {+ const typeHash = this.model.attributes.typeHash ?? {};++ if (address in typeHash) {+ type = typeHash[address];+ }+ }++ if (id === undefined) {+ const idHash = this.model.attributes.idHash ?? {};++ if (address in idHash) {+ id = idHash[address];+ }+ }+if (this.justAddedAddress) {this.deleteAddress(this.justAddedAddress);}