fix: approval, fix apply button bugs (#1271)

Reviewed-on: daoyoucloud/tachybase#1271
Co-authored-by: bai.zixv <bai.zixv@foxmail.com>
Co-committed-by: bai.zixv <bai.zixv@foxmail.com>
This commit is contained in:
bai.zixv 2024-07-04 14:51:17 +08:00 committed by sealday
parent 86cc441465
commit aec7cc918c
3 changed files with 14 additions and 0 deletions

View File

@ -43,8 +43,12 @@ export const LauncherActionConfigReSubmit = () => {
type: 'void', type: 'void',
title: restItemConfig.title, title: restItemConfig.title,
'x-decorator': 'ProviderActionResubmit', 'x-decorator': 'ProviderActionResubmit',
'x-decorator-props': {
status: action,
},
'x-component': 'Action', 'x-component': 'Action',
'x-component-props': { 'x-component-props': {
...actionProps,
confirm: { confirm: {
title: `{{t('resubmit', { ns: "${NAMESPACE}" })}}`, title: `{{t('resubmit', { ns: "${NAMESPACE}" })}}`,
content: `{{t('Are you sure you want to resubmit it?', { ns: "${NAMESPACE}" })}}`, content: `{{t('Are you sure you want to resubmit it?', { ns: "${NAMESPACE}" })}}`,
@ -53,6 +57,9 @@ export const LauncherActionConfigReSubmit = () => {
}, },
'x-designer': 'Action.Designer', 'x-designer': 'Action.Designer',
'x-action': `reSubmit`, 'x-action': `reSubmit`,
'x-action-settings': {
assignedValues: {},
},
}} }}
/> />
); );

View File

@ -15,6 +15,7 @@ import { Button, Dropdown } from 'antd';
import { useTranslation } from '../../../../locale'; import { useTranslation } from '../../../../locale';
import { FlowContextProvider } from '../../common/FlowContext.provider'; import { FlowContextProvider } from '../../common/FlowContext.provider';
import { useActionResubmit } from '../hooks/useActionResubmit';
import { useSubmit } from './hooks/useSubmit'; import { useSubmit } from './hooks/useSubmit';
import { useWithdrawAction } from './hooks/useWithdrawAction'; import { useWithdrawAction } from './hooks/useWithdrawAction';
import { ActionBarProvider } from './Pd.ActionBar'; import { ActionBarProvider } from './Pd.ActionBar';
@ -117,6 +118,7 @@ export const ApplyButton = () => {
scope={{ scope={{
useSubmit: useSubmit, useSubmit: useSubmit,
useWithdrawAction, useWithdrawAction,
useActionResubmit,
}} }}
/> />
</SchemaComponentContext.Provider> </SchemaComponentContext.Provider>

View File

@ -0,0 +1,5 @@
export function useActionResubmit() {
return {
run() {},
};
}