mirror of
https://github.com/usual2970/certimate.git
synced 2025-10-04 21:44:54 +00:00
improve condition evaluate
This commit is contained in:
@@ -57,7 +57,7 @@ const ConditionNode = ({ node, disabled, branchId, branchIndex }: ConditionNodeP
|
||||
break;
|
||||
}
|
||||
|
||||
const right: Expr = { type: "const", value: value };
|
||||
const right: Expr = { type: "const", value: value, valueType: t };
|
||||
|
||||
return {
|
||||
type: "compare",
|
||||
|
@@ -318,6 +318,7 @@ const formToExpression = (values: ConditionNodeConfigFormFieldValues): Expr => {
|
||||
const right: Expr = {
|
||||
type: "const",
|
||||
value: rightValue,
|
||||
valueType: type,
|
||||
};
|
||||
|
||||
return {
|
||||
|
@@ -238,7 +238,7 @@ export type ComparisonOperator = ">" | "<" | ">=" | "<=" | "==" | "!=" | "is";
|
||||
|
||||
export type LogicalOperator = "and" | "or" | "not";
|
||||
|
||||
export type ConstExpr = { type: "const"; value: Value };
|
||||
export type ConstExpr = { type: "const"; value: Value; valueType: WorkflowNodeIoValueType };
|
||||
export type VarExpr = { type: "var"; selector: WorkflowNodeIOValueSelector };
|
||||
export type CompareExpr = { type: "compare"; op: ComparisonOperator; left: Expr; right: Expr };
|
||||
export type LogicalExpr = { type: "logical"; op: LogicalOperator; left: Expr; right: Expr };
|
||||
|
Reference in New Issue
Block a user