Feature: Improve label experience (#975)

Co-authored-by: Sojan <sojan@pepalo.com>
This commit is contained in:
Pranav Raj S
2020-06-25 21:04:03 +05:30
committed by GitHub
co-authored by Sojan
parent 8b61452d56
commit 97ad39713b
56 changed files with 1712 additions and 284 deletions
@@ -64,6 +64,12 @@ export const actions = {
});
}
},
setBulkConversationLabels({ commit }, conversations) {
commit(types.default.SET_BULK_CONVERSATION_LABELS, conversations);
},
setConversationLabel({ commit }, { id, data }) {
commit(types.default.SET_CONVERSATION_LABELS, { id, data });
},
};
export const mutations = {
@@ -76,6 +82,11 @@ export const mutations = {
[types.default.SET_CONVERSATION_LABELS]: ($state, { id, data }) => {
Vue.set($state.records, id, data);
},
[types.default.SET_BULK_CONVERSATION_LABELS]: ($state, conversations) => {
conversations.forEach(conversation => {
Vue.set($state.records, conversation.id, conversation.labels);
});
},
};
export default {