feat(ui): WorkflowNew page

This commit is contained in:
Fu Diwei
2025-01-02 20:24:16 +08:00
parent b6dd2248c8
commit c6a8f923e4
21 changed files with 415 additions and 225 deletions

View File

@@ -245,7 +245,7 @@ const WorkflowList = () => {
const handleEnabledChange = async (workflow: WorkflowModel) => {
try {
if (!workflow.enabled && !isAllNodesValidated(workflow.content!)) {
if (!workflow.enabled && (!workflow.content || !isAllNodesValidated(workflow.content))) {
messageApi.warning(t("workflow.action.enable.failed.uncompleted"));
return;
}