Feature: Improve label experience (#975)
Co-authored-by: Sojan <sojan@pepalo.com>
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user