diff --git a/source/components/Results.js b/source/components/Results.js
index b66b82964..fe00076b2 100644
--- a/source/components/Results.js
+++ b/source/components/Results.js
@@ -15,8 +15,8 @@ let humanFigure = decimalDigits => value => fmt(value.toFixed(decimalDigits))
export default class Results extends Component {
render() {
let {analysedSituation, pointedOutObjectives} = this.props
- // On travaille sur un objectif qui est une somme de plusieurs variables, et c'est ces variables que nous affichons comme résultats
+ // On travaille sur un objectif qui est une somme de plusieurs variables, et c'est ces variables que nous affichons comme résultats
let explanation = R.path(['formule', 'explanation', 'explanation'])(analysedSituation)
if (!explanation) return null
@@ -28,12 +28,12 @@ export default class Results extends Component {
{explanation.map(
- ({explanation: {name, type, 'non applicable si': {nodeValue: nonApplicable}, formule: {nodeValue: computedValue}}}) =>
+ ({variableName, explanation: {name, type, 'non applicable si': {nodeValue: nonApplicable}, formule: {nodeValue: computedValue}}}) =>
do {
let
unsatisfied = nonApplicable == null || computedValue == null,
irrelevant = nonApplicable === true,
- pointedOut = pointedOutObjectives.find(objective => objective == name),
+ pointedOut = pointedOutObjectives.find(objective => objective == variableName),
number = nonApplicable == false && computedValue != null
;-
diff --git a/source/engine/rules.js b/source/engine/rules.js
index 22a0eff12..7f4277610 100644
--- a/source/engine/rules.js
+++ b/source/engine/rules.js
@@ -135,7 +135,7 @@ export let collectMissingVariables = (groupMethod='groupByMissingVariable', anal
R.pipe(
collectNodeMissingVariables('missingVariables'),
R.flatten,
- R.map(mv => [v.name, mv])
+ R.map(mv => [v.variableName, mv])
)(v)
),
//groupBy missing variable but remove mv from value, it's now in the key
diff --git a/source/reducers.js b/source/reducers.js
index be2dac386..ba68fbe1c 100644
--- a/source/reducers.js
+++ b/source/reducers.js
@@ -99,7 +99,9 @@ export default reduceReducers(
missingVariables: {variable: [objectives]}
*/
- missingVariables = collectMissingVariables('groupByMissingVariable', analysedSituation),
+
+ missingVariables = collectMissingVariables('groupByMissingVariable', R.path(['formule', 'explanation', 'explanation'])(analysedSituation)),
+
missingVariablesList = R.keys(missingVariables),
/*
Certaines variables manquantes peuvent être factorisées dans des groupes.