feat(qlik): drop network rupture% metric and the "Sans vente 6 mois" grid tab

Stock Rupture % N saturated at 100% for high-presence products (degenerate
at the article x network grain), so remove it end to end: config id,
NetworkMetric, hypercube (width 8->7), cache, schema, enrich and grid
column. db-init drops the column on existing DBs.

Also remove the "Sans vente 6 mois" tab from the grid page: the grid now
renders directly without the tab switcher; delete the NoSalesTab component.
(The separate Stock negatif page keeps its own sans-vente tabs.)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
MichaelandClaude Opus 4.8 committed 2026-06-21 09:32:03 +02:00
1 parent af93e362e0
commit 524faf4a7a
10 files changed
+32 -303

No files matched your search

-4
View File
@@ -18,7 +18,6 @@ export interface NetworkMetricCached {
caParMagasinReseau: number;
couvertureStockReseau: number;
margePctReseau: number;
rupturePctReseau: number;
fetchedAt: string | null;
}
@@ -43,7 +42,6 @@ export async function getNetworkMetricsByCodeCentrale(
caParMagasinReseau: Number(r.caParMagasinReseau ?? 0) || 0,
couvertureStockReseau: Number(r.couvertureStockReseau ?? 0) || 0,
margePctReseau: Number(r.margePctReseau ?? 0) || 0,
rupturePctReseau: Number(r.rupturePctReseau ?? 0) || 0,
fetchedAt: r.fetchedAt ? new Date(r.fetchedAt).toISOString() : null,
});
}
@@ -62,7 +60,6 @@ export async function upsertNetworkMetrics(metrics: NetworkMetric[]): Promise<nu
caParMagasinReseau: String(m.caParMagasinReseau),
couvertureStockReseau: String(m.couvertureStockReseau),
margePctReseau: String(m.margePctReseau),
rupturePctReseau: String(m.rupturePctReseau),
periode: m.periode ?? null,
fetchedAt: now,
}));
@@ -84,7 +81,6 @@ export async function upsertNetworkMetrics(metrics: NetworkMetric[]): Promise<nu
caParMagasinReseau: sql`excluded.ca_par_magasin_reseau`,
couvertureStockReseau: sql`excluded.couverture_stock_reseau`,
margePctReseau: sql`excluded.marge_pct_reseau`,
rupturePctReseau: sql`excluded.rupture_pct_reseau`,
periode: sql`excluded.periode`,
fetchedAt: sql`excluded.fetched_at`,
},