From 5ed906d44c07ba6a7dcabbd8a75dcf6e3a4b6bc2 Mon Sep 17 00:00:00 2001 From: dlohvinov Date: Fri, 24 Feb 2023 17:20:58 +0200 Subject: [PATCH] feature: added agent filter to queue logs [WTEL-2861] --- .../modules/queues/modules/logs/api/queueLog.js | 3 ++- .../modules/filters/components/the-queue-logs-filters.vue | 1 + .../queues/modules/logs/modules/filters/store/filters.js | 7 +++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/modules/contact-center/modules/queues/modules/logs/api/queueLog.js b/src/modules/contact-center/modules/queues/modules/logs/api/queueLog.js index 4232f0096..b1b9ead50 100644 --- a/src/modules/contact-center/modules/queues/modules/logs/api/queueLog.js +++ b/src/modules/contact-center/modules/queues/modules/logs/api/queueLog.js @@ -15,6 +15,7 @@ const _getQueueLogs = (getList) => function({ joinedAtFrom, joinedAtTo, result, + agent, leavingAtFrom, leavingAtTo, offeringAtFrom, @@ -25,7 +26,7 @@ const _getQueueLogs = (getList) => function({ // parent id == queue id const params = [ page, size, search, sort, fields, joinedAtFrom, joinedAtTo, undefined, - parentId, undefined, undefined, undefined, result, leavingAtFrom, + parentId, undefined, undefined, agent, result, leavingAtFrom, leavingAtTo, offeringAtFrom, offeringAtTo, durationFrom, durationTo, ]; return getList(params); diff --git a/src/modules/contact-center/modules/queues/modules/logs/modules/filters/components/the-queue-logs-filters.vue b/src/modules/contact-center/modules/queues/modules/logs/modules/filters/components/the-queue-logs-filters.vue index 9d647f4db..857682316 100644 --- a/src/modules/contact-center/modules/queues/modules/logs/modules/filters/components/the-queue-logs-filters.vue +++ b/src/modules/contact-center/modules/queues/modules/logs/modules/filters/components/the-queue-logs-filters.vue @@ -50,6 +50,7 @@ export default { data: () => ({ filters: [ { type: 'enum', filterQuery: 'result' }, + { type: 'api', filterQuery: 'agent' }, ], }), methods: { diff --git a/src/modules/contact-center/modules/queues/modules/logs/modules/filters/store/filters.js b/src/modules/contact-center/modules/queues/modules/logs/modules/filters/store/filters.js index 8c0d803f8..f196075f9 100644 --- a/src/modules/contact-center/modules/queues/modules/logs/modules/filters/store/filters.js +++ b/src/modules/contact-center/modules/queues/modules/logs/modules/filters/store/filters.js @@ -1,3 +1,5 @@ +import ApiFilterSchema + from '@webitel/ui-sdk/src/modules/QueryFilters/classes/ApiFilterSchema'; import BaseFilterSchema from '@webitel/ui-sdk/src/modules/QueryFilters/classes/BaseFilterSchema'; import EnumFilterSchema @@ -5,6 +7,7 @@ import EnumFilterSchema import QueryFiltersStoreModule from '@webitel/ui-sdk/src/modules/QueryFilters/store/QueryFiltersStoreModule'; import { CallReportingStatus } from 'webitel-sdk'; +import AgentsAPI from '../../../../../../agents/api/agents'; const state = { search: new BaseFilterSchema(), @@ -24,6 +27,10 @@ const state = { })), locale: { label: 'objects.ccenter.queues.logs.result' }, }), + agent: new ApiFilterSchema({ + API: AgentsAPI.getLookup, + locale: { label: ['objects.ccenter.agents.agents', 1] }, + }), duration: new BaseFilterSchema({ value: { from: 0, to: undefined }, defaultValue: { from: 0, to: undefined },