Feature: Availability Statuses (#874)

Co-authored-by: Pranav Raj S <pranav@thoughtwoot.com>
This commit is contained in:
Sojan Jose
2020-07-04 11:42:47 +05:30
committed by GitHub
co-authored by Pranav Raj S
parent bd87927576
commit c98907db49
35 changed files with 413 additions and 77 deletions
@@ -1,5 +1,6 @@
import Vue from 'vue';
import { getAvailableAgents } from 'widget/api/agent';
import * as MutationHelpers from 'shared/helpers/vuex/mutationHelpers';
const state = {
records: [],
@@ -27,12 +28,16 @@ export const actions = {
commit('setHasFetched', true);
}
},
updatePresence: async ({ commit }, data) => {
commit('updatePresence', data);
},
};
export const mutations = {
setAgents($state, data) {
Vue.set($state, 'records', data);
},
updatePresence: MutationHelpers.updatePresence,
setError($state, value) {
Vue.set($state.uiFlags, 'isError', value);
},