diff --git a/source/components/publicodesUtils.js b/source/components/publicodesUtils.js index 299df812a0..47a4c8e9b9 100644 --- a/source/components/publicodesUtils.js +++ b/source/components/publicodesUtils.js @@ -1,4 +1,10 @@ +import { capitalise0 } from '../utils' + export const parentName = (dottedName, outputSeparator = ' . ') => splitName(dottedName).slice(0, -1).join(outputSeparator) export const splitName = (dottedName) => dottedName.split(' . ') + +export const title = (rule) => + rule.titre || + capitalise0(splitName(rule.dottedName)[splitName(rule.dottedName).length - 1]) diff --git a/source/sites/publicodes/ActionPlus.js b/source/sites/publicodes/ActionPlus.js index 32e273a4e3..9fd61632d8 100644 --- a/source/sites/publicodes/ActionPlus.js +++ b/source/sites/publicodes/ActionPlus.js @@ -15,9 +15,16 @@ export default () => { return (
- - Découvrez les enjeux qui se cachent derrière chaque action. - + Découvrez les enjeux qui se cachent derrière chaque action.