sozsoft-platform/ui/src/utils/workflow/workflowConstants.ts

39 lines
907 B
TypeScript
Raw Normal View History

2026-05-22 09:40:35 +00:00
import { FiBell, FiCheck, FiGitBranch, FiPlay, FiSlash } from "react-icons/fi";
export const kindOptions = [
{ value: "Start", label: "Başlat" },
{ value: "Compare", label: "Karşılaştırma" },
{ value: "Approval", label: "Onaylanacak kişi" },
{ value: "Inform", label: "Bilgilendirme" },
{ value: "End", label: "Akışı bitir" },
];
export const operatorOptions = [">", ">=", "<", "<=", "=", "!="].map(
(value) => ({
value,
label: value,
}),
);
export const columnOptions = ["Tutar", "Id"].map((value) => ({
value,
label: value,
}));
export const kindIcon = {
Start: FiPlay as any,
Compare: FiGitBranch as any,
Approval: FiCheck as any,
Inform: FiBell as any,
End: FiSlash as any,
};
export const nodeSize = {
width: 176,
height: 128,
};
export function getNodeHeight(item: { kind: string }) {
return item?.kind === "Compare" ? 158 : nodeSize.height;
}