diff --git a/app/controllers/api/v1/accounts/actions/contact_merges_controller.rb b/app/controllers/api/v1/accounts/actions/contact_merges_controller.rb index 9daee7b04..ce38fd9ab 100644 --- a/app/controllers/api/v1/accounts/actions/contact_merges_controller.rb +++ b/app/controllers/api/v1/accounts/actions/contact_merges_controller.rb @@ -9,7 +9,6 @@ class Api::V1::Accounts::Actions::ContactMergesController < Api::V1::Accounts::B mergee_contact: @mergee_contact ) contact_merge_action.perform - render json: @base_contact end private diff --git a/app/javascript/dashboard/i18n/locale/en/contact.json b/app/javascript/dashboard/i18n/locale/en/contact.json index 8944def30..02f512722 100644 --- a/app/javascript/dashboard/i18n/locale/en/contact.json +++ b/app/javascript/dashboard/i18n/locale/en/contact.json @@ -343,17 +343,17 @@ "DESCRIPTION": "Merge contacts to combine two profiles into one, including all attributes and conversations. In case of conflict, the Primary contact’s attributes will take precedence.", "PRIMARY": { "TITLE": "Primary contact", - "HELP_LABEL": "To be kept" + "HELP_LABEL": "To be deleted" }, - "CHILD": { + "PARENT": { "TITLE": "Contact to merge", "PLACEHOLDER": "Search for a contact", - "HELP_LABEL": "To be deleted" + "HELP_LABEL": "To be kept" }, "SUMMARY": { "TITLE": "Summary", - "DELETE_WARNING": "Contact of %{childContactName} will be deleted.", - "ATTRIBUTE_WARNING": "Contact details of %{childContactName} will be copied to %{primaryContactName}." + "DELETE_WARNING": "Contact of %{primaryContactName} will be deleted.", + "ATTRIBUTE_WARNING": "Contact details of %{primaryContactName} will be copied to %{parentContactName}." }, "SEARCH": { "ERROR": "ERROR_MESSAGE" diff --git a/app/javascript/dashboard/modules/contact/ContactMergeModal.vue b/app/javascript/dashboard/modules/contact/ContactMergeModal.vue index 089e74d98..b513cb1fd 100644 --- a/app/javascript/dashboard/modules/contact/ContactMergeModal.vue +++ b/app/javascript/dashboard/modules/contact/ContactMergeModal.vue @@ -73,12 +73,12 @@ export default { this.isSearching = false; } }, - async onMergeContacts(childContactId) { + async onMergeContacts(parentContactId) { this.$track(CONTACTS_EVENTS.MERGED_CONTACTS); try { await this.$store.dispatch('contacts/merge', { - childId: childContactId, - parentId: this.primaryContact.id, + childId: this.primaryContact.id, + parentId: parentContactId, }); this.showAlert(this.$t('MERGE_CONTACTS.FORM.SUCCESS_MESSAGE')); this.onClose(); diff --git a/app/javascript/dashboard/modules/contact/components/MergeContact.vue b/app/javascript/dashboard/modules/contact/components/MergeContact.vue index 768033d12..30c1adb04 100644 --- a/app/javascript/dashboard/modules/contact/components/MergeContact.vue +++ b/app/javascript/dashboard/modules/contact/components/MergeContact.vue @@ -1,62 +1,29 @@ - - - - {{ $t('MERGE_CONTACTS.PRIMARY.TITLE') }} - - - - - - - - - - - - - + + - {{ $t('MERGE_CONTACTS.CHILD.TITLE') - }} - + {{ $t('MERGE_CONTACTS.FORM.CHILD_CONTACT.ERROR') }} + + + + + + + {{ $t('MERGE_CONTACTS.PRIMARY.TITLE') }} + + + + + + + + + -