From 56abb5e188afe0561d0471f99e8ac361406015b7 Mon Sep 17 00:00:00 2001 From: Matt Date: Sat, 21 Dec 2024 19:25:00 -0500 Subject: [PATCH] Standardize sort/toggle buttons --- .../src/components/dashboard/ProductGrid.jsx | 48 ++-- .../src/components/dashboard/SalesChart.jsx | 210 +++++++++--------- 2 files changed, 126 insertions(+), 132 deletions(-) diff --git a/dashboard/src/components/dashboard/ProductGrid.jsx b/dashboard/src/components/dashboard/ProductGrid.jsx index 1ba74d8..f1717a9 100644 --- a/dashboard/src/components/dashboard/ProductGrid.jsx +++ b/dashboard/src/components/dashboard/ProductGrid.jsx @@ -222,56 +222,40 @@ const ProductGrid = ({ - + - + - + - + diff --git a/dashboard/src/components/dashboard/SalesChart.jsx b/dashboard/src/components/dashboard/SalesChart.jsx index db4d112..b12243f 100644 --- a/dashboard/src/components/dashboard/SalesChart.jsx +++ b/dashboard/src/components/dashboard/SalesChart.jsx @@ -694,66 +694,71 @@ const SalesChart = ({ Daily Details
- value && key !== "showPrevious") - .map(([key]) => key)} - onValueChange={(values) => { - setMetrics((prev) => ({ - ...prev, - revenue: values.includes("revenue"), - orders: values.includes("orders"), - movingAverage: values.includes("movingAverage"), - avgOrderValue: values.includes("avgOrderValue"), - })); - }} - > - - Revenue - - - Orders - - - 7-Day Avg - - - AOV - - - - - -
+
+ + +
+ + + +
@@ -867,66 +872,71 @@ const SalesChart = ({ {/* Metric Toggles */}
- value && key !== "showPrevious") - .map(([key]) => key)} - onValueChange={(values) => { - setMetrics((prev) => ({ - ...prev, - revenue: values.includes("revenue"), - orders: values.includes("orders"), - movingAverage: values.includes("movingAverage"), - avgOrderValue: values.includes("avgOrderValue"), - })); - }} - > - - Revenue - - - Orders - - - 7-Day Avg - - - AOV - - - - - -
+
+ + +
+ + + +