From 9e49680b836520c8aba569d9921ec4f34baf8db5 Mon Sep 17 00:00:00 2001 From: sealday Date: Tue, 9 Jul 2024 04:04:33 +0800 Subject: [PATCH] fix: approval submit (#1292) Co-authored-by: sealday Reviewed-on: https://git.daoyoucloud.com:8443/daoyoucloud/tachybase/pulls/1292 --- .../approval-block/launch/apply-button/hooks/useSubmit.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/approval/usage/approval-block/launch/apply-button/hooks/useSubmit.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/features/approval/usage/approval-block/launch/apply-button/hooks/useSubmit.tsx index 1b76a997d..fb92f0513 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/approval/usage/approval-block/launch/apply-button/hooks/useSubmit.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/approval/usage/approval-block/launch/apply-button/hooks/useSubmit.tsx @@ -23,7 +23,7 @@ export function useCreateSubmit() { const { workflow } = useFlowContext(); return { - async run({ approvalStatus }) { + async run(args) { try { from.submit(); field.data = field.data || {}; @@ -33,7 +33,7 @@ export function useCreateSubmit() { values: { collectionName: joinCollectionName(collection.dataSource, collection.name), data: _.omit(from.values, [collection.getPrimaryKey()]), - status: typeof approvalStatus !== 'undefined' ? approvalStatus : status, + status: typeof args?.approvalStatus !== 'undefined' ? args?.approvalStatus : status, workflowId: workflow.id, }, });