diff --git a/source/components/TargetSelection.css b/source/components/TargetSelection.css
index 7ddde521e..2ebfdfa8d 100644
--- a/source/components/TargetSelection.css
+++ b/source/components/TargetSelection.css
@@ -75,13 +75,7 @@
#targetSelection .targetInputOrValue {
font-size: 135%;
- display: flex;
- justify-content: flex-end;
- align-items: flex-end;
margin-left: 0.6em;
-}
-
-#targetSelection .targetValue {
text-align: right;
}
diff --git a/source/components/TargetSelection.js b/source/components/TargetSelection.js
index a71276aea..5d0151827 100644
--- a/source/components/TargetSelection.js
+++ b/source/components/TargetSelection.js
@@ -218,12 +218,16 @@ let TargetInputOrValue = withLanguage(
}}
/>
)}
+ {target.dottedName.includes('rémunération . total') && }
)
)
-@connect(dispatch => ({
- setFormValue: (field, name) => dispatch(change('conversation', field, name))
-}))
+@connect(
+ null,
+ dispatch => ({
+ setFormValue: (field, name) => dispatch(change('conversation', field, name))
+ })
+)
class TargetValue extends Component {
render() {
let { targets, target, noUserInput, blockingInputControls } = this.props
@@ -233,20 +237,17 @@ class TargetValue extends Component {
value = targetWithValue && targetWithValue.nodeValue
return (
-
-
- {target.dottedName.includes('rémunération . total') && }
-
+
)
}
showField(value) {
@@ -265,10 +266,11 @@ class TargetValue extends Component {
@connect(state => ({ analysis: analysisWithDefaultsSelector(state) }))
class AidesGlimpse extends Component {
render() {
- let aides = this.props.analysis.targets.find(
- t => t.dottedName === 'contrat salarié . aides employeur'
- )
- if (!aides.nodeValue) return null
+ let targets = this.props.analysis.targets,
+ aides =
+ targets &&
+ targets.find(t => t.dottedName === 'contrat salarié . aides employeur')
+ if (!aides || !aides.nodeValue) return null
return (
{' '}