Déplacement de la saisie salaire entre les inversions possibles

pull/206/head
mama 2018-02-13 19:37:36 +01:00 committed by Laurent Bossavit
parent c8f7104a59
commit e89b9d1896
2 changed files with 27 additions and 23 deletions

View File

@ -6,6 +6,7 @@
margin-left: 1em;
font-size: 110%;
cursor: pointer;
clear: both;
}
#inversionRadios label.unselected {
opacity: 0.7;

View File

@ -57,31 +57,34 @@ class Fields extends Component {
<>
<div id="inversionRadios">
{inversion.inversions.map(({ name, title, dottedName: value }) => (
<label
key={value}
className={classNames({
selected: value === activeInversion,
unselected: activeInversion && value !== activeInversion
})}
>
<Field
name={'inversions.' + dottedName}
component="input"
type="radio"
value={value}
/>
<Explicable dottedName={value}>{title || name}</Explicable>
</label>
<>
<label
key={value}
className={classNames({
selected: value === activeInversion,
unselected: activeInversion && value !== activeInversion
})}
>
<Field
name={'inversions.' + dottedName}
component="input"
type="radio"
value={value}
/>
<Explicable dottedName={value}>{title || name}</Explicable>
</label>
{activeInversion === value && (
<Input
{...{
...this.props,
suggestions:
dottedName === fieldName && this.props.suggestions
}}
/>
)}
</>
))}
</div>
{activeInversion && (
<Input
{...{
...this.props,
suggestions: dottedName === fieldName && this.props.suggestions
}}
/>
)}
</>
)
}