Skip to content

Commit a91ebd7

Browse files
authored
fix(core): fix you can add isPastToday in valid WF (#70)
fix you can add Valid WF GH-68
1 parent 6a4dad7 commit a91ebd7

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

projects/workflows-creator/src/lib/builder/builder.component.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import {AbstractBaseGroup} from '../classes/nodes';
2323
import {BuilderService, ElementService, NodeService} from '../classes/services';
2424
import {
2525
ActionTypes,
26+
ConditionTypes,
2627
EventTypes,
2728
LocalizedStringKeys,
2829
NodeTypes,
@@ -459,8 +460,16 @@ export class BuilderComponent<E> implements OnInit, OnChanges {
459460
case EventTypes.OnValueEvent:
460461
case ActionTypes.ChangeColumnValueAction:
461462
const columnExists = !!node.node.state.get('column');
462-
const valueExists =
463-
typeof node.node.state.get('value') !== 'undefined';
463+
let valueExists = false;
464+
if (typeof node.node.state.get('value') !== 'undefined') {
465+
valueExists = true;
466+
} else if (
467+
node.node.state.get('condition') === ConditionTypes.PastToday
468+
) {
469+
valueExists = true;
470+
} else {
471+
valueExists = !!node.node.state.get('value');
472+
}
464473
const valueTypeIsAnyValue =
465474
node.node.state.get('valueType') === ValueTypes.AnyValue;
466475
isValid = columnExists && (valueExists || valueTypeIsAnyValue);

projects/workflows-element/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@
1717
"access": "public",
1818
"directory": "dist"
1919
},
20-
"hash": "e633c5b62116521580e1a5d3b744b4c25c8f4b74c6b54d008cb5a5a601dd1d92"
20+
"hash": "52e16f7339ae099b920d5eba85c8551b9ac2178d0fdb8c34eb6eb6de8aa96685"
21+
2122
}

0 commit comments

Comments
 (0)