add execute result branch

This commit is contained in:
yoan
2025-01-19 17:01:02 +08:00
parent 69d4b3f93d
commit e6e964aa8c
13 changed files with 336 additions and 47 deletions

View File

@@ -90,7 +90,13 @@ const SharedNodeMenu = ({ trigger, node, disabled, branchId, branchIndex, afterU
};
const handleDeleteClick = async () => {
if (node.type === WorkflowNodeType.Branch || node.type === WorkflowNodeType.Condition) {
if (
node.type === WorkflowNodeType.Branch ||
node.type === WorkflowNodeType.Condition ||
node.type === WorkflowNodeType.ExecuteResultBranch ||
node.type === WorkflowNodeType.ExecuteSuccess ||
node.type === WorkflowNodeType.ExecuteFailure
) {
await removeBranch(branchId!, branchIndex!);
} else {
await removeNode(node.id);
@@ -148,7 +154,11 @@ const SharedNodeMenu = ({ trigger, node, disabled, branchId, branchIndex, afterU
key: "remove",
disabled: disabled || node.type === WorkflowNodeType.Start,
label:
node.type === WorkflowNodeType.Branch || node.type === WorkflowNodeType.Condition
node.type === WorkflowNodeType.Branch ||
node.type === WorkflowNodeType.Condition ||
node.type === WorkflowNodeType.ExecuteResultBranch ||
node.type === WorkflowNodeType.ExecuteSuccess ||
node.type === WorkflowNodeType.ExecuteFailure
? t("workflow_node.action.remove_branch")
: t("workflow_node.action.remove_node"),
icon: <CloseCircleOutlinedIcon />,