table constant data is added and Compliance Safety completed

This commit is contained in:
2026-07-24 18:05:07 +05:30
parent 5a2ae769d8
commit a5394823f3
33 changed files with 3728 additions and 1629 deletions

View File

@@ -19,134 +19,14 @@ import NavigationTabs from "@/components/common/tabs";
import { equipmentTabs } from "@/constants/constant";
import { useState } from "react";
import StatCard from "@/components/common/dashStatCard";
import { equipmentheaders, equipmentrows } from "@/constants/tabledata";
const headers = [
"Code",
"Equipment",
"Group",
"Block · Floor",
"Service Provider",
"Criticality",
"PPM Status",
"Actions",
];
const Badge = ({
text,
color,
}: {
text: string;
color: string;
}) => (
<span
className={`inline-flex items-center rounded-full px-3 py-1 text-[10px] font-bold uppercase tracking-wider ${color}`}
>
<span className="mr-1.5 h-1.5 w-1.5 rounded-full bg-current"></span>
{text}
</span>
);
const ActionButtons = () => (
<div className="flex justify-center gap-1.5">
<button className="rounded-md border border-slate-700/60 p-1.5 text-slate-400 hover:text-white hover:bg-slate-800 transition">
<FileText size={14} />
</button>
<button className="rounded-md border border-slate-700/60 p-1.5 text-slate-400 hover:text-white hover:bg-slate-800 transition">
<Pencil size={14} />
</button>
<button className="rounded-md border border-slate-700/60 p-1.5 text-slate-400 hover:text-white hover:bg-slate-800 transition">
<LayoutGrid size={14} />
</button>
</div>
);
export default function EquipmentPortal() {
const [activeTab, setActiveTab] = useState<string>("Site-Wise Equipment");
const rows = [
[
<span className="font-semibold text-teal-400">APP-1100</span>,
<span className="font-bold text-slate-100">Cooling Tower</span>,
"Electrical",
"Block 1 · 2",
"Blue Star",
"Important",
<Badge text="Working" color="bg-amber-950/60 text-amber-400 border border-amber-800/30" />,
<ActionButtons />,
],
[
<span className="font-semibold text-teal-400">APP-1103</span>,
<span className="font-bold text-slate-100">Air Handling Unit</span>,
"Plumbing",
"Tower A · 1",
"Blue Star",
<Badge text="Critical" color="bg-rose-950/60 text-rose-400 border border-rose-800/30" />,
<Badge text="Completed" color="bg-emerald-950/60 text-emerald-400 border border-emerald-800/30" />,
<ActionButtons />,
],
[
<span className="font-semibold text-teal-400">APP-1106</span>,
<span className="font-bold text-slate-100">VRV Outdoor</span>,
"Electrical",
"Tower A · G",
"Voltas",
<Badge text="Critical" color="bg-rose-950/60 text-rose-400 border border-rose-800/30" />,
<Badge text="Completed" color="bg-emerald-950/60 text-emerald-400 border border-emerald-800/30" />,
<ActionButtons />,
],
[
<span className="font-semibold text-teal-400">APP-1109</span>,
<span className="font-bold text-slate-100">VRV Outdoor</span>,
"HVAC",
"Tower A · 1",
"Voltas",
"Normal",
<Badge text="Overdue" color="bg-rose-950/60 text-rose-400 border border-rose-800/30" />,
<ActionButtons />,
],
[
<span className="font-semibold text-teal-400">APP-1112</span>,
<span className="font-bold text-slate-100">Air Handling Unit</span>,
"HVAC",
"Tower A · G",
"In-house",
<Badge text="Critical" color="bg-rose-950/60 text-rose-400 border border-rose-800/30" />,
<Badge text="Completed" color="bg-emerald-950/60 text-emerald-400 border border-emerald-800/30" />,
<ActionButtons />,
],
[
<span className="font-semibold text-teal-400">APP-1115</span>,
<span className="font-bold text-slate-100">Air Handling Unit</span>,
"Electrical",
"Tower A · 2",
"Voltas",
<Badge text="Critical" color="bg-rose-950/60 text-rose-400 border border-rose-800/30" />,
<Badge text="Completed" color="bg-emerald-950/60 text-emerald-400 border border-emerald-800/30" />,
<ActionButtons />,
],
[
<span className="font-semibold text-teal-400">APP-1118</span>,
<span className="font-bold text-slate-100">Chiller</span>,
"Electrical",
"Block 1 · 1",
"In-house",
"Important",
<Badge text="Overdue" color="bg-rose-950/60 text-rose-400 border border-rose-800/30" />,
<ActionButtons />,
],
[
<span className="font-semibold text-teal-400">APP-1121</span>,
<span className="font-bold text-slate-100">Cooling Tower</span>,
"Plumbing",
"Tower A · 1",
"Blue Star",
"Normal",
<Badge text="Completed" color="bg-emerald-950/60 text-emerald-400 border border-emerald-800/30" />,
<ActionButtons />,
],
];
return (
<div className="my-15 text-slate-100 font-sans ">
@@ -290,7 +170,7 @@ export default function EquipmentPortal() {
{/* Data Table */}
<div className="mt-4">
<Table headers={headers} rows={rows} />
<Table headers={equipmentheaders} rows={equipmentrows} />
</div>
{/* Info Banner */}