From 168eccbdf14cbed2cbe2a81dedae7fe1057318d4 Mon Sep 17 00:00:00 2001 From: wjh Date: Mon, 22 Jul 2024 13:47:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=E7=AB=AF=E9=87=8D=E6=96=B0=E6=8F=90=E4=BA=A4=E5=90=8E=E8=A1=A8?= =?UTF-8?q?=E5=8D=95=E7=8A=B6=E6=80=81=20(#1357)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-on: https://git.daoyoucloud.com/daoyoucloud/tachybase/pulls/1357 Co-authored-by: wjh Co-committed-by: wjh --- .../client/approval/initiations/hook/useFormBlockProps.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/initiations/hook/useFormBlockProps.tsx b/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/initiations/hook/useFormBlockProps.tsx index 14f636355..8b6ec6df7 100644 --- a/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/initiations/hook/useFormBlockProps.tsx +++ b/packages/plugins/@hera/plugin-approval-mobile/src/client/approval/initiations/hook/useFormBlockProps.tsx @@ -5,17 +5,22 @@ import { useForm } from '@tachybase/schema'; import { ApprovalStatusEnums } from '../../constants'; import { useContextApprovalExecution } from '../../context/ApprovalExecution'; +import { useResubmit } from '../provider/Resubmit.provider'; export function useFormBlockProps() { const { approval, id } = useContextApprovalExecution(); const { workflow } = approval; const form = useForm(); const { data } = useCurrentUserContext(); + const { isResubmit } = useResubmit(); const { editable } = ApprovalStatusEnums.find((value) => value.value === approval.status); const needEditable = - editable && approval?.latestExecutionId === id && approval?.createdById === data?.data.id && workflow.enabled; + (isResubmit || editable) && + approval?.latestExecutionId === id && + approval?.createdById === data?.data.id && + workflow.enabled; useEffect(() => { if (!approval) {