Files
KAFM-Project/components/dashboard/insight/reports.tsx
2026-07-29 14:39:55 +05:30

76 lines
2.7 KiB
TypeScript

import { useState } from 'react';
import Button from "@/components/common/button";
import NavigationTabs from '@/components/common/tabs';
import { reportFilters, } from '@/constants/constant';
import FilterTabs from '@/components/common/roundedFilters';
import Table from '@/components/common/dataTable';
import { reporttabs } from '@/constants/tabConstant';
import { reportheaders, reportrows } from '@/constants/tabledata';
export default function ReportPortal() {
const [activeTab, setActiveTab] = useState<string>('Equipment');
const [activeFilter, setActiveFilter] = useState<string>('Site All');
return (
<div className="my-15 text-slate-100 font-sans">
{/* --- HEADER SECTION --- */}
<div className="flex flex-col md:flex-row md:items-start md:justify-between gap-4 mb-6">
<div>
<div className="flex items-center gap-2 text-[12px] font-bold tracking-widest text-slate-500 uppercase font-mono">
<span className="text-teal-400">Apple One HQ Tower</span>
<span className="text-gray-600"></span>
<span className="text-gray-400">INSIGHT</span>
<span className="text-gray-600"></span>
<span className="text-gray-400">REPORTS</span>
</div>
<h1 className="text-2xl font-bold text-white tracking-tight mt-2">
Reports & MMR
</h1>
<p className="text-sm font-medium text-slate-400 mt-2 max-w-xl leading-relaxed">
A read-only layer over every module filter, visualise, and export. Never on the write path.
</p>
</div>
</div>
{/* --- NAVIGATION TABS & TOP ACTION BUTTONS --- */}
<div className="flex flex-col
md:flex-row md:items-center justify-between
border-b border-slate-800/80 mb-4 gap-4">
{/* Navigation Tabs */}
<NavigationTabs
tabs={reporttabs}
activeTab={activeTab}
onTabChange={setActiveTab}
className="mb-6"
/>
</div>
{/* --- STATUS PILL FILTERS & DOWNLOAD BUTTON --- */}
<div className="flex items-center justify-between gap-4">
<FilterTabs
options={reportFilters}
activeFilter={activeFilter}
onChange={setActiveFilter}
/>
<Button
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
</Button>
</div>
<div className='mt-5'>
<Table headers={reportheaders} rows={reportrows}/>
</div>
</div>
);
}