diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/approval/usage/approval-block/launch/VC.ApprovalBlockLaunchApplication.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/features/approval/usage/approval-block/launch/VC.ApprovalBlockLaunchApplication.tsx index 804ce2242..da30550f5 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/approval/usage/approval-block/launch/VC.ApprovalBlockLaunchApplication.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/approval/usage/approval-block/launch/VC.ApprovalBlockLaunchApplication.tsx @@ -14,7 +14,7 @@ import { useFieldSchema } from '@tachybase/schema'; import { Button, Col, Row } from 'antd'; import { FlowContextProvider } from '../common/FlowContext.provider'; -import { useCreateSubmit } from './apply-button/hooks/useSubmit'; +import { useSubmitCreate } from './apply-button/hooks/useSubmitCreate'; import { ActionBarProvider } from './apply-button/Pd.ActionBar'; import { ApplyActionStatusProvider } from './apply-button/Pd.ActionStatus'; import { useActionResubmit } from './hooks/useActionResubmit'; @@ -150,7 +150,7 @@ export const ApprovalBlockLaunchApplication = (props) => { WithdrawActionProvider, }} scope={{ - useSubmit: useCreateSubmit, + useSubmit: useSubmitCreate, useWithdrawAction, useActionResubmit, }} diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/approval/usage/approval-block/launch/VC.ViewActionLaunchContent.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/features/approval/usage/approval-block/launch/VC.ViewActionLaunchContent.tsx index 681504c43..621436488 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/approval/usage/approval-block/launch/VC.ViewActionLaunchContent.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/approval/usage/approval-block/launch/VC.ViewActionLaunchContent.tsx @@ -25,7 +25,7 @@ import { ProviderActionResubmit } from './ActionResubmit.provider'; import { useActionResubmit } from './hooks/useActionResubmit'; import { useDestroyAction } from './hooks/useDestroyAction'; import { useFormBlockProps } from './hooks/useFormBlockProps'; -import { useSubmit } from './hooks/useSubmit'; +import { useSubmitUpdate } from './hooks/useSubmitUpdate'; import { useWithdrawAction } from './hooks/useWithdrawAction'; import { ActionBarProvider } from './Pd.ActionBar'; import { ApplyActionStatusProvider } from './Pd.ApplyActionStatus'; @@ -101,7 +101,7 @@ export const ViewActionLaunchContent = () => { }} scope={{ useForm, - useSubmit, + useSubmit: useSubmitUpdate, useFormBlockProps, useDetailsBlockProps: useFormBlockContext, useWithdrawAction, diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/approval/usage/approval-block/launch/apply-button/VC.ApplyButton.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/features/approval/usage/approval-block/launch/apply-button/VC.ApplyButton.tsx index 342ad6e6a..c60ad890c 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/approval/usage/approval-block/launch/apply-button/VC.ApplyButton.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/approval/usage/approval-block/launch/apply-button/VC.ApplyButton.tsx @@ -16,7 +16,7 @@ import { Button, Dropdown } from 'antd'; import { useTranslation } from '../../../../locale'; import { FlowContextProvider } from '../../common/FlowContext.provider'; import { useActionResubmit } from '../hooks/useActionResubmit'; -import { useCreateSubmit } from './hooks/useSubmit'; +import { useSubmitCreate } from './hooks/useSubmitCreate'; import { useWithdrawAction } from './hooks/useWithdrawAction'; import { ActionBarProvider } from './Pd.ActionBar'; import { ApplyActionStatusProvider } from './Pd.ActionStatus'; @@ -117,7 +117,7 @@ export const ApplyButton = () => { WithdrawActionProvider, }} scope={{ - useSubmit: useCreateSubmit, + useSubmit: useSubmitCreate, useWithdrawAction, useActionResubmit, }} 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/useSubmitCreate.tsx similarity index 97% rename from packages/plugins/@tachybase/plugin-workflow/src/client/features/approval/usage/approval-block/launch/apply-button/hooks/useSubmit.tsx rename to packages/plugins/@tachybase/plugin-workflow/src/client/features/approval/usage/approval-block/launch/apply-button/hooks/useSubmitCreate.tsx index 2d31ef109..47d477374 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/useSubmitCreate.tsx @@ -12,7 +12,7 @@ import _ from 'lodash'; import { useFlowContext } from '../../../../../../../FlowContext'; import { useContextApprovalStatus } from '../Pd.ActionStatus'; -export function useCreateSubmit() { +export function useSubmitCreate() { const from = useForm(); const field = useField(); const { setVisible } = useActionContext(); diff --git a/packages/plugins/@tachybase/plugin-workflow/src/client/features/approval/usage/approval-block/launch/hooks/useSubmit.tsx b/packages/plugins/@tachybase/plugin-workflow/src/client/features/approval/usage/approval-block/launch/hooks/useSubmitUpdate.tsx similarity index 91% rename from packages/plugins/@tachybase/plugin-workflow/src/client/features/approval/usage/approval-block/launch/hooks/useSubmit.tsx rename to packages/plugins/@tachybase/plugin-workflow/src/client/features/approval/usage/approval-block/launch/hooks/useSubmitUpdate.tsx index 207376c1f..7d8719151 100644 --- a/packages/plugins/@tachybase/plugin-workflow/src/client/features/approval/usage/approval-block/launch/hooks/useSubmit.tsx +++ b/packages/plugins/@tachybase/plugin-workflow/src/client/features/approval/usage/approval-block/launch/hooks/useSubmitUpdate.tsx @@ -7,14 +7,14 @@ import { useFlowContext } from '../../../../../../FlowContext'; import { useApproval } from '../../../approval-common/ApprovalData.provider'; import { useResubmit } from '../../../approval-common/Resubmit.provider'; import { useHandleRefresh } from '../../common/useHandleRefresh'; -import { useCreateSubmit } from '../apply-button/hooks/useSubmit'; +import { useSubmitCreate } from '../apply-button/hooks/useSubmitCreate'; import { useContextApprovalStatus } from '../Pd.ApplyActionStatus'; -export function useSubmit() { +export function useSubmitUpdate() { const { refreshTable } = useHandleRefresh(); const apiClient = useAPIClient(); const { isResubmit } = useResubmit(); - const { run: create } = useCreateSubmit(); + const { run: create } = useSubmitCreate(); const status = useContextApprovalStatus(); const form = useForm();