tachybase_todo/packages/plugins/workflow/src/client/nodes/delay.tsx
Junyi 37998d03ad
refactor(plugin-workflow): change canvas card and adjust styles (#1529)
* refactor(plugin-workflow): optimize workflow canvas

* feat(plugin-workflow): allow click on node card to open config and adjust styles

* fix(plugin-workflow): fix collection trigger linkages
2023-03-04 00:19:11 +08:00

42 lines
1.0 KiB
TypeScript

import Duration from "../components/Duration";
import { JOB_STATUS } from "../constants";
import { NAMESPACE } from "../locale";
export default {
title: `{{t("Delay", { ns: "${NAMESPACE}" })}}`,
type: 'delay',
group: 'control',
fieldset: {
duration: {
type: 'number',
title: `{{t("Duration", { ns: "${NAMESPACE}" })}}`,
'x-decorator': 'FormItem',
'x-component': 'Duration',
default: 60000,
required: true
},
endStatus: {
type: 'number',
title: `{{t("End Status", { ns: "${NAMESPACE}" })}}`,
'x-decorator': 'FormItem',
'x-component': 'Select',
'x-component-props': {
placeholder: `{{t("Select status", { ns: "${NAMESPACE}" })}}`,
},
enum: [
{ label: `{{t("Succeed and continue", { ns: "${NAMESPACE}" })}}`, value: JOB_STATUS.RESOLVED },
{ label: `{{t("Fail and exit", { ns: "${NAMESPACE}" })}}`, value: JOB_STATUS.FAILED },
],
required: true
}
},
view: {
},
scope: {
},
components: {
Duration
}
};