You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by zi...@apache.org on 2022/08/25 03:54:03 UTC

[inlong] 02/02: [INLONG-5685][Dashboard] Fix the error of setting approvers params (#5686)

This is an automated email from the ASF dual-hosted git repository.

zirui pushed a commit to branch release-1.3.0
in repository https://gitbox.apache.org/repos/asf/inlong.git

commit 323d4a31d70a1ab5537335c37303dc0f81a1260a
Author: Daniel <le...@apache.org>
AuthorDate: Thu Aug 25 11:18:11 2022 +0800

    [INLONG-5685][Dashboard] Fix the error of setting approvers params (#5686)
---
 inlong-dashboard/src/pages/ProcessManagement/DetailModal.tsx | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/inlong-dashboard/src/pages/ProcessManagement/DetailModal.tsx b/inlong-dashboard/src/pages/ProcessManagement/DetailModal.tsx
index 757bcf3fd..0cc176f34 100644
--- a/inlong-dashboard/src/pages/ProcessManagement/DetailModal.tsx
+++ b/inlong-dashboard/src/pages/ProcessManagement/DetailModal.tsx
@@ -59,6 +59,10 @@ const Comp: React.FC<Props> = ({ id, ...modalProps }) => {
     }),
     {
       manual: true,
+      formatResult: result => ({
+        ...result,
+        approvers: result.approvers?.split(','),
+      }),
       onSuccess: result => {
         form.setFieldsValue(result);
       },
@@ -72,11 +76,13 @@ const Comp: React.FC<Props> = ({ id, ...modalProps }) => {
       values.id = id;
       values.version = savedData?.version;
     }
-    console.log(values, 'values');
     await request({
       url: isUpdate ? '/workflow/approver/update' : '/workflow/approver/save',
       method: 'POST',
-      data: values,
+      data: {
+        ...values,
+        approvers: values.approvers?.join(','),
+      },
     });
     await modalProps?.onOk(values);
     message.success(i18n.t('basic.OperatingSuccess'));