From 757d7ed31b1dbbc898396153ef84f6be2de5ed5e Mon Sep 17 00:00:00 2001 From: nikitam Date: Wed, 10 Oct 2018 15:29:53 +0530 Subject: [PATCH] analytics-user-filter --- client/src/components/cellRender.vue | 3 ++- client/src/pages/flow/analytics.vue | 10 +++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/client/src/components/cellRender.vue b/client/src/components/cellRender.vue index af1dfff..fae020a 100644 --- a/client/src/components/cellRender.vue +++ b/client/src/components/cellRender.vue @@ -209,7 +209,8 @@ export default { this.schemainstance.entity[index]['entity'] = await this.getChildEntity(entity.type) } } - this.schemainstance.data.push(this.currentPopTipData) + // this.schemainstance.data.push(this.currentPopTipData) + this.schemainstance.data[0] = this.item.obj this.dataModal = true this.$Spin.hide() }).catch(err => { diff --git a/client/src/pages/flow/analytics.vue b/client/src/pages/flow/analytics.vue index 052c78e..41fa9bc 100644 --- a/client/src/pages/flow/analytics.vue +++ b/client/src/pages/flow/analytics.vue @@ -336,6 +336,10 @@ export default { '$search': query, $group: '_uuid' } + if (this.$store.state.role === 2) { + params._creatorid = this.$store.state.user._id + params.subscriptionId = this.$store.state.subscription + } if (sort !== undefined || sort !== null) { if (sort === 'asc') { params['$sort[' + sort + ']'] = 1 @@ -479,8 +483,8 @@ export default { $limit: this.limit, $group: '_uuid', 'subscriptionId': this.$store.state.subscription, - '_creatorId': this.$store.state.subscription, - '$sort[_createdAt]': 1 + '_creatorid': this.$store.state.user._id, + '$sort[_createdAt]': -1 } } @@ -721,7 +725,7 @@ export default { key = '_uuid' title = 'ID' } - console.log('OBJ: ', obj) + // console.log('OBJ: ', obj) cols.push({ title: title, key: key,