feat(ui): new WorkflowElements using antd

This commit is contained in:
Fu Diwei
2025-01-03 20:29:34 +08:00
parent c6a8f923e4
commit 8a16893082
43 changed files with 805 additions and 810 deletions

View File

@@ -1,28 +1,25 @@
import { type WorkflowNode, WorkflowNodeType } from "@/domain/workflow";
import DeployPanelBody from "./DeployPanelBody";
import ApplyNodeForm from "./node/ApplyNodeForm";
import DeployNodeForm from "./node/DeployNodeForm";
import NotifyNodeForm from "./node/NotifyNodeForm";
import StartNodeForm from "./node/StartNodeForm";
type PanelBodyProps = {
data: WorkflowNode;
};
const PanelBody = ({ data }: PanelBodyProps) => {
const getBody = () => {
switch (data.type) {
case WorkflowNodeType.Start:
return <StartNodeForm data={data} />;
return <StartNodeForm node={data} />;
case WorkflowNodeType.Apply:
return <ApplyNodeForm data={data} />;
return <ApplyNodeForm node={data} />;
case WorkflowNodeType.Deploy:
return <DeployPanelBody data={data} />;
return <DeployNodeForm node={data} />;
case WorkflowNodeType.Notify:
return <NotifyNodeForm data={data} />;
case WorkflowNodeType.Branch:
return <div></div>;
case WorkflowNodeType.Condition:
return <div></div>;
return <NotifyNodeForm node={data} />;
default:
return <> </>;
}