From 36d2d550519c260b5cee373a407223dfec45d201 Mon Sep 17 00:00:00 2001 From: Johan Girod Date: Wed, 5 Sep 2018 11:38:39 +0200 Subject: [PATCH 1/2] :alien: ajoute traduction manquantes IR --- source/components/TargetSelection.js | 10 ++++++---- source/locales/en.yaml | 2 ++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/source/components/TargetSelection.js b/source/components/TargetSelection.js index 4c84c32d4..25a0b996e 100644 --- a/source/components/TargetSelection.js +++ b/source/components/TargetSelection.js @@ -5,6 +5,7 @@ import withLanguage from 'Components/utils/withLanguage' import { encodeRuleName, findRuleByDottedName } from 'Engine/rules' import { propEq } from 'ramda' import React, { Component } from 'react' +import emoji from 'react-easy-emoji' import { Trans, translate } from 'react-i18next' import { connect } from 'react-redux' import { withRouter } from 'react-router' @@ -16,13 +17,12 @@ import { flatRulesSelector, noUserInputSelector } from 'Selectors/analyseSelectors' +import { mainTargetNames } from '../config' import AnimatedTargetValue from './AnimatedTargetValue' import Controls from './Controls' import CurrencyInput from './CurrencyInput/CurrencyInput' import ProgressCircle from './ProgressCircle' import './TargetSelection.css' -import emoji from 'react-easy-emoji' -import { mainTargetNames } from '../config' let salaries = [ 'contrat salarié . salaire . total', @@ -167,7 +167,9 @@ let Header = ({ {!conversationStarted && target.dottedName.includes('net après impôt') && (
- Janvier 2019 + + Janvier 2019 +
)} @@ -285,7 +287,7 @@ class AidesGlimpse extends Component { - d'aides {emoji(aides.icon)} + d'aides {emoji(aides.icon)} ) diff --git a/source/locales/en.yaml b/source/locales/en.yaml index 685e83154..36c9f2e35 100644 --- a/source/locales/en.yaml +++ b/source/locales/en.yaml @@ -159,3 +159,5 @@ feedback: good: headline: Thanks for your feedback! support: If you have a remark, or an idea of improvement, do not hesitate to contact us directly by mail at <1>contact@embauche.beta.gouv.fr +Janvier 2019: January 2019 +d'aides: of aid From 0908e23b2c1c431d2901eb05c1e3036ef41929c1 Mon Sep 17 00:00:00 2001 From: Johan Girod Date: Wed, 5 Sep 2018 12:03:53 +0200 Subject: [PATCH 2/2] =?UTF-8?q?:art:=20Am=C3=A9liore=20le=20style=20des=20?= =?UTF-8?q?pages=20r=C3=A8gles?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/components/rule/Destinataire.js | 5 +++-- source/components/rule/Header.css | 21 +++++++++++++++++---- source/components/rule/Header.js | 26 +++++++++++++++----------- 3 files changed, 35 insertions(+), 17 deletions(-) diff --git a/source/components/rule/Destinataire.js b/source/components/rule/Destinataire.js index 5dd79c8df..cd5f6e818 100644 --- a/source/components/rule/Destinataire.js +++ b/source/components/rule/Destinataire.js @@ -1,7 +1,7 @@ import React, { Component } from 'react' +import { Trans, translate } from 'react-i18next' import possiblesDestinataires from 'Règles/ressources/destinataires/destinataires.yaml' import './Destinataire.css' -import { Trans, translate } from 'react-i18next' @translate() export default class Rule extends Component { @@ -12,7 +12,8 @@ export default class Rule extends Component { return destinataire && destinataireData ? (

- Destinataire : + Destinataire +  :

diff --git a/source/components/rule/Header.css b/source/components/rule/Header.css index 43c1bc9f8..a15c820c8 100644 --- a/source/components/rule/Header.css +++ b/source/components/rule/Header.css @@ -20,14 +20,27 @@ #ruleHeader__content { display: flex; - align-items: center; + padding-top: 1rem; } -#ruleHeader__content > div { - margin: 0 0.6em 0 0.6em; +@media (max-width: 500px) { + #ruleHeader__content { + align-items: center; + flex-direction: column-reverse; + margin: 1rem 0; + } +} +#ruleHeader__description { + flex: 1; +} +#ruleHeader__infobox { + padding: 1rem; + padding-top: 0; + max-width: 12rem; } - .infobox__item { text-align: center; + display: flex; + flex-direction: column; } #ruleHeader h4 { diff --git a/source/components/rule/Header.js b/source/components/rule/Header.js index 353127623..c376522f2 100644 --- a/source/components/rule/Header.js +++ b/source/components/rule/Header.js @@ -1,13 +1,13 @@ +import withColours from 'Components/utils/withColours' import { createMarkdownDiv } from 'Engine/marked' import { path } from 'ramda' import React from 'react' +import emoji from 'react-easy-emoji' import { Trans } from 'react-i18next' import { capitalise0 } from '../../utils' import Destinataire from './Destinataire' import './Header.css' import Namespace from './Namespace' -import withColours from 'Components/utils/withColours' -import emoji from 'react-easy-emoji' let RuleHeader = withColours( ({ @@ -38,15 +38,19 @@ let RuleHeader = withColours(
{createMarkdownDiv(description || question)}
-
- {type && ( -
-

Type :

- {capitalise0(type)} -
- )} - -
+ {(type || path([type, 'destinataire'])(flatRule)) && ( +
+ {type && ( +
+

Type :

+ {capitalise0(type)} +
+ )} + +
+ )}
)