Ordre plus cohérent des objectifs de simulation

pull/138/head
mama 2017-11-22 15:31:29 +01:00
parent ec55ff2ac6
commit 74e1aacab9
2 changed files with 9 additions and 5 deletions

View File

@ -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

View File

@ -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 (
<div>
{salaires.map(s => (
{popularTargets.map(s => (
<span key={s.name}>
<input
id={s.name}