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

@@ -5,123 +5,17 @@ import NavigationTabs from '@/components/common/tabs';
import { reportFilters, reporttabs, Reqeusttabs, statusFilters } from '@/constants/constant';
import FilterTabs from '@/components/common/roundedFilters';
import Table from '@/components/common/dataTable';
import { reportheaders, reportrows } from '@/constants/tabledata';
const StatusBadge = ({
text,
color,
}: {
text: string;
color: string;
}) => (
<span
className={`inline-flex items-center gap-1 rounded-full px-3 py-1 text-[10px] font-semibold uppercase tracking-wider whitespace-nowrap ${color}`}
>
<span className="h-1.5 w-1.5 rounded-full bg-current" />
{text}
</span>
);
const headers = [
"Code",
"Equipment",
"Group",
"Block · Floor",
"Service Provider",
"Manufacturer",
"Model",
];
const rows = [
[
<span className="font-semibold text-teal-400 whitespace-nowrap">APP-1100</span>,
<span className="font-semibold whitespace-nowrap">Cooling Tower</span>,
"Electrical",
"Block 1 · 2",
"Blue Star",
"Kirloskar",
<span className="font-mono text-slate-400">M-550</span>,
],
[
<span className="font-semibold text-teal-400 whitespace-nowrap">APP-1103</span>,
<span className="font-semibold whitespace-nowrap">Air Handling Unit</span>,
"Plumbing",
"Tower A · 1",
"Blue Star",
"Voltas",
<span className="font-mono text-slate-400">M-550</span>,
],
[
<span className="font-semibold text-teal-400 whitespace-nowrap">APP-1106</span>,
<span className="font-semibold whitespace-nowrap">VRV Outdoor</span>,
"Electrical",
"Tower A · G",
"Voltas",
"Daikin",
<span className="font-mono text-slate-400">M-320</span>,
],
[
<span className="font-semibold text-teal-400 whitespace-nowrap">APP-1109</span>,
<span className="font-semibold whitespace-nowrap">VRV Outdoor</span>,
"HVAC",
"Tower A · 1",
"Voltas",
"Blue Star",
<span className="font-mono text-slate-400">M-320</span>,
],
[
<span className="font-semibold text-teal-400 whitespace-nowrap">APP-1112</span>,
<span className="font-semibold whitespace-nowrap">Air Handling Unit</span>,
"HVAC",
"Tower A · G",
"In-house",
"Voltas",
<span className="font-mono text-slate-400">M-550</span>,
],
[
<span className="font-semibold text-teal-400 whitespace-nowrap">APP-1115</span>,
<span className="font-semibold whitespace-nowrap">Air Handling Unit</span>,
"Electrical",
"Tower A · 2",
"Voltas",
"Daikin",
<span className="font-mono text-slate-400">M-XR9</span>,
],
[
<span className="font-semibold text-teal-400 whitespace-nowrap">APP-1118</span>,
<span className="font-semibold whitespace-nowrap">Chiller</span>,
"Electrical",
"Block 1 · 1",
"In-house",
"Blue Star",
<span className="font-mono text-slate-400">M-XR9</span>,
],
[
<span className="font-semibold text-teal-400 whitespace-nowrap">APP-1121</span>,
<span className="font-semibold whitespace-nowrap">Cooling Tower</span>,
"Plumbing",
"Tower A · 1",
"Blue Star",
"Daikin",
<span className="font-mono text-slate-400">M-550</span>,
],
];
export default function ReportPortal() {
const [activeTab, setActiveTab] = useState<string>('Equipment');
const [activeFilter, setActiveFilter] = useState<string>('Site All');
const handleDownload = () => {
// Add your export/download logic here
console.log("Downloading report...");
};
return (
<div className="my-15 text-slate-100 font-sans">
@@ -166,7 +60,6 @@ export default function ReportPortal() {
/>
<button
onClick={handleDownload}
className="inline-flex items-center gap-2 rounded-xl bg-teal-400 px-5 py-2.5 text-sm font-semibold text-slate-950 hover:bg-teal-300 transition-colors focus:outline-none focus:ring-2 focus:ring-teal-400/50 shrink-0"
>
Download
@@ -174,7 +67,7 @@ export default function ReportPortal() {
</div>
<div className='mt-5'>
<Table headers={headers} rows={rows}/>
<Table headers={reportheaders} rows={reportrows}/>
</div>
</div>