feat: Add assign team option to the context menu (#5153)

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
Fayaz Ahmed
2022-08-05 10:57:58 +05:30
committed by GitHub
parent 9bea84e2b5
commit fc9699d993
11 changed files with 121 additions and 23 deletions

View File

@@ -111,13 +111,11 @@ export default {
return this.currentChat.meta.team;
},
set(team) {
const conversationId = this.currentChat.id;
const teamId = team ? team.id : 0;
this.$store.dispatch('setCurrentChatTeam', team);
this.$store.dispatch('setCurrentChatTeam', { team, conversationId });
this.$store
.dispatch('assignTeam', {
conversationId: this.currentChat.id,
teamId,
})
.dispatch('assignTeam', { conversationId, teamId })
.then(() => {
this.showAlert(this.$t('CONVERSATION.CHANGE_TEAM'));
});