From 999b3ad13799c73b2c7864bbec5bb391786fffb3 Mon Sep 17 00:00:00 2001 From: Marine Heckler Date: Thu, 12 Oct 2023 17:52:46 +0200 Subject: [PATCH] Fix calcul du score total sur le tableau de bord --- .../src/app/pages/collectivite/EtatDesLieux/Synthese/utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app.territoiresentransitions.react/src/app/pages/collectivite/EtatDesLieux/Synthese/utils.ts b/app.territoiresentransitions.react/src/app/pages/collectivite/EtatDesLieux/Synthese/utils.ts index 57eca99bed7..ef86fb4f346 100644 --- a/app.territoiresentransitions.react/src/app/pages/collectivite/EtatDesLieux/Synthese/utils.ts +++ b/app.territoiresentransitions.react/src/app/pages/collectivite/EtatDesLieux/Synthese/utils.ts @@ -123,8 +123,8 @@ export const getAggregatedScore = (scoreData: readonly ProgressionRow[]) => { programmes: aggregatedScore[1].value, pas_fait: aggregatedScore[2].value, non_renseigne: aggregatedScore[3].value, - max_personnalise: aggregatedScore.reduce( - (sum, currVal) => sum + currVal.value, + max_personnalise: scoreData.reduce( + (res, currVal) => res + currVal.points_max_personnalises, 0 ), };