Merge pull request #1096 from betagouv/quickfix-johan

Quickfix johan
pull/1097/head
Johan Girod 2020-08-24 12:53:58 +02:00 committed by GitHub
commit 81c8291388
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 1609 additions and 1395 deletions

View File

@ -16,10 +16,43 @@
"not ie < 11"
],
"devDependencies": {
"@babel/core": "^7.9.0",
"@babel/plugin-proposal-class-properties": "^7.8.3",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.8.3",
"@babel/plugin-proposal-object-rest-spread": "^7.9.5",
"@babel/plugin-proposal-optional-chaining": "^7.9.0",
"@babel/preset-env": "^7.9.5",
"@babel/preset-react": "^7.9.4",
"@babel/preset-typescript": "^7.9.0",
"@types/cheerio": "^0.22.18",
"@types/js-yaml": "^3.12.2",
"@types/react": "^16.9.11",
"@types/react-color": "^3.0.1",
"@types/react-dom": "^16.9.3",
"@types/react-helmet": "^5.0.13",
"@types/react-redux": "^7.1.5",
"@types/react-router": "^5.1.2",
"@types/recharts": "^1.8.9",
"@types/styled-components": "^5.1.0",
"@types/webpack": "^4.41.10",
"@typescript-eslint/eslint-plugin": "^2.31.0",
"@typescript-eslint/parser": "^2.31.0",
"autoprefixer": "^9.7.6",
"babel-plugin-styled-components": "^1.10.7",
"copy-webpack-plugin": "^4.5.2",
"enzyme-adapter-react-16": "^1.1.1",
"eslint-plugin-react": "^7.12.4",
"html-webpack-plugin": "^3.2.0",
"i18next-parser": "^1.0.6",
"intl-locales-supported": "^1.0.0",
"mock-local-storage": "^1.0.5",
"monaco-editor-webpack-plugin": "^1.9.0",
"serve": "^11.1.0",
"terser-webpack-plugin": "^3.0.2",
"typescript": "^3.9.2",
"webpack": "^4.42.0",
"webpack-bundle-analyzer": "^3.7.0",
"webpack-cli": "^3.1.2",
"workbox-webpack-plugin": "^3.6.0",
"worker-loader": "^2.0.0"
},

View File

@ -101,13 +101,13 @@ async function fetchSimulators(dt) {
.filter(({ label }) =>
[
'/salaire-brut-net',
'/salarié',
'/chômage-partiel',
'/auto-entrepreneur',
'/artiste-auteur',
'/aide-declaration-independants',
'/indépendant',
'/comparaison-régimes-sociaux',
'/assimilé-salarié'
'/dirigeant-sasu'
].includes(label)
)
@ -146,11 +146,11 @@ async function fetchSimulators(dt) {
label.startsWith('/coronavirus')
? '/chômage-partiel'
: label.startsWith('/simulateur-embauche') ||
label === '/salaire-brut-net'
? '/salarié'
label.startsWith('/salarié')
? '/salaire-brut-net'
: label.startsWith('/simulateur-autoentrepreneur')
? '/auto-entrepreneur'
: label === '/assimilé-salarié'
: label.startsWith('/assimilé-salarié')
? '/dirigeant-sasu'
: label

View File

@ -9,7 +9,7 @@ questions:
à l'affiche:
Chômage partiel: contrat salarié . activité partielle
Temps partiel: contrat salarié . temps de travail . temps partiel
Cadre: contrat salarié . statut cadre . choix statut cadre
Cadre: contrat salarié . statut cadre
Heures supplémentaires: contrat salarié . temps de travail . heures supplémentaires
Titres-restaurant: contrat salarié . frais professionnels . titres-restaurant
Impôt: impôt . méthode de calcul

View File

@ -50,7 +50,7 @@ export function useSimulatorsMetadata() {
icône: '🤝',
description: t(
'simulateurs.résumé.salarié',
"Calculer le salaire net, brut, ou total d'un salarié, stagiaire,ou assimilé"
"Calculer le salaire net, brut, ou total d'un salarié, stagiaire, ou assimilé"
),
sitePath: sitePaths.simulateurs.salarié
},

View File

@ -73,7 +73,7 @@ export default function Library() {
& wget
https://raw.githubusercontent.com/betagouv/mon-entreprise/master/mon-entreprise/source/rules/impôt.yaml
& wget
https://raw.githubusercontent.com/betagouv/mon-entreprise/master/mon-entreprise/source/rules/situation-personelle.yaml
https://raw.githubusercontent.com/betagouv/mon-entreprise/master/mon-entreprise/source/rules/situation-personnelle.yaml
</code>
</blockquote>
<p>

View File

@ -20,6 +20,7 @@
"private": false,
"dependencies": {
"classnames": "^2.2.6",
"focus-trap-react": "^3.1.2",
"i18next": "^19.4.4",
"moo": "^0.5.1",
"nearley": "^2.19.2",
@ -27,7 +28,6 @@
"react-easy-emoji": "^1.4.0",
"react-i18next": "^11.4.0",
"react-markdown": "^4.3.1",
"focus-trap-react": "^3.1.2",
"styled-components": "^5.1.0",
"yaml": "^1.9.2"
},

View File

@ -1,17 +1,17 @@
import { map } from 'ramda'
import React from 'react'
import { Operation } from '../components/mecanisms/common'
import { convertToDate } from '../date'
import { typeWarning } from '../error'
import { evaluateNode, makeJsx, mergeMissing } from '../evaluation'
import { Operation } from '../components/mecanisms/common'
import { convertNodeToUnit } from '../nodeUnits'
import { liftTemporal2, pureTemporal, temporalAverage } from '../temporal'
import { inferUnit, serializeUnit } from '../units'
import { curry, map } from 'ramda'
import React from 'react'
export default (k, operatorFunction, symbol) => (recurse, v) => {
const evaluate = (cache, situation, parsedRules, node) => {
const explanation = map(
curry(evaluateNode)(cache, situation, parsedRules),
node => evaluateNode(cache, situation, parsedRules, node),
node.explanation
)
let [node1, node2] = explanation

2945
yarn.lock

File diff suppressed because it is too large Load Diff