From 33aacb34011fbd67586cc6089083c274d4a363f7 Mon Sep 17 00:00:00 2001 From: Fayaz Ahmed <15716057+fayazara@users.noreply.github.com> Date: Fri, 18 Nov 2022 14:44:36 +0530 Subject: [PATCH] Add team option in bulk actions (#5885) --- .../dashboard/components/ChatList.vue | 16 ++ .../conversationBulkActions/AgentSelector.vue | 7 +- .../conversationBulkActions/Index.vue | 48 ++++- .../conversationBulkActions/LabelActions.vue | 9 +- .../conversationBulkActions/TeamActions.vue | 174 ++++++++++++++++++ .../conversationBulkActions/UpdateActions.vue | 10 +- .../dashboard/i18n/locale/en/bulkActions.json | 9 + .../dashboard/mixins/bulkActionsMixin.js | 15 ++ .../mixins/specs/bulkActions.spec.js | 19 ++ 9 files changed, 287 insertions(+), 20 deletions(-) create mode 100644 app/javascript/dashboard/components/widgets/conversation/conversationBulkActions/TeamActions.vue create mode 100644 app/javascript/dashboard/mixins/bulkActionsMixin.js create mode 100644 app/javascript/dashboard/mixins/specs/bulkActions.spec.js diff --git a/app/javascript/dashboard/components/ChatList.vue b/app/javascript/dashboard/components/ChatList.vue index 16865d0dc..01192751c 100644 --- a/app/javascript/dashboard/components/ChatList.vue +++ b/app/javascript/dashboard/components/ChatList.vue @@ -102,6 +102,7 @@ @assign-agent="onAssignAgent" @update-conversations="onUpdateConversations" @assign-labels="onAssignLabels" + @assign-team="onAssignTeamsForBulk" />
-
+
+
- - - + + + + + +
{{ $t('BULK_ACTION.ALL_CONVERSATIONS_SELECTED_ALERT') }} @@ -85,11 +105,13 @@ import AgentSelector from './AgentSelector.vue'; import UpdateActions from './UpdateActions.vue'; import LabelActions from './LabelActions.vue'; +import TeamActions from './TeamActions.vue'; export default { components: { AgentSelector, UpdateActions, LabelActions, + TeamActions, }, props: { conversations: { @@ -122,6 +144,8 @@ export default { showAgentsList: false, showUpdateActions: false, showLabelActions: false, + showTeamsList: false, + popoverPositions: {}, }; }, methods: { @@ -137,6 +161,9 @@ export default { assignLabels(labels) { this.$emit('assign-labels', labels); }, + assignTeam(team) { + this.$emit('assign-team', team); + }, resolveConversations() { this.$emit('resolve-conversations'); }, @@ -149,6 +176,9 @@ export default { toggleAgentList() { this.showAgentsList = !this.showAgentsList; }, + toggleTeamsList() { + this.showTeamsList = !this.showTeamsList; + }, }, }; diff --git a/app/javascript/dashboard/components/widgets/conversation/conversationBulkActions/LabelActions.vue b/app/javascript/dashboard/components/widgets/conversation/conversationBulkActions/LabelActions.vue index b4043e5ce..f7a70e578 100644 --- a/app/javascript/dashboard/components/widgets/conversation/conversationBulkActions/LabelActions.vue +++ b/app/javascript/dashboard/components/widgets/conversation/conversationBulkActions/LabelActions.vue @@ -1,6 +1,6 @@ + + + + diff --git a/app/javascript/dashboard/components/widgets/conversation/conversationBulkActions/UpdateActions.vue b/app/javascript/dashboard/components/widgets/conversation/conversationBulkActions/UpdateActions.vue index f6bd53a9a..c9d988d3f 100644 --- a/app/javascript/dashboard/components/widgets/conversation/conversationBulkActions/UpdateActions.vue +++ b/app/javascript/dashboard/components/widgets/conversation/conversationBulkActions/UpdateActions.vue @@ -1,6 +1,6 @@