Tab Constant is added
This commit is contained in:
@@ -2,78 +2,14 @@
|
||||
|
||||
import { useState } from "react";
|
||||
import {
|
||||
LayoutGrid,
|
||||
CheckSquare,
|
||||
Crosshair,
|
||||
FileText,
|
||||
Box,
|
||||
Zap,
|
||||
ClipboardCheck,
|
||||
BarChart2,
|
||||
|
||||
Pencil,
|
||||
Plus,
|
||||
Sparkles,
|
||||
|
||||
} from "lucide-react";
|
||||
import { initialModules } from "@/constants/constant";
|
||||
import Button from "@/components/common/button";
|
||||
|
||||
// Mock Data matching the design
|
||||
const initialModules = [
|
||||
{
|
||||
id: "MOD-01",
|
||||
title: "Dashboard",
|
||||
description: "Operational overview & live KPIs",
|
||||
icon: LayoutGrid,
|
||||
menus: [], // Currently empty as per screenshot
|
||||
},
|
||||
{
|
||||
id: "MOD-02",
|
||||
title: "Helpdesk",
|
||||
description: "Tickets, requests & SLA tracking",
|
||||
icon: CheckSquare,
|
||||
menus: ["Tickets", "SLA Settings", "Queues"],
|
||||
},
|
||||
{
|
||||
id: "MOD-03",
|
||||
title: "Equipment",
|
||||
description: "Asset register & equipment groups",
|
||||
icon: Crosshair,
|
||||
menus: ["Asset Register", "Categories"],
|
||||
},
|
||||
{
|
||||
id: "MOD-04",
|
||||
title: "Request",
|
||||
description: "Service requests & approvals",
|
||||
icon: FileText,
|
||||
menus: ["My Requests", "Approvals"],
|
||||
},
|
||||
{
|
||||
id: "MOD-05",
|
||||
title: "Inventory",
|
||||
description: "Stock, spares & consumables",
|
||||
icon: Box,
|
||||
menus: ["Stock Levels", "Suppliers"],
|
||||
},
|
||||
{
|
||||
id: "MOD-06",
|
||||
title: "Energy",
|
||||
description: "Meters, consumption & analytics",
|
||||
icon: Zap,
|
||||
menus: ["Meters", "Analytics"],
|
||||
},
|
||||
{
|
||||
id: "MOD-07",
|
||||
title: "Inspections",
|
||||
description: "QR rounds & checklists",
|
||||
icon: ClipboardCheck,
|
||||
menus: ["Rounds", "Checklists"],
|
||||
},
|
||||
{
|
||||
id: "MOD-08",
|
||||
title: "Reports",
|
||||
description: "Analytics & export tools",
|
||||
icon: BarChart2,
|
||||
menus: ["Scheduled Reports", "Custom Builder"],
|
||||
},
|
||||
];
|
||||
|
||||
export default function ModulesPortal() {
|
||||
const [selectedModuleId, setSelectedModuleId] = useState("MOD-01");
|
||||
@@ -84,12 +20,12 @@ export default function ModulesPortal() {
|
||||
<div className="my-15 text-slate-100 font-saas">
|
||||
{/* Header Section */}
|
||||
<div className="mb-6">
|
||||
<div className="flex items-center gap-2 text-[10px] font-semibold tracking-wider text-slate-400 uppercase font-mono mb-1">
|
||||
<span>PLATFORM</span>
|
||||
<span>•</span>
|
||||
<span>MODULES</span>
|
||||
<div className="flex items-center gap-2 text-[12px] font-semibold tracking-wider text-slate-400 uppercase font-mono mb-1">
|
||||
<span className="text-gray-400">PLATFORM</span>
|
||||
<span className="text-gray-600">•</span>
|
||||
<span className="text-gray-400">MODULES</span>
|
||||
</div>
|
||||
<h1 className="text-3xl font-bold text-white tracking-tight">Modules</h1>
|
||||
<h1 className="text-2xl font-bold text-white tracking-tight">Modules</h1>
|
||||
<p className="text-sm text-slate-400 mt-1 max-w-2xl">
|
||||
The catalog of system modules and their menus. These are what you switch on per tenant under feature access.
|
||||
</p>
|
||||
@@ -107,10 +43,10 @@ export default function ModulesPortal() {
|
||||
{initialModules.length} available
|
||||
</span>
|
||||
</div>
|
||||
<button className="flex items-center gap-1.5 text-emerald-400 hover:text-emerald-300 text-xs font-semibold transition-colors">
|
||||
<Button className="flex items-center gap-1.5 text-emerald-400 hover:text-emerald-300 text-xs font-semibold transition-colors">
|
||||
<Plus className="w-4 h-4" />
|
||||
<span>Add module</span>
|
||||
</button>
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
{/* Module Items */}
|
||||
@@ -181,10 +117,10 @@ export default function ModulesPortal() {
|
||||
Under {activeModule?.title || "Module"}
|
||||
</span>
|
||||
</div>
|
||||
<button className="flex items-center gap-1.5 text-teal-400 hover:text-teal-300 text-xs font-semibold transition-colors">
|
||||
<Button className="flex items-center gap-1.5 text-teal-400 hover:text-teal-300 text-xs font-semibold transition-colors">
|
||||
<Plus className="w-4 h-4" />
|
||||
<span>Add menu</span>
|
||||
</button>
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
{/* Empty State / Menus List */}
|
||||
|
||||
Reference in New Issue
Block a user