diff --git a/src/components/shared/sidebar.tsx b/src/components/shared/sidebar.tsx index 01c7cee..3c682fe 100644 --- a/src/components/shared/sidebar.tsx +++ b/src/components/shared/sidebar.tsx @@ -1,6 +1,6 @@ "use client"; -import { LayoutGrid, Camera, FileDown, Settings, Package, BarChart2, LogOut, User as UserIcon, Loader2, ChevronRight, ChevronLeft } from "lucide-react"; +import { LayoutGrid, Camera, FileDown, Settings, Package, BarChart2, TrendingUp, LogOut, User as UserIcon, Loader2, ChevronRight, ChevronLeft } from "lucide-react"; import Link from "next/link"; import { usePathname } from "next/navigation"; import { cn } from "@/lib/utils"; @@ -11,7 +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: TrendingUp, 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 }, diff --git a/src/lib/pg-ff-client.ts b/src/lib/pg-ff-client.ts index 8115f4d..0181344 100644 --- a/src/lib/pg-ff-client.ts +++ b/src/lib/pg-ff-client.ts @@ -655,7 +655,7 @@ export async function pgGetCaByFournisseur( JOIN articles a ON a.no_id = m.artnoid JOIN artfou1 af ON af.art_no_id = a.no_id JOIN fouadr1 f ON f.code = af.code AND f.sit_code = '000' - WHERE TO_CHAR(m.datmvt, 'YYYY-MM') = ANY(ARRAY[${mois}, ${moisN1}]) + WHERE TO_CHAR(m.datmvt, 'YYYY-MM') IN (${mois}, ${moisN1}) AND m.site IN ('292', '579') AND m.genremvt = 3 GROUP BY af.code, m.site, TO_CHAR(m.datmvt, 'YYYY-MM') @@ -683,7 +683,7 @@ export async function pgGetCaByNomenclature( FROM mvtart m JOIN articles a ON a.no_id = m.artnoid JOIN nomenclature n ON n.no_id = a.nom_no_id - WHERE TO_CHAR(m.datmvt, 'YYYY-MM') = ANY(ARRAY[${mois}, ${moisN1}]) + WHERE TO_CHAR(m.datmvt, 'YYYY-MM') IN (${mois}, ${moisN1}) AND m.site IN ('292', '579') AND m.genremvt = 3 GROUP BY n.code, n.libelle, m.site, TO_CHAR(m.datmvt, 'YYYY-MM')