Skip to content

Commit

Permalink
🐛 Résolution de problèmes sur les pages /règle
Browse files Browse the repository at this point in the history
🎨 Police taille 400 en italiquet
Et 🐛 affichage du calcul de salaire de base
  • Loading branch information
laem committed Nov 23, 2018
1 parent a22210c commit c0b862b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 15 deletions.
2 changes: 1 addition & 1 deletion index.html
Expand Up @@ -12,7 +12,7 @@
<meta name="msvalidate.01" content="65161AFDF93A706CED3F68C7621C00D7" />
<meta name="description" content="<%= htmlWebpackPlugin.options.description %>" data-react-helmet="true">
<!-- data-helmet pour que React Helmet puisse écraser ce meta par défaut -->
<link href='https://fonts.googleapis.com/css?family=Roboto:300,400,500,600|IBM+Plex+Sans:300,400' rel='stylesheet'
<link href='https://fonts.googleapis.com/css?family=Roboto:300,400,400i,500,600|IBM+Plex+Sans:300,400' rel='stylesheet'
type='text/css'>
<link rel="manifest" href="/manifest.webmanifest">
<title>
Expand Down
29 changes: 17 additions & 12 deletions source/components/rule/Algorithm.js
Expand Up @@ -10,10 +10,7 @@ import { ShowValuesProvider } from './ShowValuesContext'
export default compose(withI18n())(
class Algorithm extends React.Component {
render() {
let { rule, showValues } = this.props,
ruleWithoutFormula =
!rule['formule'] ||
path(['formule', 'explanation', 'une possibilité'], rule)
let { rule, showValues } = this.props

return (
<div id="algorithm">
Expand All @@ -37,14 +34,22 @@ export default compose(withI18n())(
</section>
)
}}
{!ruleWithoutFormula ? (
<section id="formule">
<h2>
<Trans>Calcul</Trans>
</h2>
{makeJsx(rule['formule'])}
</section>
) : null}
{do {
let formula =
rule['formule'] ||
(rule.category === 'variable' && rule.explanation.formule),
displayFormula =
formula &&
!path(['formule', 'explanation', 'une possibilité'], rule)
displayFormula && (
<section id="formule">
<h2>
<Trans>Calcul</Trans>
</h2>
{makeJsx(formula)}
</section>
)
}}
</ShowValuesProvider>
</section>
</div>
Expand Down
3 changes: 1 addition & 2 deletions source/engine/treatVariable.js
Expand Up @@ -86,8 +86,7 @@ export let treatVariable = (rules, rule, filter) => parseResult => {
name: variablePartialName,
category: 'variable',
fragments,
dottedName,
type: 'boolean | numeric'
dottedName
}
}

Expand Down

0 comments on commit c0b862b

Please sign in to comment.