diff --git a/source/components/Results.css b/source/components/Results.css index 5d3e20a92..18f07e0f9 100644 --- a/source/components/Results.css +++ b/source/components/Results.css @@ -90,7 +90,6 @@ #results .rule-name { font-size: 150%; - text-transform: capitalize; } #results li p { diff --git a/source/components/Results.js b/source/components/Results.js index 347cc2a8d..1867a0d10 100644 --- a/source/components/Results.js +++ b/source/components/Results.js @@ -7,7 +7,7 @@ import './Results.css' let fmt = new Intl.NumberFormat('fr-FR').format let humanFigure = decimalDigits => value => fmt(value.toFixed(decimalDigits)) - +let capitalize = name => R.head(name).toUpperCase() + R.tail(name) @connect( state => ({ pointedOutObjectives: state.pointedOutObjectives, @@ -47,7 +47,7 @@ export default class Results extends Component { {type}
- {name} + {capitalize(name)}

{conversationStarted && ( diff --git a/source/components/Simulateur.js b/source/components/Simulateur.js index b84910f40..3159a04ff 100644 --- a/source/components/Simulateur.js +++ b/source/components/Simulateur.js @@ -88,7 +88,7 @@ export default class extends React.Component {

- Pour simplifier, les résultats sont calculés par mois de contrat. + Pour simplifier, les résultats sont calculés par mois de contrat, et pour un temps complet.

N'hésitez pas à nous écrire ! La loi française est très ciblée, et donc complexe. Nous pouvons la rendre plus transparente. diff --git a/source/engine/rules.js b/source/engine/rules.js index 1f29a20be..e486e9abb 100644 --- a/source/engine/rules.js +++ b/source/engine/rules.js @@ -69,7 +69,7 @@ export let findRuleByName = search => rules .map(enrichRule) .find( ({name}) => - name === search + name.toLowerCase() === search.toLowerCase() ) export let searchRules = searchInput => @@ -79,8 +79,8 @@ export let searchRules = searchInput => JSON.stringify(rule).toLowerCase().indexOf(searchInput) > -1) .map(enrichRule) -export let findRuleByDottedName = dottedName => // console.log('dottedName', dottedName) || - rules.find(rule => rule.dottedName == dottedName) +export let findRuleByDottedName = dottedName => dottedName && + rules.find(rule => rule.dottedName.toLowerCase() == dottedName.toLowerCase()) export let findGroup = R.pipe( findRuleByDottedName, diff --git a/source/webpack.config.js b/source/webpack.config.js index 39c02b6e3..0fffe49e4 100644 --- a/source/webpack.config.js +++ b/source/webpack.config.js @@ -55,7 +55,7 @@ module.exports = { }, { test: /\.(jpe?g|png|gif|svg)$/i, - loader: 'url-loader?limit=10000!img-loader?progressive=true' + loader: 'url-loader?limit=10000&name=images/[name].[ext]!img-loader?progressive=true' }, { test: /\.ne$/, loader: 'babel-loader!nearley-loader'