-
Total Cost
+
+
{formatCurrency(data?.overstockedCost || 0)}
-
-
Total Retail
+
+
{formatCurrency(data?.overstockedRetail || 0)}
-
-
-
-
-
- value.toLocaleString()}
- />
- [
- name === "cost" ? formatCurrency(value) : value.toLocaleString(),
- name === "cost" ? "Cost" : name === "products" ? "Products" : "Units"
- ]}
- labelFormatter={(label) => `Category: ${label}`}
- />
-
-
-
-
-
-
>
)
diff --git a/inventory/src/components/dashboard/PurchaseMetrics.tsx b/inventory/src/components/dashboard/PurchaseMetrics.tsx
index 311126c..72274e6 100644
--- a/inventory/src/components/dashboard/PurchaseMetrics.tsx
+++ b/inventory/src/components/dashboard/PurchaseMetrics.tsx
@@ -3,6 +3,7 @@ import { CardHeader, CardTitle, CardContent } from "@/components/ui/card"
import { PieChart, Pie, ResponsiveContainer, Cell, Tooltip } from "recharts"
import config from "@/config"
import { formatCurrency } from "@/lib/utils"
+import { ClipboardList, AlertCircle, Layers, DollarSign, ShoppingCart } from "lucide-react" // Importing icons
interface PurchaseMetricsData {
activePurchaseOrders: number
@@ -45,58 +46,81 @@ export function PurchaseMetrics() {
return (
<>
- Purchase Overview
+ Purchases
-
-
-
Active Orders
-
{data?.activePurchaseOrders.toLocaleString() || 0}
+
+
+
+
+
+
+
Active Purchase Orders
+
+
{data?.activePurchaseOrders.toLocaleString() || 0}
+
+
+
+
+
Overdue Purchase Orders
+
+
{data?.overduePurchaseOrders.toLocaleString() || 0}
+
+
+
+
{data?.onOrderUnits.toLocaleString() || 0}
+
+
+
+
{formatCurrency(data?.onOrderCost || 0)}
+
+
+
+
{formatCurrency(data?.onOrderRetail || 0)}
+
+
-
-
Overdue Orders
-
{data?.overduePurchaseOrders.toLocaleString() || 0}
+
+
+
Purchase Orders By Vendor
+
+
+
+
+ {data?.vendorOrders?.map((entry, index) => (
+ |
+ ))}
+
+ formatCurrency(value)}
+ labelFormatter={(label: string) => `Vendor: ${label}`}
+ />
+
+
+
+
-
-
Units On Order
-
{data?.onOrderUnits.toLocaleString() || 0}
-
-
-
Order Cost
-
{formatCurrency(data?.onOrderCost || 0)}
-
-
-
Order Retail
-
{formatCurrency(data?.onOrderRetail || 0)}
-
-
-
-
-
-
-
- {data?.vendorOrders?.map((entry, index) => (
- |
- ))}
-
- formatCurrency(value)}
- labelFormatter={(label: string) => `Vendor: ${label}`}
- />
-
-
>
diff --git a/inventory/src/components/dashboard/ReplenishmentMetrics.tsx b/inventory/src/components/dashboard/ReplenishmentMetrics.tsx
index 7712ae2..80502b6 100644
--- a/inventory/src/components/dashboard/ReplenishmentMetrics.tsx
+++ b/inventory/src/components/dashboard/ReplenishmentMetrics.tsx
@@ -1,8 +1,8 @@
import { useQuery } from "@tanstack/react-query"
import { CardHeader, CardTitle, CardContent } from "@/components/ui/card"
-import { BarChart, Bar, ResponsiveContainer, XAxis, YAxis, Tooltip } from "recharts"
import config from "@/config"
import { formatCurrency } from "@/lib/utils"
+import { Package, DollarSign, ShoppingCart } from "lucide-react" // Importing icons
interface ReplenishmentMetricsData {
totalUnitsToReplenish: number
@@ -30,61 +30,32 @@ export function ReplenishmentMetrics() {
return (
<>
- Replenishment Overview
+ Replenishment
-
-
-
Units to Replenish
+
+
+
{data?.totalUnitsToReplenish.toLocaleString() || 0}
-
-
Total Cost
+
+
{formatCurrency(data?.totalReplenishmentCost || 0)}
-
-
Total Retail
+
+
+
+
Replenishment Retail
+
{formatCurrency(data?.totalReplenishmentRetail || 0)}
-
-
-
-
-
- value.toLocaleString()}
- />
- [
- name === "cost" ? formatCurrency(value) : value.toLocaleString(),
- name === "cost" ? "Cost" : "Units"
- ]}
- labelFormatter={(label) => `Category: ${label}`}
- />
-
-
-
-
-
>
)
diff --git a/inventory/src/components/dashboard/SalesMetrics.tsx b/inventory/src/components/dashboard/SalesMetrics.tsx
index adf0ea3..477fb14 100644
--- a/inventory/src/components/dashboard/SalesMetrics.tsx
+++ b/inventory/src/components/dashboard/SalesMetrics.tsx
@@ -5,6 +5,7 @@ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@
import { useState } from "react"
import config from "@/config"
import { formatCurrency } from "@/lib/utils"
+import { ClipboardList, Package, DollarSign, ShoppingCart } from "lucide-react"
interface SalesData {
totalOrders: number
@@ -44,7 +45,7 @@ export function SalesMetrics() {
return (
<>
- Sales Overview
+ Sales Overview
-
-
-
Total Orders
+
+
+
{data?.totalOrders.toLocaleString() || 0}
-
-
Units Sold
+
+
{data?.totalUnitsSold.toLocaleString() || 0}
-
-
Cost of Goods
+
+
{formatCurrency(data?.totalCogs || 0)}
-
-
Revenue
+
+
{formatCurrency(data?.totalRevenue || 0)}
diff --git a/inventory/src/components/dashboard/StockMetrics.tsx b/inventory/src/components/dashboard/StockMetrics.tsx
index cd9518f..53d0d5e 100644
--- a/inventory/src/components/dashboard/StockMetrics.tsx
+++ b/inventory/src/components/dashboard/StockMetrics.tsx
@@ -3,6 +3,7 @@ import { CardHeader, CardTitle, CardContent } from "@/components/ui/card"
import { PieChart, Pie, ResponsiveContainer, Cell, Tooltip } from "recharts"
import config from "@/config"
import { formatCurrency } from "@/lib/utils"
+import { Package, Layers, DollarSign, ShoppingCart } from "lucide-react" // Importing icons
interface StockMetricsData {
totalProducts: number
@@ -45,58 +46,81 @@ export function StockMetrics() {
return (
<>
- Stock Overview
+ Stock
-
-
-
Total Products
-
{data?.totalProducts.toLocaleString() || 0}
+
+
+
+
+
+
{data?.totalProducts.toLocaleString() || 0}
+
+
+
+
{data?.productsInStock.toLocaleString() || 0}
+
+
+
+
{data?.totalStockUnits.toLocaleString() || 0}
+
+
+
+
{formatCurrency(data?.totalStockCost || 0)}
+
+
+
+
{formatCurrency(data?.totalStockRetail || 0)}
+
+
-
-
Products In Stock
-
{data?.productsInStock.toLocaleString() || 0}
+
+
+
Stock Retail By Brand
+
+
+
+
+ {data?.vendorStock?.map((entry, index) => (
+ |
+ ))}
+
+ formatCurrency(value)}
+ labelFormatter={(label: string) => `Vendor: ${label}`}
+ />
+
+
+
+
-
-
Total Stock Units
-
{data?.totalStockUnits.toLocaleString() || 0}
-
-
-
Total Stock Cost
-
{formatCurrency(data?.totalStockCost || 0)}
-
-
-
Total Stock Retail
-
{formatCurrency(data?.totalStockRetail || 0)}
-
-
-
-
-
-
-
- {data?.vendorStock?.map((entry, index) => (
- |
- ))}
-
- formatCurrency(value)}
- labelFormatter={(label: string) => `Vendor: ${label}`}
- />
-
-
>
diff --git a/inventory/src/components/dashboard/TopOverstockedProducts.tsx b/inventory/src/components/dashboard/TopOverstockedProducts.tsx
index fc6fc08..ec6e175 100644
--- a/inventory/src/components/dashboard/TopOverstockedProducts.tsx
+++ b/inventory/src/components/dashboard/TopOverstockedProducts.tsx
@@ -30,10 +30,10 @@ export function TopOverstockedProducts() {
return (
<>
- Top Overstocked Products
+ Top Overstocked Products
-
+
diff --git a/inventory/src/components/dashboard/TopReplenishProducts.tsx b/inventory/src/components/dashboard/TopReplenishProducts.tsx
index 6fc7c3c..ad8afd5 100644
--- a/inventory/src/components/dashboard/TopReplenishProducts.tsx
+++ b/inventory/src/components/dashboard/TopReplenishProducts.tsx
@@ -31,10 +31,10 @@ export function TopReplenishProducts() {
return (
<>
- Top Products to Replenish
+ Top Products To Replenish
-
+
diff --git a/inventory/src/components/layout/AppSidebar.tsx b/inventory/src/components/layout/AppSidebar.tsx
index 3430de5..11a3c01 100644
--- a/inventory/src/components/layout/AppSidebar.tsx
+++ b/inventory/src/components/layout/AppSidebar.tsx
@@ -26,7 +26,7 @@ import { useLocation, useNavigate, Link } from "react-router-dom";
const items = [
{
- title: "Dashboard",
+ title: "Overview",
icon: Home,
url: "/",
},
diff --git a/inventory/src/pages/Dashboard.tsx b/inventory/src/pages/Dashboard.tsx
index 8b586f2..36d6a7d 100644
--- a/inventory/src/pages/Dashboard.tsx
+++ b/inventory/src/pages/Dashboard.tsx
@@ -14,7 +14,7 @@ export function Dashboard() {
return (
-
Dashboard
+ Overview
{/* First row - Stock and Purchase metrics */}
@@ -32,7 +32,7 @@ export function Dashboard() {
-