feat: enable conversation deletion

This commit is contained in:
Sojan Jose
2025-06-04 17:17:40 -05:00
parent ee293c3598
commit 9ae94d3e50
11 changed files with 62 additions and 1 deletions
@@ -45,6 +45,7 @@ export default {
'assignAgent',
'assignTeam',
'assignLabel',
'deleteConversation',
],
data() {
return {
@@ -121,6 +122,11 @@ export default {
icon: 'people-team-add',
label: this.$t('CONVERSATION.CARD_CONTEXT_MENU.ASSIGN_TEAM'),
},
deleteOption: {
key: 'delete',
icon: 'delete',
label: this.$t('CONVERSATION.CARD_CONTEXT_MENU.DELETE'),
},
};
},
computed: {
@@ -178,6 +184,9 @@ export default {
assignPriority(priority) {
this.$emit('assignPriority', priority);
},
deleteConversation() {
this.$emit('deleteConversation');
},
show(key) {
// If the conversation status is same as the action, then don't display the option
// i.e.: Don't show an option to resolve if the conversation is already resolved.
@@ -277,5 +286,11 @@ export default {
@click.stop="$emit('assignTeam', team)"
/>
</MenuItemWithSubmenu>
<hr class="m-1 rounded border-b border-n-weak dark:border-n-weak" />
<MenuItem
:option="deleteOption"
variant="icon"
@click.stop="deleteConversation()"
/>
</div>
</template>