From ef66b727c84b3728c6ea44b19608275b645a9642 Mon Sep 17 00:00:00 2001 From: Laurent Bossavit Date: Mon, 17 Jul 2017 14:02:07 +0200 Subject: [PATCH] =?UTF-8?q?:bug:=20R=C3=A9pare=20l'affichage=20des=20r?= =?UTF-8?q?=C3=A9sultats?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/components/Results.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/components/Results.js b/source/components/Results.js index 1dc4bc736..6e00e3414 100644 --- a/source/components/Results.js +++ b/source/components/Results.js @@ -4,6 +4,7 @@ import classNames from 'classnames' import {Link} from 'react-router-dom' import {connect} from 'react-redux' import { withRouter } from 'react-router' +import {formValueSelector} from 'redux-form' import './Results.css' import {capitalise0} from '../utils' @@ -20,7 +21,8 @@ let humanFigure = decimalDigits => value => fmt(value.toFixed(decimalDigits)) pointedOutObjectives: state.pointedOutObjectives, analysedSituation: state.analysedSituation, conversationStarted: !R.isEmpty(state.form), - conversationFirstAnswer: R.path(['form', 'conversation', 'values'])(state) + conversationFirstAnswer: R.path(['form', 'conversation', 'values'])(state), + situationGate: (name => formValueSelector('conversation')(state, name)) }) ) export default class Results extends Component { @@ -30,9 +32,10 @@ export default class Results extends Component { pointedOutObjectives, conversationStarted, conversationFirstAnswer: showResults, + situationGate, location } = this.props, - explanation = getObjectives(name => null, analysedSituation.root, analysedSituation.parsedRules) + explanation = getObjectives(situationGate, analysedSituation.root, analysedSituation.parsedRules) if (!explanation) return null