From cefe6060d050b46dfb372f2d8f02f54bc93a08ba Mon Sep 17 00:00:00 2001 From: Michael SCHAL Date: Wed, 18 Mar 2026 20:52:13 +0100 Subject: [PATCH] feat: implement virtualized heatmap grid component using TanStack Table and Virtual for product data display. --- src/features/grid/components/heatmap-grid.tsx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/features/grid/components/heatmap-grid.tsx b/src/features/grid/components/heatmap-grid.tsx index bf3bb12..aa63fc7 100644 --- a/src/features/grid/components/heatmap-grid.tsx +++ b/src/features/grid/components/heatmap-grid.tsx @@ -51,10 +51,16 @@ function formatMonthLabel(key: string): string { * Returns premium styling and color for stores based on the store name's hash. * This guarantees a consistent color for a given store, regardless of its position in the list. */ +const SITE_LABELS: Record = { + "292": { label: "F", nom: "Frouard (Nancy)" }, + "579": { label: "H", nom: "Houdemont" }, +}; + function getStoreConfig(name: string) { - const words = name.trim().split(/\s+/); - let label = words[0].charAt(0).toUpperCase(); - if (words.length > 1) { + const known = SITE_LABELS[name]; + const words = (known?.nom ?? name).trim().split(/\s+/); + let label = known?.label ?? words[0].charAt(0).toUpperCase(); + if (!known && words.length > 1) { label += words[1].charAt(0).toUpperCase(); } @@ -347,7 +353,7 @@ export function HeatmapGrid({ onSelectionChange }: HeatmapGridProps) { return (