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

@@ -121,14 +121,14 @@ const actions = {
conversationId,
teamId,
});
dispatch('setCurrentChatTeam', response.data);
dispatch('setCurrentChatTeam', { team: response.data, conversationId });
} catch (error) {
// Handle error
}
},
setCurrentChatTeam({ commit }, team) {
commit(types.ASSIGN_TEAM, team);
setCurrentChatTeam({ commit }, { team, conversationId }) {
commit(types.ASSIGN_TEAM, { team, conversationId });
},
toggleStatus: async (

View File

@@ -68,8 +68,8 @@ export const mutations = {
Vue.set(chat.meta, 'assignee', assignee);
},
[types.ASSIGN_TEAM](_state, team) {
const [chat] = getSelectedChatConversation(_state);
[types.ASSIGN_TEAM](_state, { team, conversationId }) {
const [chat] = _state.allConversations.filter(c => c.id === conversationId);
Vue.set(chat.meta, 'team', team);
},