mirror of
https://github.com/R0m1k3/CollectFlow.git
synced 2026-10-18 12:46:32 +02:00
feat: Implement core grid state management with Zustand, define grid data types, and introduce a heatmap cell component.
This commit is contained in:
1 parent
b408de4c9c
commit
f15fbe69ec
4 files changed
+8
-1
No files matched your search
@@ -42,6 +42,7 @@ function computeSummary(rows: ProductRow[], drafts: Record<string, GammeCode>):
|
||||
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<GridState>()(
|
||||
search: "",
|
||||
},
|
||||
summary: {
|
||||
totalProducts: 0,
|
||||
totalRows: 0,
|
||||
totalQuantite: 0,
|
||||
totalCa: 0,
|
||||
|
||||
Reference in new issue
Block a user