From 7e360ca1136eb4c5419bc3482ac21543052e355b Mon Sep 17 00:00:00 2001 From: Manus Date: Thu, 4 Jun 2026 13:39:48 +0000 Subject: [PATCH] =?UTF-8?q?Checkpoint:=20OPEX=20DSI=20:=20colonne=20Tendan?= =?UTF-8?q?ce=20ajout=C3=A9e=20sur=20chaque=20ligne=20du=20tableau=20-=20p?= =?UTF-8?q?astille=20rouge+fl=C3=A8che=20montante=20(hausse=20>=202%),=20o?= =?UTF-8?q?range=20stable=20(<=202%),=20vert+fl=C3=A8che=20descendante=20(?= =?UTF-8?q?baisse),=20bleu=20"Nouveau"=20(pas=20de=20N-1).=20Pourcentage?= =?UTF-8?q?=20d'=C3=A9volution=20affich=C3=A9=20dans=20chaque=20pastille.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/pages/DsiOpex.tsx | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/client/src/pages/DsiOpex.tsx b/client/src/pages/DsiOpex.tsx index 31c34f6..6d1b080 100644 --- a/client/src/pages/DsiOpex.tsx +++ b/client/src/pages/DsiOpex.tsx @@ -859,6 +859,7 @@ export default function DsiOpex() { + Tendance Répartition {!isValidated && } @@ -917,6 +918,41 @@ export default function DsiOpex() { /> )} + + {(() => { + const n1 = ligne.budget_n1; + const n = ligne.montant; + if (!n1 || n1 === 0) { + return n > 0 + ? Nouveau + : ; + } + const diff = n - n1; + const pctVar = (diff / n1) * 100; + if (Math.abs(pctVar) < 2) { + return ( + + + stable + + ); + } else if (diff > 0) { + return ( + + + +{pctVar.toFixed(1)}% + + ); + } else { + return ( + + + {pctVar.toFixed(1)}% + + ); + } + })()} +