fix(ui/export): centrage login, vitesse ticker, alignement KPI/budget/hauteur table PDF, désignation PPTX

This commit is contained in:
2026-08-21 22:23:15 +01:00
parent ff4effa663
commit dd0279ad09
5 changed files with 68 additions and 50 deletions
+9 -1
View File
@@ -48,6 +48,7 @@ async function buildViewData(view, req) {
const tauxList = actifs.map(r => parseNum(r.taux_phy ?? r.avt_phy)).filter(v => v > 0);
const tauxMoyen = tauxList.length ? Math.round(tauxList.reduce((a,b)=>a+b,0)/tauxList.length*10)/10 : 0;
const totalBudget = actifs.reduce((s,r) => s+parseNum(r.tot_marche??r.totmarche??r.montant),0);
const totalAvtFin = actifs.reduce((s,r) => s+parseNum(r.avt_fin),0);
const parStatut = {};
for (const r of rows) { const s=selectVal(r.observation)||'Inconnu'; parStatut[s]=(parStatut[s]||0)+1; }
const alertes = actifs
@@ -58,7 +59,14 @@ async function buildViewData(view, req) {
return {
total: rows.length, actifs: actifs.length, clotures: clotures.length,
taux_avancement_moyen: tauxMoyen, par_statut: parStatut,
budget: { total: formatMontant(totalBudget), total_raw: totalBudget },
budget: {
total: formatMontant(totalBudget),
total_raw: totalBudget,
consomme: formatMontant(totalAvtFin),
consomme_raw: totalAvtFin,
restant: formatMontant(totalBudget - totalAvtFin),
restant_raw: totalBudget - totalAvtFin,
},
alertes_delais: { count: alertes.length, critique: alertes.filter(a=>a.niveau==='critique').length, items: alertes },
};
}