-
+
- {{
- $t('OVERVIEW_REPORTS.AGENT_CONVERSATIONS.LOADING_MESSAGE')
- }}
+
+ {{ $t('OVERVIEW_REPORTS.AGENT_CONVERSATIONS.LOADING_MESSAGE') }}
+
-
-
diff --git a/app/javascript/dashboard/store/modules/reports.js b/app/javascript/dashboard/store/modules/reports.js
index 74da87d32..4d3430daa 100644
--- a/app/javascript/dashboard/store/modules/reports.js
+++ b/app/javascript/dashboard/store/modules/reports.js
@@ -5,6 +5,7 @@ import { downloadCsvFile, generateFileName } from '../../helper/downloadHelper';
import AnalyticsHelper from '../../helper/AnalyticsHelper';
import { REPORTS_EVENTS } from '../../helper/AnalyticsHelper/events';
import { clampDataBetweenTimeline } from 'shared/helpers/ReportsDataHelper';
+import liveReports from '../../api/liveReports';
const state = {
fetchingStatus: false,
@@ -159,9 +160,10 @@ export const actions = {
commit(types.default.TOGGLE_ACCOUNT_CONVERSATION_METRIC_LOADING, false);
});
},
- fetchAgentConversationMetric({ commit }, reportObj) {
+ fetchAgentConversationMetric({ commit }) {
commit(types.default.TOGGLE_AGENT_CONVERSATION_METRIC_LOADING, true);
- Report.getConversationMetric(reportObj.type, reportObj.page)
+ liveReports
+ .getGroupedConversations({ groupBy: 'assignee_id' })
.then(agentConversationMetric => {
commit(
types.default.SET_AGENT_CONVERSATION_METRIC,
diff --git a/config/routes.rb b/config/routes.rb
index ebb3804cb..7df6d33a7 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -336,6 +336,12 @@ Rails.application.routes.draw do
get :bot_metrics
end
end
+ resources :live_reports, only: [] do
+ collection do
+ get :conversation_metrics
+ get :grouped_conversation_metrics
+ end
+ end
end
end
end