diff --git a/source/components/ComparativeSimulation.js b/source/components/ComparativeSimulation.js index 2eb60e7d3..9ebd8b07a 100644 --- a/source/components/ComparativeSimulation.js +++ b/source/components/ComparativeSimulation.js @@ -8,7 +8,8 @@ import ComparativeTargets from 'Components/ComparativeTargets' import './ComparativeSimulation.css' import { nextStepsSelector, - analysisWithDefaultsSelector + analysisWithDefaultsSelector, + noUserInputSelector } from 'Selectors/analyseSelectors' import simulationConfig from './simulateur-rémunération-dirigeant.yaml' import { createMarkdownDiv } from 'Engine/marked' @@ -18,7 +19,8 @@ export default compose( connect(state => ({ previousAnswers: state.conversationSteps.foldedSteps, noNextSteps: nextStepsSelector(state, simulationConfig).length == 0, - analyses: analysisWithDefaultsSelector(state, simulationConfig) + analyses: analysisWithDefaultsSelector(state, simulationConfig), + noUserInput: noUserInputSelector(state) })) )( class extends React.Component { @@ -26,7 +28,13 @@ export default compose( displayAnswers: false } render() { - let { colours, noNextSteps, previousAnswers, analyses } = this.props + let { + colours, + noNextSteps, + previousAnswers, + analyses, + noUserInput + } = this.props return (
@@ -58,7 +66,8 @@ export default compose(

Vous avez atteint l'estimation la plus précise.

)} - + +
) diff --git a/source/components/ComparativeTargets.js b/source/components/ComparativeTargets.js index 41eb19f39..caa55187f 100644 --- a/source/components/ComparativeTargets.js +++ b/source/components/ComparativeTargets.js @@ -41,10 +41,12 @@ export default compose( analyses, target, setSituationBranch, - chiffreAffaires + chiffreAffaires, + hide } = this.props + console.log(hide) return ( -
+

{target.title}

    diff --git a/source/selectors/analyseSelectors.js b/source/selectors/analyseSelectors.js index 8afb6b49a..48eb20573 100644 --- a/source/selectors/analyseSelectors.js +++ b/source/selectors/analyseSelectors.js @@ -23,7 +23,8 @@ import { isEmpty, pick, reduce, - intersection + intersection, + dissoc } from 'ramda' import { getFormValues } from 'redux-form' import { createSelector, createSelectorCreator, defaultMemoize } from 'reselect' @@ -63,7 +64,10 @@ export let situationSelector = createDeepEqualSelector( export let noUserInputSelector = createSelector( [situationSelector], - situation => !situation || isEmpty(situation) + situation => + !situation || + console.log(situation) || + isEmpty(dissoc('période', situation)) ) export let formattedSituationSelector = createSelector(