From 88b66464c6656325395491e5d49b1501ac73e3d9 Mon Sep 17 00:00:00 2001 From: Hans-Peter Herzog Date: Thu, 8 Oct 2020 08:58:42 +0200 Subject: [PATCH] TT#96500 Fix date range filter for Conversations Change-Id: I6f6442bcd76f2d4e8ab293646cd8bfadd30130eb --- src/api/conversations.js | 8 ++ src/components/CscPageStickyTabs.vue | 2 +- src/components/form/CscInputDate.vue | 47 ++++++++ .../Conversations/CscConversationsFilter.vue | 66 ++++++++++ .../pages/Conversations/CscFaxItem.vue | 1 - .../pages/Conversations/CscVoiceMailItem.vue | 2 - src/pages/CscPageConversations.vue | 113 ++++++++---------- src/store/conversations/actions.js | 9 +- 8 files changed, 181 insertions(+), 67 deletions(-) create mode 100644 src/components/form/CscInputDate.vue create mode 100644 src/components/pages/Conversations/CscConversationsFilter.vue diff --git a/src/api/conversations.js b/src/api/conversations.js index 24cc8b92..bf00dd54 100644 --- a/src/api/conversations.js +++ b/src/api/conversations.js @@ -15,6 +15,8 @@ import { export function getConversations (options) { return new Promise((resolve, reject) => { const type = _.get(options, 'type', null) + const from = _.get(options, 'from', '') + const to = _.get(options, 'to', '') const params = { subscriber_id: _.get(options, 'subscriberId'), order_by: _.get(options, 'order_by', 'timestamp'), @@ -27,6 +29,12 @@ export function getConversations (options) { if (type !== null) { params.type = type } + if (from !== '') { + params.from = from + } + if (to !== '') { + params.to = to + } getList({ path: 'api/conversations/', root: '_embedded.ngcp:conversations', diff --git a/src/components/CscPageStickyTabs.vue b/src/components/CscPageStickyTabs.vue index 56d8ac60..d4995af6 100644 --- a/src/components/CscPageStickyTabs.vue +++ b/src/components/CscPageStickyTabs.vue @@ -32,7 +32,7 @@ diff --git a/src/components/pages/Conversations/CscConversationsFilter.vue b/src/components/pages/Conversations/CscConversationsFilter.vue new file mode 100644 index 00000000..bddb6e86 --- /dev/null +++ b/src/components/pages/Conversations/CscConversationsFilter.vue @@ -0,0 +1,66 @@ + + + diff --git a/src/components/pages/Conversations/CscFaxItem.vue b/src/components/pages/Conversations/CscFaxItem.vue index b64a78ee..069d2a54 100644 --- a/src/components/pages/Conversations/CscFaxItem.vue +++ b/src/components/pages/Conversations/CscFaxItem.vue @@ -97,7 +97,6 @@ export default { this.$emit('download-fax', this.fax) }, startCall () { - this.$refs.callPopover.close() this.$emit('start-call', this.fax.caller) } } diff --git a/src/components/pages/Conversations/CscVoiceMailItem.vue b/src/components/pages/Conversations/CscVoiceMailItem.vue index a3978343..7d4cddac 100644 --- a/src/components/pages/Conversations/CscVoiceMailItem.vue +++ b/src/components/pages/Conversations/CscVoiceMailItem.vue @@ -165,7 +165,6 @@ export default { this.$refs.voicemailPlayer.setPausedFalse() }, startCall () { - this.$refs.callPopover.close() this.$emit('start-call', this.voiceMail.callee) }, toggleBlockIncoming () { @@ -178,7 +177,6 @@ export default { this.$emit('toggle-block-both') }, deleteVoicemail (voiceMail) { - this.$refs.callPopover.close() this.$emit('delete-voicemail', voiceMail) } } diff --git a/src/pages/CscPageConversations.vue b/src/pages/CscPageConversations.vue index debf11ef..415e9d7c 100644 --- a/src/pages/CscPageConversations.vue +++ b/src/pages/CscPageConversations.vue @@ -1,34 +1,32 @@ + - +