From 6aba352e0da95fcbae04ee87cfaf77a10b4b02f7 Mon Sep 17 00:00:00 2001 From: Fayaz Ahmed <15716057+fayazara@users.noreply.github.com> Date: Thu, 10 Nov 2022 20:09:33 +0530 Subject: [PATCH] fix: Single select for agents and teams in Macros actions (#5837) * Ignore settings.json * Single select dropdown for teams and agents --- .gitignore | 2 ++ .../routes/dashboard/settings/macros/MacroEditor.vue | 2 +- .../dashboard/routes/dashboard/settings/macros/constants.js | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 11a8c50e3..fc77a7b55 100644 --- a/.gitignore +++ b/.gitignore @@ -60,3 +60,5 @@ test/cypress/videos/* /config/master.key /config/*.enc + +.vscode/settings.json diff --git a/app/javascript/dashboard/routes/dashboard/settings/macros/MacroEditor.vue b/app/javascript/dashboard/routes/dashboard/settings/macros/MacroEditor.vue index 2a83f9175..5004aec5b 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/macros/MacroEditor.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/macros/MacroEditor.vue @@ -83,7 +83,7 @@ export default { const inputType = this.macroActionTypes.find( item => item.key === action.action_name ).inputType; - if (inputType === 'multi_select') { + if (inputType === 'multi_select' || inputType === 'search_select') { actionParams = [ ...this.getDropdownValues(action.action_name, this.$store), ].filter(item => [...action.action_params].includes(item.id)); diff --git a/app/javascript/dashboard/routes/dashboard/settings/macros/constants.js b/app/javascript/dashboard/routes/dashboard/settings/macros/constants.js index bec7730db..212dfb052 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/macros/constants.js +++ b/app/javascript/dashboard/routes/dashboard/settings/macros/constants.js @@ -2,12 +2,12 @@ export const MACRO_ACTION_TYPES = [ { key: 'assign_team', label: 'Assign a team', - inputType: 'multi_select', + inputType: 'search_select', }, { key: 'assign_best_agent', label: 'Assign an agent', - inputType: 'multi_select', + inputType: 'search_select', }, { key: 'add_label',