fix: Update the relevant agent presence only (#5220)
This commit is contained in:
@@ -1,10 +1,6 @@
|
||||
/* eslint no-console: 0 */
|
||||
/* eslint no-param-reassign: 0 */
|
||||
/* eslint no-shadow: 0 */
|
||||
import * as types from '../mutation-types';
|
||||
import Report from '../../api/reports';
|
||||
import Vue from 'vue';
|
||||
|
||||
import { downloadCsvFile } from '../../helper/downloadHelper';
|
||||
|
||||
const state = {
|
||||
@@ -116,9 +112,6 @@ export const actions = {
|
||||
commit(types.default.TOGGLE_AGENT_CONVERSATION_METRIC_LOADING, false);
|
||||
});
|
||||
},
|
||||
updateReportAgentStatus({ commit }, data) {
|
||||
commit(types.default.UPDATE_REPORT_AGENTS_STATUS, data);
|
||||
},
|
||||
downloadAgentReports(_, reportObj) {
|
||||
return Report.getAgentReports(reportObj)
|
||||
.then(response => {
|
||||
@@ -179,16 +172,6 @@ const mutations = {
|
||||
[types.default.TOGGLE_AGENT_CONVERSATION_METRIC_LOADING](_state, flag) {
|
||||
_state.overview.uiFlags.isFetchingAgentConversationMetric = flag;
|
||||
},
|
||||
[types.default.UPDATE_REPORT_AGENTS_STATUS](_state, data) {
|
||||
_state.overview.agentConversationMetric.forEach((element, index) => {
|
||||
const availabilityStatus = data[element.id];
|
||||
Vue.set(
|
||||
_state.overview.agentConversationMetric[index],
|
||||
'availability',
|
||||
availabilityStatus || 'offline'
|
||||
);
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
export default {
|
||||
|
||||
Reference in New Issue
Block a user