feat: Ability to delete a contact (#2984)
This change allows the administrator user to delete a contact and its related data like conversations, contact inboxes, and reports. Fixes #1929
This commit is contained in:
parent
0c24df96a8
commit
4f51a46c2b
22 changed files with 387 additions and 32 deletions
|
@ -19,6 +19,7 @@ class ActionCableConnector extends BaseActionCableConnector {
|
|||
'conversation.typing_off': this.onTypingOff,
|
||||
'conversation.contact_changed': this.onConversationContactChange,
|
||||
'presence.update': this.onPresenceUpdate,
|
||||
'contact.deleted': this.onContactDelete,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -115,6 +116,14 @@ class ActionCableConnector extends BaseActionCableConnector {
|
|||
fetchConversationStats = () => {
|
||||
bus.$emit('fetch_conversation_stats');
|
||||
};
|
||||
|
||||
onContactDelete = data => {
|
||||
this.app.$store.dispatch(
|
||||
'contacts/deleteContactThroughConversations',
|
||||
data.id
|
||||
);
|
||||
this.fetchConversationStats();
|
||||
};
|
||||
}
|
||||
|
||||
export default {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue