Le message "1ère estimation dispo" n'apparaît qu'une fois
parent
c773a998b5
commit
53383b33ca
|
@ -10,6 +10,13 @@ import Scroll from 'react-scroll'
|
|||
destroyOnUnmount: false
|
||||
})
|
||||
export default class Conversation extends Component {
|
||||
state = {
|
||||
nbFoldedStepsForFirstEstimation: null
|
||||
}
|
||||
componentWillReceiveProps(newProps) {
|
||||
if (newProps.done && this.state.nbFoldedStepsForFirstEstimation == null)
|
||||
this.setState({nbFoldedStepsForFirstEstimation: newProps.foldedSteps.length})
|
||||
}
|
||||
render() {
|
||||
let {
|
||||
foldedSteps,
|
||||
|
@ -44,7 +51,7 @@ export default class Conversation extends Component {
|
|||
)}
|
||||
{done && (
|
||||
<div className="tip">
|
||||
{nextSteps.length != 0 && (
|
||||
{nextSteps.length != 0 && this.state.nbFoldedStepsForFirstEstimation === foldedSteps.length && (
|
||||
<p>Votre première estimation est disponible !</p>
|
||||
)}
|
||||
{nextSteps.length != 0 && (
|
||||
|
|
|
@ -79,7 +79,7 @@ export let reduceSteps = (tracker, flatRules, answerSource) => (
|
|||
// The simulation is "over" - except we can now fill in extra questions
|
||||
// where the answers were previously given default reasonable assumptions
|
||||
nextWithoutDefaults(state, flatRules, analysis, targetNames, intermediateSituation)
|
||||
: {currentQuestion: head(nextWithDefaults), nextSteps: nextWithDefaults})
|
||||
: {currentQuestion: head(nextWithDefaults), nextSteps: nextWithDefaults, })
|
||||
}
|
||||
|
||||
if (action.type == START_CONVERSATION) {
|
||||
|
|
Loading…
Reference in New Issue