diff --git a/index.html b/index.html index 0edcc1e5b..93c28637c 100644 --- a/index.html +++ b/index.html @@ -172,4 +172,4 @@ - \ No newline at end of file + diff --git a/source/components/PeriodSwitch.js b/source/components/PeriodSwitch.js new file mode 100644 index 000000000..117e9c23a --- /dev/null +++ b/source/components/PeriodSwitch.js @@ -0,0 +1,22 @@ +import withColours from 'Components/utils/withColours' +import React, { Component } from 'react' +import { translate } from 'react-i18next' +import { Field } from 'redux-form' + +export default function PeriodSwitch() { + return ( + <> + + <> + + + + + ) +} diff --git a/source/components/TargetSelection.js b/source/components/TargetSelection.js index 7c8f2921a..38ccbe172 100644 --- a/source/components/TargetSelection.js +++ b/source/components/TargetSelection.js @@ -24,6 +24,7 @@ import Controls from './Controls' import CurrencyInput from './CurrencyInput/CurrencyInput' import ProgressCircle from './ProgressCircle' import './TargetSelection.css' +import PeriodSwitch from './PeriodSwitch' let salaries = [ 'contrat salarié . salaire . total', @@ -70,14 +71,9 @@ class TargetSelection extends Component { } = this.props return (
- {noUserInput && ( -

- - Entrez un salaire mensuel - -

- )} + {noUserInput &&

} +

- {activeInput === target.dottedName && - !conversationStarted && ( - - this.props.setFormValue(target.dottedName, '' + value) - } - colouredBackground={true} - /> - )} + {activeInput === target.dottedName && !conversationStarted && ( + + this.props.setFormValue(target.dottedName, '' + value) + } + colouredBackground={true} + /> + )} ))} @@ -167,20 +162,18 @@ let Header = ({ encodeRuleName(target.dottedName) return ( - {conversationStarted && - !blockingInputControls && ( - - )} + {conversationStarted && !blockingInputControls && ( + + )} - {!conversationStarted && - target.dottedName.includes('net après impôt') && ( -
- - Janvier 2019 - -
- )} + {!conversationStarted && target.dottedName.includes('net après impôt') && ( +
+ + Janvier 2019 + +
+ )} {target.title || target.name} diff --git a/source/components/rule/Rule.js b/source/components/rule/Rule.js index 6327c6012..34c5f143f 100644 --- a/source/components/rule/Rule.js +++ b/source/components/rule/Rule.js @@ -58,7 +58,6 @@ class Rule extends Component { namespaceRules = findRuleByNamespace(flatRules, dottedName) let displayedRule = analysedExample || analysedRule - let showValues = valuesToShow || currentExample return ( <> @@ -98,8 +97,8 @@ class Rule extends Component { currency: 'EUR' }).format(displayedRule.nodeValue) : typeof displayedRule.nodeValue !== 'object' - ? displayedRule.nodeValue - : null} + ? displayedRule.nodeValue + : null} ) : null} @@ -114,7 +113,10 @@ class Rule extends Component { // Fonctionnalité intéressante, à implémenter correctement false && } {flatRule.ns && ( - + )} {flatRule.note && (