From defcd2cecc02d61471d377c502ef29eb4ff5904c Mon Sep 17 00:00:00 2001 From: Mael Date: Tue, 12 Feb 2019 17:18:46 +0100 Subject: [PATCH] 5 --- source/components/TargetSelection.js | 6 ++++-- source/engine/traverse.js | 11 +++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) 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