🐛 Correction de l'affichage de l'explication
parent
dda23c5a90
commit
c91c13dc1a
|
@ -4,6 +4,7 @@ import { salaries } from 'Components/TargetSelection'
|
|||
import { isEmpty, intersection, head } from 'ramda'
|
||||
import Rule from 'Components/rule/Rule'
|
||||
import './Explanation.css'
|
||||
import {pluck} from 'ramda'
|
||||
|
||||
export default class Explanation extends Component {
|
||||
render() {
|
||||
|
@ -14,7 +15,7 @@ export default class Explanation extends Component {
|
|||
return <section id="explanation">{this.renderExplanation(targetRules)}</section>
|
||||
}
|
||||
renderExplanation(targetRules) {
|
||||
if (!isEmpty(intersection(targetRules, salaries))) return <ResultsGrid /> // Problem if targetRules is [salaire net, aides] the Explanation will not explain 'aides'. The user will have to click on Aides to understand it. Should we display a list of <Rule /> sections ?
|
||||
if (!isEmpty(intersection(pluck('name', targetRules), salaries))) return <ResultsGrid /> // Problem if targetRules is [salaire net, aides] the Explanation will not explain 'aides'. The user will have to click on Aides to understand it. Should we display a list of <Rule /> sections ?
|
||||
|
||||
if (targetRules.length > 1)
|
||||
return <p>Cliquez sur les lignes de résultat ci-dessus pour les comprendre</p>
|
||||
|
|
|
@ -72,7 +72,8 @@ export default class extends Component {
|
|||
situationGate,
|
||||
themeColours,
|
||||
targetNames,
|
||||
inputInversions
|
||||
inputInversions,
|
||||
done
|
||||
} = this.props,
|
||||
reinitalise = () => {
|
||||
ReactPiwik.push(['trackEvent', 'restart', ''])
|
||||
|
@ -116,7 +117,7 @@ export default class extends Component {
|
|||
}}
|
||||
/>
|
||||
<Results />
|
||||
<Explanation targetRules={R.path(['analysis', 'targets'], this.props)}/>
|
||||
{done && <Explanation targetRules={R.path(['analysis', 'targets'], this.props)}/>}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ export default class TargetSelection extends Component {
|
|||
}
|
||||
|
||||
renderOutputList() {
|
||||
let popularTargets = [...salaries, 'aides'].map(curry(findRuleByName)(rules)),
|
||||
let popularTargets = [...salaries, 'aides employeur différées'].map(curry(findRuleByName)(rules)),
|
||||
{ targets } = this.state
|
||||
return (
|
||||
<div>
|
||||
|
|
Loading…
Reference in New Issue