- {metrics.map((metric, index) => (
-
- ))}
+ {/* Bottom Alerts/Inventory/Suppliers */}
+
-
- {/* Main chart sections */}
-
- {/* Inventory and Production charts */}
-
- {/* Supply Chain Visibility */}
-
-
-
-
- {/* Inventory Status Chart */}
-
-
- {/* Bottom Alerts/Inventory/Suppliers */}
-
-
+
);
}
diff --git a/src/components/molecules/DashboardTabs.tsx b/src/components/molecules/DashboardTabs.tsx
index 89e51b7..0a54097 100644
--- a/src/components/molecules/DashboardTabs.tsx
+++ b/src/components/molecules/DashboardTabs.tsx
@@ -1,61 +1,37 @@
"use client";
import { useState } from "react";
+import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs";
import DashboardPage from "./Dashboard";
import Inventory from "../organism/Inventory";
import Production from "../organism/Production";
-import BlockChain from "../organism/bloackchain";
-
-
-const tabs = ["Overview", "Inventory", "Production", "Blockchain"];
+import BlockChain from "../organism/blockchain";
const DashboardTabs = () => {
- const [activeTab, setActiveTab] = useState("Overview");
-
- const renderTabContent = () => {
- switch (activeTab) {
- case "Overview":
- return
;
- default:
- return null;
- }
- };
+ const [activeTab, setActiveTab] = useState("overview");
return (
-
- {/* Header */}
+
Dashboard
Overview of your supply chain operations and blockchain transactions
-
- {/* Tabs */}
-
- {tabs.map((tab) => (
-
- ))}
+
+
+
+ Overview
+ Inventory
+ Production
+ Blockchain
+
+
-
- {/* Dynamic content */}
-
{renderTabContent()}
);
};
diff --git a/src/components/organism/Inventory.tsx b/src/components/organism/Inventory.tsx
index d5c9d37..e72a67a 100644
--- a/src/components/organism/Inventory.tsx
+++ b/src/components/organism/Inventory.tsx
@@ -5,8 +5,6 @@ import WarehouseDistribution from "../molecules/WarehouseDistribution";
import InventoryStartCards from "../molecules/InventoryStartCards";
import RecentMovements from "../molecules/RecentMovements";
-
-
export default function Inventory() {
return (
@@ -23,5 +21,5 @@ export default function Inventory() {
- )
+ );
}
diff --git a/src/components/organism/SupplierTab.tsx b/src/components/organism/SupplierTab.tsx
index b48e3ed..8c113b8 100644
--- a/src/components/organism/SupplierTab.tsx
+++ b/src/components/organism/SupplierTab.tsx
@@ -2,27 +2,11 @@
import { useState } from "react";
import Supplier from "./Supplier";
-
-const tabs = ["Overview", "Suppliers", "Performance", "Contracts"];
+import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs";
const SupplierTabs = () => {
const [activeTab, setActiveTab] = useState("Overview");
- const renderTabContent = () => {
- switch (activeTab) {
- case "Overview":
- return
;
- case "Suppliers":
- return
Suppliers
;
- case "Performance":
- return
Performance
;
- case "Contracts":
- return
Contracts
;
- default:
- return null;
- }
- };
-
return (
{/* Header */}
@@ -34,24 +18,20 @@ const SupplierTabs = () => {
{/* Tabs */}
-
- {tabs.map((tab) => (
-
- ))}
+
+
+
+ Overview
+ Shipment
+ Tracking
+ Carriers
+
+
-
- {/* Dynamic content */}
-
{renderTabContent()}
);
};
diff --git a/src/components/organism/bloackchain.tsx b/src/components/organism/blockchain.tsx
similarity index 100%
rename from src/components/organism/bloackchain.tsx
rename to src/components/organism/blockchain.tsx
diff --git a/src/components/ui/tabs.tsx b/src/components/ui/tabs.tsx
index 497ba5e..bd0423d 100644
--- a/src/components/ui/tabs.tsx
+++ b/src/components/ui/tabs.tsx
@@ -1,9 +1,9 @@
-"use client"
+"use client";
-import * as React from "react"
-import * as TabsPrimitive from "@radix-ui/react-tabs"
+import * as React from "react";
+import * as TabsPrimitive from "@radix-ui/react-tabs";
-import { cn } from "@/lib/utils"
+import { cn } from "@/lib/utils";
function Tabs({
className,
@@ -12,10 +12,10 @@ function Tabs({
return (
- )
+ );
}
function TabsList({
@@ -26,12 +26,12 @@ function TabsList({
- )
+ );
}
function TabsTrigger({
@@ -42,12 +42,12 @@ function TabsTrigger({
- )
+ );
}
function TabsContent({
@@ -57,10 +57,10 @@ function TabsContent({
return (
- )
+ );
}
-export { Tabs, TabsList, TabsTrigger, TabsContent }
+export { Tabs, TabsList, TabsTrigger, TabsContent };