Merge remote-tracking branch 'origin/Development' into Development

This commit is contained in:
George Kalampokis 2021-10-06 18:17:47 +03:00
commit 0506f2d3a3
1 changed files with 4 additions and 3 deletions

View File

@ -69,12 +69,13 @@ export class VisibilityRulesService {
} else {
const visibilityDependencySource = visibilityRule.sourceVisibilityRules.filter(x => x.sourceControlId === sourceId);
visibilityDependencySource.forEach(x => {
const shouldBeVisible = visibilityDependencySource.reduce((isVisible, x) => {
const shouldBeHidden = value !== null && (this.parseValue(value) !== this.parseValue(x.sourceControlValue));
return this.VISIBILITY_RULE_LOGIC === 'OR'? (isVisible || !shouldBeHidden) : (isVisible && !shouldBeHidden);
// if(value !== null && )
visibilityMap.set(sourceId, !shouldBeHidden);
});
}, this.VISIBILITY_RULE_LOGIC === 'AND');
visibilityMap.set(sourceId, shouldBeVisible);
}