Recalcul de l'avancement au changement de salaire saisi

pull/209/head
Mael 2018-04-25 15:22:58 +02:00
parent 465027d99c
commit 5ec87528dc
2 changed files with 10 additions and 5 deletions

View File

@ -39,8 +39,8 @@ import { Circle } from 'rc-progress'
)
export default class TargetSelection extends Component {
render() {
let { targets, conversationStarted, colours } = this.props
this.firstEstimationComplete = this.props.activeInput && targets.length > 0
let { targets, conversationStarted, colours, activeInput } = this.props
this.firstEstimationComplete = activeInput && targets.length > 0
return (
<div id="targetSelection">
<section

View File

@ -55,12 +55,17 @@ export let reduceSteps = (tracker, flatRules, answerSource) => (
'SET_CONVERSATION_TARGETS',
STEP_ACTION,
'USER_INPUT_UPDATE',
'START_CONVERSATION'
'START_CONVERSATION',
'SET_ACTIVE_TARGET_INPUT'
].includes(action.type)
)
return state
if (path(['form', 'conversation', 'syncErrors'], state)) return state
if (
path(['form', 'conversation', 'syncErrors'], state) ||
!answerSource(state)(state.activeTargetInput)
)
return state
let targetNames = reject(
name => state.activeTargetInput && state.activeTargetInput.includes(name)
@ -100,7 +105,7 @@ export let reduceSteps = (tracker, flatRules, answerSource) => (
: state.foldedSteps
}
if (action.type == 'START_CONVERSATION')
if (['START_CONVERSATION', 'SET_ACTIVE_TARGET_INPUT'].includes(action.type))
return {
...newState,
missingVariablesByTarget: {