mirror of
https://github.com/R0m1k3/CollectFlow.git
synced 2026-10-11 17:26:32 +02:00
feat: add analytics page with CA TTC comparison by supplier/nomenclature
- pg-ff-client: add pgGetCaByFournisseur() and pgGetCaByNomenclature() returning CA TTC per site and month for monthly N vs N-1 comparison - analytics/page.tsx: server component with pivot logic to reshape raw query data into store-separated columns (292/579/total) with evolution % - analytics/client.tsx: client controls (mode dropdown, month selector) and responsive table with color-coded evolution badges - sidebar: add "Analytics" link to navigation Features: - Switch between "Fournisseur" and "Nomenclature" views - Select any month for comparison vs same month prior year - Columns split by store: Frouard/Nancy (292), Houdemont (579), Total - Each store shows: CA this month, CA N-1, evolution % - Footer totals row matching sum of detail rows - FR locale currency formatting (€) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
7a30783285
commit
740aed3181
4 files changed
+483
No files matched your search
@@ -11,6 +11,7 @@ import { useSession, signOut } from "next-auth/react";
|
||||
const NAV_ITEMS = [
|
||||
{ icon: BarChart2, label: "Dashboard", href: "/dashboard" },
|
||||
{ icon: LayoutGrid, label: "Grille", href: "/grid" },
|
||||
{ icon: BarChart2, label: "Analytics", href: "/analytics" },
|
||||
{ icon: Camera, label: "Snapshots", href: "/snapshots" },
|
||||
{ icon: FileDown, label: "Exports", href: "/exports" },
|
||||
{ icon: Settings, label: "Paramètres", href: "/settings", adminOnly: true },
|
||||
|
||||
Reference in new issue
Block a user