sozsoft-platform/ui/src/utils/workflow/workflowConstants.ts
2026-08-17 08:56:52 +03:00

31 lines
863 B
TypeScript

import { FiBell, FiCheck, FiGitBranch, FiPlay, FiSlash } from 'react-icons/fi'
export const kindOptions = [
{ value: 'Start', label: 'App.WorkflowKind.Start' },
{ value: 'Compare', label: 'App.WorkflowKind.Compare' },
{ value: 'Approval', label: 'App.WorkflowKind.Approval' },
{ value: 'Inform', label: 'App.WorkflowKind.Inform' },
{ value: 'End', label: 'App.WorkflowKind.End' },
]
export const operatorOptions = ['>', '>=', '<', '<=', '=', '!='].map((value) => ({
value,
label: value,
}))
export const kindIcon: Record<string, any> = {
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
}