From 5f364f7d522f44fd6b01b5e3ec05cff48476a910 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 21 Jun 2026 09:38:14 +0200 Subject: [PATCH] feat(grid): refine grid page chrome (refined dense-pro, theme kept) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Redesign the grid page shell while preserving the Slate/teal Apple theme: - header reworked into a branded bar: teal accent marker + uppercase eyebrow + supplier name as the hero, with "Magasin" and "Références" metric pills - loading/error state shown as a teal (or error-red) accent chip - "Valider" save button restyled with the brand gradient + soft shadow - grid container radius/shadow aligned to the apple-card system No change to table cell logic or the network columns. Co-Authored-By: Claude Opus 4.8 --- src/features/grid/components/grid-client.tsx | 71 ++++++++++++++----- src/features/grid/components/heatmap-grid.tsx | 4 +- 2 files changed, 57 insertions(+), 18 deletions(-) diff --git a/src/features/grid/components/grid-client.tsx b/src/features/grid/components/grid-client.tsx index a8829d7..246bdb4 100644 --- a/src/features/grid/components/grid-client.tsx +++ b/src/features/grid/components/grid-client.tsx @@ -30,6 +30,27 @@ type GridRowsStreamMessage = | { type: "done"; loaded: number; total: number } | { type: "error"; error: string }; +/** Petite pastille métrique (libellé + valeur) — densité pro, thème Slate/teal. */ +function MetricPill({ label, value, accent = false }: { label: string; value: string; accent?: boolean }) { + return ( +
+ + {label} + + + {value} + +
+ ); +} + export function GridClient({ codeFournisseur, nomFournisseur, fournisseurs, magasins, magasin, filters }: GridClientProps) { const { data: session } = useSession(); const isAdmin = (session?.user as { role?: string } | undefined)?.role === "admin"; @@ -174,28 +195,42 @@ export function GridClient({ codeFournisseur, nomFournisseur, fournisseurs, maga return (
- {/* Header */} -
-
-

Révision d'Assortiment

-

- {nomFournisseur} - {" "}• {activeStoreNom} - {" "}• {totalRows?.toLocaleString("fr-FR") ?? rows.length.toLocaleString("fr-FR")} références -

+ {/* Header — chrome raffiné (eyebrow teal + fournisseur héro + pastilles métriques) */} +
+
+
+
+
+ Révision d'assortiment +
+

+ {nomFournisseur} +

+
+
+ + +
-
+
{(isLoadingRows || loadError) && (
{isLoadingRows && } {loadError ? loadError : totalRows ? `${rowsLoaded.toLocaleString("fr-FR")} / ${totalRows.toLocaleString("fr-FR")}` - : "Chargement produits..."} + : "Chargement…"}
)}
@@ -204,7 +239,11 @@ export function GridClient({ codeFournisseur, nomFournisseur, fournisseurs, maga )}
-
+
{/* Filters */}
diff --git a/src/features/grid/components/heatmap-grid.tsx b/src/features/grid/components/heatmap-grid.tsx index 7e69360..9e6a364 100644 --- a/src/features/grid/components/heatmap-grid.tsx +++ b/src/features/grid/components/heatmap-grid.tsx @@ -805,11 +805,11 @@ export function HeatmapGrid({ onSelectionChange, isAdmin }: HeatmapGridProps) {