From 8c81b42a62436b6b6bcf6be8295f3625733b1bf0 Mon Sep 17 00:00:00 2001 From: Johan Girod Date: Thu, 6 Feb 2020 13:45:01 +0100 Subject: [PATCH] =?UTF-8?q?:bug:=20r=C3=A9pare=20le=20changement=20de=20p?= =?UTF-8?q?=C3=A9riode=20pour=20les=20charges?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix #872 --- source/reducers/rootReducer.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/reducers/rootReducer.ts b/source/reducers/rootReducer.ts index e33702735..cee27f027 100644 --- a/source/reducers/rootReducer.ts +++ b/source/reducers/rootReducer.ts @@ -102,7 +102,6 @@ function updateSituation( function updateDefaultUnit(situation, { toUnit, analysis }) { const unit = parseUnit(toUnit) const goals = goalsFromAnalysis(analysis) - console.log(goals) const convertedSituation = Object.keys(situation) .map( dottedName => @@ -111,10 +110,11 @@ function updateDefaultUnit(situation, { toUnit, analysis }) { ) .filter( rule => - goals?.includes(rule.dottedName) && - (rule.unit || rule.defaultUnit) && - !rule.unité && - areUnitConvertible(rule.unit || rule.defaultUnit, unit) + rule.dottedName === 'entreprise . charges' || // HACK en attendant de revoir le fonctionnement des unités + (goals?.includes(rule.dottedName) && + (rule.unit || rule.defaultUnit) && + !rule.unité && + areUnitConvertible(rule.unit || rule.defaultUnit, unit)) ) .reduce( (convertedSituation, rule) => ({