Affichage de l'unite euros sur tous les champs

pull/206/head
Mael 2018-03-19 15:42:41 +01:00 committed by Laurent Bossavit
parent 2446622cca
commit 855c379d72
3 changed files with 14 additions and 17 deletions

View File

@ -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;

View File

@ -49,11 +49,11 @@ export default class TargetSelection extends Component {
}
render() {
let firstEstimationComplete =
this.firstEstimationComplete =
this.state.activeInput && this.props.targets.length > 0
return (
<div id="targetSelection">
{!firstEstimationComplete && <h1>Entrez un salaire mensuel</h1>}
{!this.firstEstimationComplete && <h1>Entrez un salaire mensuel</h1>}
<section
id="targetsContainer"
style={{
@ -64,7 +64,7 @@ export default class TargetSelection extends Component {
{this.renderOutputList()}
</section>
{firstEstimationComplete && (
{this.firstEstimationComplete && (
<div id="action">
{this.props.selectingTargets ? (
!this.props.conversationVisible && (
@ -158,14 +158,12 @@ export default class TargetSelection extends Component {
<span className="optionTitle">{s.title || s.name}</span>
</label>
<span className="targetInputOrValue">
{s.name.includes('salaire') &&
this.state.activeInput === s.dottedName ? (
{this.state.activeInput === s.dottedName ? (
<>
<Field
name={s.dottedName}
component="input"
type="text"
placeholder="mon--require salaire"
autoFocus
/>
{this.props.targets.length > 0 && (
@ -178,16 +176,14 @@ export default class TargetSelection extends Component {
) : (
<>
<span
className={classNames('targetValue', {
className={classNames({
editable: s.question,
attractClick:
s.question && this.props.targets.length === 0
})}
onClick={() => {
// 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 {
</span>
</>
)}
{(this.firstEstimationComplete || s.question) && (
<span className="unit"></span>
)}
</span>
</div>
<p>{s['résumé']}</p>

View File

@ -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)]
;<ReactCSSTransitionGroup
transitionName="flash"
transitionEnterTimeout={100}