From eb1684f04c6a656b0ccc3ac3eb6297146c9f235e Mon Sep 17 00:00:00 2001 From: Manus Date: Thu, 11 Jun 2026 08:06:09 +0000 Subject: [PATCH] =?UTF-8?q?Checkpoint:=20Quand=20un=20=C3=A9tablissement?= =?UTF-8?q?=20est=20en=20mode=20tout=20manuel,=20toutes=20ses=20cellules?= =?UTF-8?q?=20(postes=20en=20calcul=20automatique=20inclus)=20sont=20d?= =?UTF-8?q?=C3=A9sormais=20cliquables=20et=20=C3=A9ditables.=20Fond=20ambr?= =?UTF-8?q?e=20pour=20distinguer=20visuellement=20le=20mode=20tout=20manue?= =?UTF-8?q?l=20du=20mode=20manuel=20poste=20par=20poste=20(bleu).=20Les=20?= =?UTF-8?q?cellules=20sans=20saisie=20affichent=20"cliquer"=20en=20ambre.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/pages/DsiOpex.tsx | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/client/src/pages/DsiOpex.tsx b/client/src/pages/DsiOpex.tsx index 3f8bd19..1181de3 100644 --- a/client/src/pages/DsiOpex.tsx +++ b/client/src/pages/DsiOpex.tsx @@ -1783,14 +1783,16 @@ export default function DsiOpex() { {lignes.map(ligne => { const isManuel = ligne.mode_ventilation === 'Manuel' || ligne.isCustom; + // En mode tout manuel pour cet établissement, toutes les cellules sont éditables + const isCellEditable = etab.modeManuel || isManuel; const montant = etab.montants[ligne.libelle] ?? 0; const cellKey = `${etab.code}|${ligne.libelle}`; const isEditing = inlineEditKey === cellKey; const hasOverride = montantsManuelEtab[etab.code]?.[ligne.libelle] !== undefined; - if (isManuel && isEditing) { + if (isCellEditable && isEditing) { return ( - + @@ -1814,20 +1816,30 @@ export default function DsiOpex() { return ( isManuel && !isValidated && handleInlineEditStart(etab.code, ligne.libelle, montant)} + onClick={() => isCellEditable && !isValidated && handleInlineEditStart(etab.code, ligne.libelle, montant)} className={`px-2 py-2 text-right tabular-nums transition-colors ${ - isManuel - ? `border border-blue-200 bg-blue-50/30 text-blue-800 ${ - !isValidated ? 'cursor-pointer hover:bg-blue-100/60 hover:border-blue-400' : '' - } ${hasOverride ? 'font-semibold' : ''}` - : 'border border-emerald-200 bg-emerald-50/20 text-emerald-800' + etab.modeManuel + ? `border border-amber-200 bg-amber-50/30 text-amber-800 ${ + !isValidated ? 'cursor-pointer hover:bg-amber-100/60 hover:border-amber-400' : '' + } ${hasOverride ? 'font-semibold' : 'opacity-60'}` + : isManuel + ? `border border-blue-200 bg-blue-50/30 text-blue-800 ${ + !isValidated ? 'cursor-pointer hover:bg-blue-100/60 hover:border-blue-400' : '' + } ${hasOverride ? 'font-semibold' : ''}` + : 'border border-emerald-200 bg-emerald-50/20 text-emerald-800' }`} - title={isManuel && !isValidated ? 'Cliquer pour saisir le montant' : undefined} + title={ + etab.modeManuel && !isValidated + ? 'Cliquer pour saisir le montant (mode tout manuel)' + : isManuel && !isValidated + ? 'Cliquer pour saisir le montant' + : undefined + } > {montant > 0 ? new Intl.NumberFormat('fr-FR', { maximumFractionDigits: 0 }).format(montant) + ' €' - : isManuel && !isValidated - ? cliquer + : isCellEditable && !isValidated + ? cliquer : } );