From 7b029c4991a2e9fbf7f3ea77f629e736e58f6a0b Mon Sep 17 00:00:00 2001 From: Johan Girod Date: Mon, 7 Jan 2019 18:14:45 +0100 Subject: [PATCH] =?UTF-8?q?:bug:=20r=C3=A9pare=20la=20page=20assimil=C3=A9?= =?UTF-8?q?=20salari=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/selectors/analyseSelectors.js | 18 +++++++++--------- .../pages/SocialSecurity/SimulateurAssimilé.js | 5 ++--- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/source/selectors/analyseSelectors.js b/source/selectors/analyseSelectors.js index 48eb20573..a3e11198f 100644 --- a/source/selectors/analyseSelectors.js +++ b/source/selectors/analyseSelectors.js @@ -13,18 +13,18 @@ import { } from 'Engine/rules' import { analyse, analyseMany, parseAll } from 'Engine/traverse' import { - map, - mergeDeepWith, - pipe, add, contains, + dissoc, equals, head, - isEmpty, - pick, - reduce, intersection, - dissoc + isEmpty, + map, + mergeDeepWith, + pick, + pipe, + reduce } from 'ramda' import { getFormValues } from 'redux-form' import { createSelector, createSelectorCreator, defaultMemoize } from 'reselect' @@ -120,7 +120,7 @@ export let ruleAnalysisSelector = createSelector( (_, { dottedName }) => dottedName, situationsWithDefaultsSelector, state => state.situationBranch || 0, - (_, { raccourcis: valueShortcuts }) => valueShortcuts || {} + (_, props) => props?.raccourcis || {} ], (rules, dottedName, situations, situationBranch, valueShortcuts) => analyseRule( @@ -163,7 +163,7 @@ let makeAnalysisSelector = situationSelector => parsedRulesSelector, targetNamesSelector, situationSelector, - (_, { raccourcis: valueShortcuts }) => valueShortcuts + (_, props) => props?.raccourcis || {} ], (parsedRules, targetNames, situations, valueShortcuts) => { let analyses = situations.map(situation => diff --git a/source/sites/mycompanyinfrance.fr/pages/SocialSecurity/SimulateurAssimilé.js b/source/sites/mycompanyinfrance.fr/pages/SocialSecurity/SimulateurAssimilé.js index c64010c15..ba8bd4880 100644 --- a/source/sites/mycompanyinfrance.fr/pages/SocialSecurity/SimulateurAssimilé.js +++ b/source/sites/mycompanyinfrance.fr/pages/SocialSecurity/SimulateurAssimilé.js @@ -1,6 +1,5 @@ -import React from 'react' import Simulateur from 'Components/Simu' - +import React from 'react' import { connect } from 'react-redux' import { change } from 'redux-form' @@ -13,7 +12,7 @@ export default connect( ) }) )( - class extends React.Component { + class SimulateurAssimilé extends React.Component { constructor(props) { super(props) this.props.setAssimilé('oui')