feat(client): add appropriation node and node edit drawer

This commit is contained in:
2025-07-09 16:17:49 +05:00
parent 443293d420
commit 943f4ded2d
9 changed files with 456 additions and 178 deletions

View File

@@ -0,0 +1,56 @@
import { Handle, Node, NodeProps, Position } from "@xyflow/react";
import DEFAULT_HANDLE_STYLE from "./defaultHandleStyle";
type AppropriationNodeData = { value: string };
export default function AppropriationNode({
data,
}: NodeProps<Node & AppropriationNodeData>) {
return (
<div
style={{
border: "0px solid",
borderRadius: 8,
backgroundColor: "white",
width: "248px",
}}
>
<div
style={{
display: "flex",
alignItems: "center",
paddingLeft: "12px",
height: "48px",
fontWeight: "600px",
fontSize: "16px",
gap: "12px",
}}
>
<img
style={{ height: "24px", width: "24px" }}
src="/icons/node/calculate.svg"
alt="appropriation logo"
/>{" "}
ПРИСВОЕНИЕ
</div>
<div style={{ height: "1px", backgroundColor: "#E2E2E2" }}></div>
<div
style={{
display: "flex",
alignItems: "center",
padding: "12px",
fontSize: "14px",
minHeight: "48px",
}}
>
{data.value as string}
</div>
<Handle
style={{ ...DEFAULT_HANDLE_STYLE }}
type="target"
position={Position.Top}
id="input"
/>
</div>
);
}

View File

@@ -69,6 +69,9 @@ export default function IfElseNode({ data }: NodeProps<Node & IfElseNodeData>) {
style={{ ...DEFAULT_HANDLE_STYLE }}
/>
<Handle
onClick={() => {
console.log("click");
}}
type="source"
position={Position.Bottom}
id="false"