demo-contrôles
Mael 2019-02-12 17:18:46 +01:00
parent 17bee434ef
commit defcd2cecc
2 changed files with 15 additions and 2 deletions

View File

@ -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 (
<div id="targetSelection">
<QuickLinks />
<Controls controls={analysis.controls} />
<Controls
controls={chain(({ contrôles }) => contrôles, analysis.cache)}
/>
<div style={{ height: '10px' }}>
<Progress percent={progress} />
</div>

View File

@ -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