diff --git a/inventory/src/components/dashboard/BestSellers.tsx b/inventory/src/components/dashboard/BestSellers.tsx index 105573f..fca9da0 100644 --- a/inventory/src/components/dashboard/BestSellers.tsx +++ b/inventory/src/components/dashboard/BestSellers.tsx @@ -53,16 +53,19 @@ export function BestSellers() { return ( <> - Best Sellers +
+ Best Sellers + + + Products + Vendors + Categories + + +
- - Products - Vendors - Categories - - diff --git a/inventory/src/components/dashboard/ForecastMetrics.tsx b/inventory/src/components/dashboard/ForecastMetrics.tsx index f10ac36..5db4cde 100644 --- a/inventory/src/components/dashboard/ForecastMetrics.tsx +++ b/inventory/src/components/dashboard/ForecastMetrics.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 { TrendingUp, DollarSign } from "lucide-react" // Importing icons interface ForecastData { forecastSales: number @@ -41,7 +42,7 @@ export function ForecastMetrics() { return ( <> - Sales Forecast + Forecast -
-
-

Forecast Sales

+
+
+
+ +

Forecast Sales

+

{data?.forecastSales.toLocaleString() || 0}

-
-

Forecast Revenue

+
+
+ +

Forecast Revenue

+

{formatCurrency(data?.forecastRevenue || 0)}

diff --git a/inventory/src/components/dashboard/OverstockMetrics.tsx b/inventory/src/components/dashboard/OverstockMetrics.tsx index 37686f3..8a405df 100644 --- a/inventory/src/components/dashboard/OverstockMetrics.tsx +++ b/inventory/src/components/dashboard/OverstockMetrics.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, Layers, DollarSign, ShoppingCart } from "lucide-react" interface OverstockMetricsData { overstockedProducts: number @@ -32,71 +32,39 @@ export function OverstockMetrics() { return ( <> - Overstock Overview + Overstock -
-
-

Overstocked Products

+
+
+
+ +

Overstocked Products

+

{data?.overstockedProducts.toLocaleString() || 0}

-
-

Overstocked Units

+
+
+ +

Overstocked Units

+

{data?.overstockedUnits.toLocaleString() || 0}

-
-

Total Cost

+
+
+ +

Overstocked Cost

+

{formatCurrency(data?.overstockedCost || 0)}

-
-

Total Retail

+
+
+ +

Overstocked 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}

+
+
+
+ +

On Order Units

+
+

{data?.onOrderUnits.toLocaleString() || 0}

+
+
+
+ +

On Order Cost

+
+

{formatCurrency(data?.onOrderCost || 0)}

+
+
+
+ +

On Order Retail

+
+

{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

+
+
+
+ +

Units to Replenish

+

{data?.totalUnitsToReplenish.toLocaleString() || 0}

-
-

Total Cost

+
+
+ +

Replenishment 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

+
+
+
+ +

Total Orders

+

{data?.totalOrders.toLocaleString() || 0}

-
-

Units Sold

+
+
+ +

Units Sold

+

{data?.totalUnitsSold.toLocaleString() || 0}

-
-

Cost of Goods

+
+
+ +

Cost of Goods

+

{formatCurrency(data?.totalCogs || 0)}

-
-

Revenue

+
+
+ +

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}

+
+
+
+
+
+ +

Products

+
+

{data?.totalProducts.toLocaleString() || 0}

+
+
+
+ +

Products In Stock

+
+

{data?.productsInStock.toLocaleString() || 0}

+
+
+
+ +

Stock Units

+
+

{data?.totalStockUnits.toLocaleString() || 0}

+
+
+
+ +

Stock Cost

+
+

{formatCurrency(data?.totalStockCost || 0)}

+
+
+
+ +

Stock Retail

+
+

{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() { -
+