diff --git a/source/components/TargetSelection.css b/source/components/TargetSelection.css index b3eabaa00..1fd9e5010 100644 --- a/source/components/TargetSelection.css +++ b/source/components/TargetSelection.css @@ -84,10 +84,10 @@ text-align: right; } -#targetSelection .targetValue { +#targetSelection .editable { border-bottom: 1px dashed #ffffff91} -#targetSelection .targetValue.attractClick, +#targetSelection .attractClick, #targetSelection input[type='text'] { width: 5em !important; display: inline-block; diff --git a/source/components/TargetSelection.js b/source/components/TargetSelection.js index 2205b9eeb..4bbd5078c 100644 --- a/source/components/TargetSelection.js +++ b/source/components/TargetSelection.js @@ -49,11 +49,11 @@ export default class TargetSelection extends Component { } render() { - let firstEstimationComplete = + this.firstEstimationComplete = this.state.activeInput && this.props.targets.length > 0 return (
- {!firstEstimationComplete &&

Entrez un salaire mensuel

} + {!this.firstEstimationComplete &&

Entrez un salaire mensuel

}
- {firstEstimationComplete && ( + {this.firstEstimationComplete && (
{this.props.selectingTargets ? ( !this.props.conversationVisible && ( @@ -158,14 +158,12 @@ export default class TargetSelection extends Component { {s.title || s.name} - {s.name.includes('salaire') && - this.state.activeInput === s.dottedName ? ( + {this.state.activeInput === s.dottedName ? ( <> {this.props.targets.length > 0 && ( @@ -178,16 +176,14 @@ export default class TargetSelection extends Component { ) : ( <> { - // this.props.setConversationTargets( - // reject(equals(s.name), popularTargetNames) - // ) - - this.setState({ activeInput: s.dottedName }) + s.question && + this.setState({ activeInput: s.dottedName }) }} > {do { @@ -206,6 +202,9 @@ export default class TargetSelection extends Component { )} + {(this.firstEstimationComplete || s.question) && ( + + )}

{s['résumé']}

diff --git a/source/components/rule/RuleValueVignette.js b/source/components/rule/RuleValueVignette.js index 76c80d8a4..206660270 100644 --- a/source/components/rule/RuleValueVignette.js +++ b/source/components/rule/RuleValueVignette.js @@ -25,9 +25,7 @@ export let RuleValue = ({ value }) => irrelevant = value == 0 let [className, text] = irrelevant ? ['irrelevant', '0'] - : unsatisfied - ? ['unsatisfied', ''] - : ['figure', humanFigure(0)(value) + ' €'] + : unsatisfied ? ['unsatisfied', ''] : ['figure', humanFigure(0)(value)] ;