Checkpoint: Audit de robustesse et maintenabilité : calcul dynamique des tendances OPEX par véritable année N-1, filtrage/validation centralisés des codes établissement, transactions d'import et d'écriture, contraintes uniques CAPEX/OPEX avec déduplication, suppression effective de postes OPEX, nettoyage des gabarits et scripts morts, chargement différé XLSX, documentation métier et 22 tests passants.

This commit is contained in:
Manus
2026-08-17 20:50:33 +00:00
parent 31cdb257fb
commit 615dd46059
29 changed files with 1449 additions and 3307 deletions

View File

@@ -20,7 +20,7 @@ function SortIcon({ field, sortField, sortOrder }: { field: SortField; sortField
: <ArrowDown className="w-3.5 h-3.5 text-primary" />;
}
function VetusteBar({ value, total, color }: { value: number; total: number; color: string }) {
function VetusteBar({ value, total }: { value: number; total: number }) {
const pct = total > 0 ? Math.round((value / total) * 100) : 0;
const barColor =
pct >= 80 ? 'bg-red-500' :
@@ -133,12 +133,12 @@ export function EtablissementListView({ etablissements, onSelect, sortField, sor
{/* PC Fixes */}
<td className="px-3 py-3">
<VetusteBar value={nbFixesR} total={nbFixesTotal} color="blue" />
<VetusteBar value={nbFixesR} total={nbFixesTotal} />
</td>
{/* PC Portables */}
<td className="px-3 py-3">
<VetusteBar value={nbPortablesR} total={nbPortablesTotal} color="orange" />
<VetusteBar value={nbPortablesR} total={nbPortablesTotal} />
</td>
{/* Total à renouveler */}