mirror of
https://github.com/R0m1k3/CollectFlow.git
synced 2026-10-14 02:37:55 +02:00
feat: implement hit-parade dashboard with interactive filtering, sorting, and data visualization components
This commit is contained in:
1 parent
2c02807493
commit
9469738ef0
3 files changed
+20
-6
No files matched your search
@@ -717,6 +717,7 @@ export interface HitParadeRow {
|
||||
codein: string;
|
||||
libelle: string;
|
||||
fournisseur: string;
|
||||
nomenclature_code: string;
|
||||
nomenclature: string;
|
||||
site: string;
|
||||
qte_vendue: number;
|
||||
@@ -739,6 +740,7 @@ export async function pgGetHitParade(dateDebut: string, dateFin: string): Promis
|
||||
a.codein::text AS codein,
|
||||
a.libelle1::text AS libelle,
|
||||
COALESCE(fi.nom, af.code, 'Sans fournisseur')::text AS fournisseur,
|
||||
COALESCE(n.code, '')::text AS nomenclature_code,
|
||||
COALESCE(n.libelle, 'Sans nomenclature')::text AS nomenclature,
|
||||
m.site,
|
||||
SUM(ABS(m.qtemvt))::float AS qte_vendue,
|
||||
@@ -752,7 +754,7 @@ export async function pgGetHitParade(dateDebut: string, dateFin: string): Promis
|
||||
WHERE m.datmvt BETWEEN ${dateDebut}::date AND ${dateFin}::date
|
||||
AND m.site IN ('292', '579')
|
||||
AND m.genremvt = 3
|
||||
GROUP BY a.no_id, a.codein, a.libelle1, fi.nom, af.code, n.libelle, m.site
|
||||
GROUP BY a.no_id, a.codein, a.libelle1, fi.nom, af.code, n.code, n.libelle, m.site
|
||||
),
|
||||
stock_agg AS (
|
||||
SELECT
|
||||
@@ -768,6 +770,7 @@ export async function pgGetHitParade(dateDebut: string, dateFin: string): Promis
|
||||
v.codein,
|
||||
v.libelle,
|
||||
v.fournisseur,
|
||||
v.nomenclature_code,
|
||||
v.nomenclature,
|
||||
v.site,
|
||||
v.qte_vendue,
|
||||
|
||||
Reference in new issue
Block a user