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
: —}
|
);