From f21f38f80586c25d71fe9f8b7844d3b3060a5e4f Mon Sep 17 00:00:00 2001 From: Michael SCHAL Date: Wed, 8 Apr 2026 16:47:39 +0200 Subject: [PATCH] feat: add client-side component to display and filter automatic order data by site --- src/app/(dashboard)/commandes-auto/client.tsx | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/src/app/(dashboard)/commandes-auto/client.tsx b/src/app/(dashboard)/commandes-auto/client.tsx index 1621b14..6e2fe41 100644 --- a/src/app/(dashboard)/commandes-auto/client.tsx +++ b/src/app/(dashboard)/commandes-auto/client.tsx @@ -23,7 +23,7 @@ function SortIcon({ col, sortKey, sortDir }: { col: string; sortKey: string; sor } type SK = keyof PgCommandeAutoRow; -const NUMERIC: SK[] = ["franco", "nb_articles", "montant_cde", "ecart_franco"]; +const NUMERIC: SK[] = ["franco", "nb_articles", "montant_cde"]; function FrancoCell({ atteint, ecart, franco }: { atteint: boolean | null; ecart: number; franco: number }) { if (franco === 0 || atteint === null) { @@ -128,13 +128,13 @@ function StoreTable({ site, label, rows }: { site: string; label: string; rows: Statut franco - {th("ecart_franco", "Écart", true)} + {sorted.length === 0 && ( - + Aucun fournisseur en commande automatique @@ -171,17 +171,6 @@ function StoreTable({ site, label, rows }: { site: string; label: string; rows: franco={Number(row.franco)} /> - - {hasFranco - ? (Number(row.ecart_franco) > 0 - ? `−${fmt(Number(row.ecart_franco))}` - : `+${fmt(Math.abs(Number(row.ecart_franco)))}`) - : "—"} - ); })}