diff --git a/source/components/TargetSelection.js b/source/components/TargetSelection.js index 8b6d21afa..77b998503 100644 --- a/source/components/TargetSelection.js +++ b/source/components/TargetSelection.js @@ -6,7 +6,7 @@ import withColours from 'Components/utils/withColours' import withLanguage from 'Components/utils/withLanguage' import withSitePaths from 'Components/utils/withSitePaths' import { encodeRuleName, findRuleByDottedName } from 'Engine/rules' -import { compose, propEq } from 'ramda' +import { compose, propEq, chain } from 'ramda' import React, { Component } from 'react' import { withTranslation } from 'react-i18next' import { connect } from 'react-redux' @@ -64,7 +64,9 @@ export default compose( return (
- + contrôles, analysis.cache)} + />
diff --git a/source/engine/traverse.js b/source/engine/traverse.js index 89ac28923..b262bf00e 100644 --- a/source/engine/traverse.js +++ b/source/engine/traverse.js @@ -166,6 +166,17 @@ export let treatRuleRoot = (rules, rule) => { ...node, ...evaluatedAttributes, ...{ formule: evaluatedFormula }, + ...{ + contrôles: node.contrôles.map(control => ({ + ...control, + evaluated: evaluateNode( + cache, + situationGate, + parsedRules, + control.testExpression + ) + })) + }, nodeValue, isApplicable, missingVariables