feat: Implement PostgreSQL client for FF Nancy to replace per-article HTTP calls with bulk SQL queries.

This commit is contained in:
Michael committed 2026-03-21 08:37:33 +01:00
1 parent eb8ca92847
commit 1e393753fa
2 files changed
+33 -10

No files matched your search

+6 -1
View File
@@ -311,7 +311,7 @@ export default async function DashboardPage() {
);
}
const { dateHier, sites, top10Ca, top10Qte, top10Marge, evolution } = data;
const { dateHier, sites, top10Ca, top10Qte, top10Marge, evolution, debug } = data;
// Totaux réseau
const totalCa = sites.reduce((s, r) => s + r.ca_hier, 0);
@@ -336,6 +336,11 @@ export default async function DashboardPage() {
</p>
</div>
{/* Debug probe — à supprimer une fois les colonnes confirmées */}
<div className="rounded-lg px-4 py-2 text-xs font-mono" style={{ background: "var(--bg-elevated)", border: "1px solid var(--border)", color: "var(--text-muted)" }}>
🔍 probe: cumstatCol=&quot;{debug.cumstatCol ?? "null"}&quot; · mvtart(genremvt=3,400j)={debug.mvtartCount} · statopcajour={debug.statopCount} · cols=[{debug.statopCols.join(", ")}]
</div>
{/* KPI réseau */}
<div className="grid grid-cols-2 md:grid-cols-4 gap-4">
<KpiCard