ui(grid): simplify Gamme options to letters and center the column header

This commit is contained in:
Michael committed 2026-02-21 15:16:15 +01:00
1 parent 86240f4b46
commit b9311503b2
2 files changed
+6 -6

No files matched your search

@@ -31,10 +31,10 @@ export function GammeSelect({ value, isDraft, onChange }: GammeSelectProps) {
)} )}
> >
<option value="" disabled>—</option> <option value="" disabled>—</option>
<option value="A">A - Cœur</option> <option value="A">A</option>
<option value="B">B - Standard</option> <option value="B">B</option>
<option value="C">C - Optionnel</option> <option value="C">C</option>
<option value="Z">Z - Sortie</option> <option value="Z">Z</option>
</select> </select>
); );
} }
@@ -205,7 +205,7 @@ export function HeatmapGrid({ onSelectionChange }: HeatmapGridProps) {
}, },
{ {
id: "gamme", id: "gamme",
header: "Gamme", header: () => <div className="text-center w-full">Gamme</div>,
size: 110, size: 110,
cell: ({ row }) => { cell: ({ row }) => {
const effectiveGamme = (draftChanges[row.original.codein] ?? row.original.codeGamme) as GammeCode | null; const effectiveGamme = (draftChanges[row.original.codein] ?? row.original.codeGamme) as GammeCode | null;
@@ -281,7 +281,7 @@ export function HeatmapGrid({ onSelectionChange }: HeatmapGridProps) {
<tr key={headerGroup.id} className="flex w-full"> <tr key={headerGroup.id} className="flex w-full">
{headerGroup.headers.map((header) => { {headerGroup.headers.map((header) => {
const isFlexible = header.column.id === "libelle1" || header.column.id === "ai" || header.column.id === "libelle3"; const isFlexible = header.column.id === "libelle1" || header.column.id === "ai" || header.column.id === "libelle3";
const isCenter = header.column.id === "totalQuantite" || header.column.id === "financial" || header.column.id.startsWith("month_") || header.column.id === "gammeInitial" || header.column.id === "score"; const isCenter = header.column.id === "totalQuantite" || header.column.id === "financial" || header.column.id.startsWith("month_") || header.column.id === "gammeInitial" || header.column.id === "score" || header.column.id === "gamme";
const size = header.getSize(); const size = header.getSize();
return ( return (
<th <th