From 74e1aacab9709a2fa8d06d49714c09223b22316e Mon Sep 17 00:00:00 2001 From: mama Date: Wed, 22 Nov 2017 15:31:29 +0100 Subject: [PATCH] =?UTF-8?q?Ordre=20plus=20coh=C3=A9rent=20des=20objectifs?= =?UTF-8?q?=20de=20simulation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entités/ok/contrat-salarié.yaml | 1 - source/components/TargetSelection.js | 13 +++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/règles/rémunération-travail/entités/ok/contrat-salarié.yaml b/règles/rémunération-travail/entités/ok/contrat-salarié.yaml index 9fcf0fdcf..3fcba7e9e 100644 --- a/règles/rémunération-travail/entités/ok/contrat-salarié.yaml +++ b/règles/rémunération-travail/entités/ok/contrat-salarié.yaml @@ -191,7 +191,6 @@ - espace: contrat salarié nom: aides résumé: Les aides différées dont peut bénéficier l'employeur. - type: salaire formule: somme: - CICE diff --git a/source/components/TargetSelection.js b/source/components/TargetSelection.js index 2093fb889..4718d8994 100644 --- a/source/components/TargetSelection.js +++ b/source/components/TargetSelection.js @@ -1,6 +1,6 @@ import React, { Component } from 'react' -import { rules } from 'Engine/rules' -import { propEq, reject } from 'ramda' +import { rules, findRuleByName } from 'Engine/rules' +import { propEq, reject, curry } from 'ramda' import { Link } from 'react-router-dom' import './TargetSelection.css' @@ -25,11 +25,16 @@ export default class TargetSelection extends Component { } renderOutputList() { - let salaires = rules.filter(propEq('type', 'salaire')), + let popularTargets = [ + 'salaire net', + 'salaire de base', + 'super brut', + 'aides' + ].map(curry(findRuleByName)(rules)), { targets } = this.state return (
- {salaires.map(s => ( + {popularTargets.map(s => (