Skip to content

Commit

Permalink
fix(core): incorrect condition for is past today
Browse files Browse the repository at this point in the history
  • Loading branch information
maninder-pal-singh committed May 23, 2023
1 parent d5beb73 commit 1b517c4
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {AbstractBaseGroup} from '../classes/nodes';
import {BuilderService, ElementService, NodeService} from '../classes/services';
import {
ActionTypes,
ConditionTypes,
EventTypes,
LocalizedStringKeys,
NodeTypes,
Expand Down Expand Up @@ -458,7 +459,10 @@ export class BuilderComponent<E> implements OnInit, OnChanges {
case EventTypes.OnValueEvent:
case ActionTypes.ChangeColumnValueAction:
const columnExists = !!node.node.state.get('column');
const valueExists = !!node.node.state.get('value');
const valueExists =
node.node.state.get('condition') === ConditionTypes.PastToday
? true
: !!node.node.state.get('value');
const valueTypeIsAnyValue =
node.node.state.get('valueType') === ValueTypes.AnyValue;
isValid = columnExists && (valueExists || valueTypeIsAnyValue);
Expand Down

0 comments on commit 1b517c4

Please sign in to comment.