diff --git a/src/features/grid/components/floating-summary-bar.tsx b/src/features/grid/components/floating-summary-bar.tsx index 7f201b0..010b689 100644 --- a/src/features/grid/components/floating-summary-bar.tsx +++ b/src/features/grid/components/floating-summary-bar.tsx @@ -145,6 +145,10 @@ export function FloatingSummaryBar() {
+ { const heatClass = getHeatmapClass(value); - const display = value === null || value === 0 ? "—" : Math.round(Math.abs(value)).toString(); + const display = value === null || value === 0 ? "0" : Math.round(Math.abs(value)).toString(); return (
): const totalCa = active.reduce((s, r) => s + (r.totalCa ?? 0), 0); const totalMarge = active.reduce((s, r) => s + (r.totalMarge ?? 0), 0); return { + totalProducts: rows.length, totalRows: active.length, totalQuantite: active.reduce((s, r) => s + (r.totalQuantite ?? 0), 0), totalCa, @@ -65,6 +66,7 @@ export const useGridStore = create()( search: "", }, summary: { + totalProducts: 0, totalRows: 0, totalQuantite: 0, totalCa: 0, diff --git a/src/types/grid.ts b/src/types/grid.ts index 7487355..294d8b9 100644 --- a/src/types/grid.ts +++ b/src/types/grid.ts @@ -70,6 +70,7 @@ export interface ProductRow { /** Summary bar totals for the currently visible/filtered rows */ export interface GridSummary { + totalProducts: number; totalRows: number; totalQuantite: number; totalCa: number;