From 621438db55ffeb41111be0fd2cb5d7bd0528c0d4 Mon Sep 17 00:00:00 2001 From: Matt Date: Sat, 21 Dec 2024 18:50:31 -0500 Subject: [PATCH] Update header row --- .../src/components/dashboard/ProductGrid.jsx | 277 ++++++++++-------- 1 file changed, 147 insertions(+), 130 deletions(-) diff --git a/dashboard/src/components/dashboard/ProductGrid.jsx b/dashboard/src/components/dashboard/ProductGrid.jsx index e7298c3..83e60bc 100644 --- a/dashboard/src/components/dashboard/ProductGrid.jsx +++ b/dashboard/src/components/dashboard/ProductGrid.jsx @@ -316,7 +316,7 @@ const ProductGrid = ({ - +
{loading && !products.length ? ( ) : error ? ( @@ -332,137 +332,154 @@ const ProductGrid = ({

Try selecting a different time range

) : ( - - - - {columnVisibility.image && ( - - )} - {columnVisibility.name && ( - - - - )} - {columnVisibility.totalQuantity && ( - - - - )} - {columnVisibility.totalRevenue && ( - - - - )} - {columnVisibility.orderCount && ( - - - - )} - {columnVisibility.price && ( - - - - )} - - - - {filteredProducts.map((product) => ( - - {columnVisibility.image && ( - - {product.ImgThumb && ( - (e.target.style.display = "none")} - /> - )} - - )} - {columnVisibility.name && ( - -
+ + + {columnVisibility.image && ( +
+ )} + {columnVisibility.name && ( + +
+ Product + + + )} + {columnVisibility.totalQuantity && ( + + + + )} + {columnVisibility.totalRevenue && ( + + + + )} + {columnVisibility.orderCount && ( + + + + )} + {columnVisibility.price && ( + + + + )} + + + + {filteredProducts.map((product) => ( + + {columnVisibility.image && ( + + {product.ImgThumb && ( + (e.target.style.display = "none")} + /> + )} + + )} + {columnVisibility.name && ( + +
+ + {product.name} + + +
+ + )} + {columnVisibility.totalQuantity && ( + + {product.totalQuantity} + + )} + {columnVisibility.totalRevenue && ( + + ${product.totalRevenue.toFixed(2)} + + )} + {columnVisibility.orderCount && ( + + {product.orderCount} + + )} + {columnVisibility.price && ( + + ${product.price.toFixed(2)} + + )} + + ))} + + + + )} -
+ );