Skip to content

Commit

Permalink
fix(core): fix you can add isPastToday in valid WF (#70)
Browse files Browse the repository at this point in the history
fix you can add Valid WF

GH-68
  • Loading branch information
Deepika516 authored Feb 29, 2024
1 parent 6a4dad7 commit a91ebd7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
13 changes: 11 additions & 2 deletions projects/workflows-creator/src/lib/builder/builder.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {AbstractBaseGroup} from '../classes/nodes';
import {BuilderService, ElementService, NodeService} from '../classes/services';
import {
ActionTypes,
ConditionTypes,
EventTypes,
LocalizedStringKeys,
NodeTypes,
Expand Down Expand Up @@ -459,8 +460,16 @@ export class BuilderComponent<E> implements OnInit, OnChanges {
case EventTypes.OnValueEvent:
case ActionTypes.ChangeColumnValueAction:
const columnExists = !!node.node.state.get('column');
const valueExists =
typeof node.node.state.get('value') !== 'undefined';
let valueExists = false;
if (typeof node.node.state.get('value') !== 'undefined') {
valueExists = true;
} else if (
node.node.state.get('condition') === ConditionTypes.PastToday
) {
valueExists = true;
} else {
valueExists = !!node.node.state.get('value');
}
const valueTypeIsAnyValue =
node.node.state.get('valueType') === ValueTypes.AnyValue;
isValid = columnExists && (valueExists || valueTypeIsAnyValue);
Expand Down
3 changes: 2 additions & 1 deletion projects/workflows-element/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@
"access": "public",
"directory": "dist"
},
"hash": "e633c5b62116521580e1a5d3b744b4c25c8f4b74c6b54d008cb5a5a601dd1d92"
"hash": "52e16f7339ae099b920d5eba85c8551b9ac2178d0fdb8c34eb6eb6de8aa96685"

}

0 comments on commit a91ebd7

Please sign in to comment.