From a3d72e6096135f1d2519997aca912eefb81f9e62 Mon Sep 17 00:00:00 2001 From: Abhishek Dixit Date: Tue, 5 Nov 2024 22:00:49 +0530 Subject: [PATCH] fix code to include multiple cc --- static/js/Workflow.js | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/static/js/Workflow.js b/static/js/Workflow.js index 383e12e..b5a223a 100644 --- a/static/js/Workflow.js +++ b/static/js/Workflow.js @@ -147,11 +147,35 @@ class Workflow { } else { //add_to_cc_list.push(cc_group[counter].email); - this.carbon_copy_group.push( - { - "label": cc_group_data['label'], - "email": cc_group[counter].email - }); + let cc_list = ""; + if((cc_group[counter].email).includes(',')){ + cc_list = (cc_group[counter].email).split(","); + for (let counter = 0; counter < cc_list.length; counter++) { + this.carbon_copy_group.push( + { + "label": cc_group_data['label'], + "email": cc_list[counter] + } + ); + } + } else if((cc_group[counter].email).includes(';')){ + cc_list = (cc_group[counter].email).split(";"); + for (let counter = 0; counter < cc_list.length; counter++) { + this.carbon_copy_group.push( + { + "label": cc_group_data['label'], + "email": cc_list[counter] + } + ); + } + } else { + this.carbon_copy_group.push( + { + "label": cc_group_data['label'], + "email": cc_list[counter] + } + ); + } } } }