mirror of
https://github.com/R0m1k3/CollectFlow.git
synced 2026-10-11 17:26:32 +02:00
fix: correct SQL parameterization in analytics queries and use distinct icons
- pg-ff-client: replace ANY(ARRAY[...]) with IN(...) for Drizzle compatibility - sidebar: change Analytics icon from BarChart2 (duplicate) to TrendingUp Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com> EOF
This commit is contained in:
1 parent
740aed3181
commit
d8a9bf80a0
2 files changed
+4
-4
No files matched your search
@@ -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 },
|
||||
|
||||
@@ -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')
|
||||
|
||||
Reference in new issue
Block a user