feat: Reverse the contact merge (#8057)

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
Sivin Varghese
2023-10-10 08:20:48 +05:30
committed by GitHub
parent 86ca90aa15
commit b6ba0f343e
6 changed files with 87 additions and 126 deletions

View File

@@ -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();