⚙️ 🐛 Réparation du pointeur blanc question -> objectif
parent
954ed3c72f
commit
e18e0a44da
|
@ -15,8 +15,8 @@ let humanFigure = decimalDigits => value => fmt(value.toFixed(decimalDigits))
|
|||
export default class Results extends Component {
|
||||
render() {
|
||||
let {analysedSituation, pointedOutObjectives} = this.props
|
||||
// On travaille sur un objectif qui est une somme de plusieurs variables, et c'est ces variables que nous affichons comme résultats
|
||||
|
||||
// On travaille sur un objectif qui est une somme de plusieurs variables, et c'est ces variables que nous affichons comme résultats
|
||||
let explanation = R.path(['formule', 'explanation', 'explanation'])(analysedSituation)
|
||||
if (!explanation) return null
|
||||
|
||||
|
@ -28,12 +28,12 @@ export default class Results extends Component {
|
|||
</div>
|
||||
<ul>
|
||||
{explanation.map(
|
||||
({explanation: {name, type, 'non applicable si': {nodeValue: nonApplicable}, formule: {nodeValue: computedValue}}}) =>
|
||||
({variableName, explanation: {name, type, 'non applicable si': {nodeValue: nonApplicable}, formule: {nodeValue: computedValue}}}) =>
|
||||
do {
|
||||
let
|
||||
unsatisfied = nonApplicable == null || computedValue == null,
|
||||
irrelevant = nonApplicable === true,
|
||||
pointedOut = pointedOutObjectives.find(objective => objective == name),
|
||||
pointedOut = pointedOutObjectives.find(objective => objective == variableName),
|
||||
number = nonApplicable == false && computedValue != null
|
||||
|
||||
;<li key={name} className={classNames({unsatisfied, irrelevant, number, pointedOut})}>
|
||||
|
|
|
@ -135,7 +135,7 @@ export let collectMissingVariables = (groupMethod='groupByMissingVariable', anal
|
|||
R.pipe(
|
||||
collectNodeMissingVariables('missingVariables'),
|
||||
R.flatten,
|
||||
R.map(mv => [v.name, mv])
|
||||
R.map(mv => [v.variableName, mv])
|
||||
)(v)
|
||||
),
|
||||
//groupBy missing variable but remove mv from value, it's now in the key
|
||||
|
|
|
@ -99,7 +99,9 @@ export default reduceReducers(
|
|||
|
||||
missingVariables: {variable: [objectives]}
|
||||
*/
|
||||
missingVariables = collectMissingVariables('groupByMissingVariable', analysedSituation),
|
||||
|
||||
missingVariables = collectMissingVariables('groupByMissingVariable', R.path(['formule', 'explanation', 'explanation'])(analysedSituation)),
|
||||
|
||||
missingVariablesList = R.keys(missingVariables),
|
||||
/*
|
||||
Certaines variables manquantes peuvent être factorisées dans des groupes.
|
||||
|
|
Loading…
Reference in New Issue