166 lines
6.9 KiB
TypeScript
166 lines
6.9 KiB
TypeScript
|
|
import {
|
|
Layers,
|
|
ShieldCheck,
|
|
CheckSquare,
|
|
Clock,
|
|
Search,
|
|
QrCode,
|
|
Power,
|
|
Sparkles,
|
|
List,
|
|
Pencil,
|
|
Plus,
|
|
} from 'lucide-react';
|
|
import Button from "@/components/common/button";
|
|
import StatCard from "@/components/common/dashStatCard";
|
|
import Table from "@/components/common/dataTable";
|
|
import InfoBanner from '@/components/common/infoBanner';
|
|
import { statutoryheaders, statutoryrows } from '@/constants/tabledata';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export default function StatutoryCompliancePortal() {
|
|
return (
|
|
/* Increased container padding and max-width auto alignment */
|
|
<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">Compliance</span>
|
|
<span className="text-gray-600">•</span>
|
|
<span className="text-gray-400">Statutory</span>
|
|
</div>
|
|
<h1 className="text-2xl font-extrabold text-white tracking-tight mt-1.5">
|
|
Statutory compliance tracker
|
|
</h1>
|
|
<p className="text-sm font-medium text-slate-400 mt-1 max-w-2xl leading-relaxed">
|
|
Centralized register of statutory, regulatory, legal, safety and environmental obligations — with expiry tracking, reminders, document vault and audit trail.
|
|
</p>
|
|
</div>
|
|
|
|
{/* --- HEADER BUTTONS --- */}
|
|
<div className="flex items-center gap-2.5 self-start md:mt-6">
|
|
<Button className="bg-[#0b1727] hover:bg-slate-800/60 text-slate-200 border border-slate-800 text-xs px-3.5 py-2 rounded-lg flex items-center gap-2 font-semibold transition-colors">
|
|
<Sparkles className="w-4 h-4 text-slate-300" />
|
|
<span>Reminders</span>
|
|
</Button>
|
|
|
|
<Button className="bg-teal-400 hover:bg-teal-300 text-slate-950 font-bold text-xs px-4 py-2 rounded-lg flex items-center gap-1.5 transition-colors">
|
|
<Plus className="w-4 h-4 stroke-[3]" />
|
|
<span>New Obligation</span>
|
|
</Button>
|
|
</div>
|
|
</div>
|
|
|
|
{/* --- STAT CARDS GRID --- */}
|
|
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-6">
|
|
<StatCard
|
|
variant="icon"
|
|
title="Total checklists"
|
|
value="10"
|
|
icon={Layers}
|
|
badgeText="Location set"
|
|
badgeClassName="text-slate-400 lowercase font-mono"
|
|
iconContainerClassName="bg-blue-950/60 border border-blue-800/40 text-blue-400"
|
|
/>
|
|
|
|
<StatCard
|
|
variant="icon"
|
|
title="Active"
|
|
value="7"
|
|
icon={ShieldCheck}
|
|
badgeText="of 10"
|
|
badgeClassName="text-emerald-400 font-mono font-medium"
|
|
iconContainerClassName="bg-emerald-950/60 border border-emerald-800/40 text-emerald-400"
|
|
/>
|
|
|
|
<StatCard
|
|
variant="icon"
|
|
title="Approval set"
|
|
value="5"
|
|
icon={CheckSquare}
|
|
badgeText="workflow"
|
|
badgeClassName="text-amber-400 lowercase font-mono"
|
|
iconContainerClassName="bg-amber-950/50 border border-amber-800/30 text-amber-400"
|
|
/>
|
|
|
|
<StatCard
|
|
variant="icon"
|
|
title="Avg TAT"
|
|
value="40m"
|
|
icon={Clock}
|
|
badgeText="target"
|
|
badgeClassName="text-rose-400 lowercase font-mono"
|
|
iconContainerClassName="bg-rose-950/50 border border-rose-800/30 text-rose-400"
|
|
/>
|
|
</div>
|
|
|
|
{/* --- SEARCH, FILTERS & ACTION BUTTONS --- */}
|
|
<div className="flex flex-col md:flex-row items-center justify-between gap-3 mb-6">
|
|
{/* Search & Select Filters */}
|
|
<div className="flex flex-1 flex-wrap items-center gap-2.5 w-full md:w-auto">
|
|
{/* Search Bar */}
|
|
<div className="relative flex-1 min-w-[220px] max-w-md">
|
|
<Search size={16} className="absolute left-3 top-1/2 -translate-y-1/2 text-slate-400" />
|
|
<input
|
|
type="text"
|
|
placeholder="Search obligation, authority, site..."
|
|
className="w-full bg-[#0b1727] border border-slate-800 rounded-lg pl-9 pr-3 py-2 text-xs text-slate-200 placeholder-slate-500 focus:outline-none focus:border-teal-500/50 transition-colors"
|
|
/>
|
|
</div>
|
|
|
|
{/* Category Dropdown */}
|
|
<select className="bg-[#081321] border border-slate-800/80 rounded-lg px-3 py-2 text-xs font-semibold text-slate-200 cursor-pointer focus:outline-none focus:ring-2 focus:ring-[#2dd4bf] transition-all">
|
|
<option value="all">All Categories</option>
|
|
<option value="fire">Statutory · Fire</option>
|
|
<option value="lifts">Statutory · Lifts</option>
|
|
<option value="pressure">Statutory · Pressure</option>
|
|
<option value="environmental">Environmental</option>
|
|
<option value="electrical">Statutory · Electrical Legal</option>
|
|
<option value="health">Health & Safety</option>
|
|
</select>
|
|
|
|
{/* Status Dropdown */}
|
|
<select className="bg-[#081321] border border-slate-800/80 rounded-lg px-3 py-2 text-xs font-semibold text-slate-200 cursor-pointer focus:outline-none focus:ring-2 focus:ring-[#2dd4bf] transition-all">
|
|
<option value="all">All status</option>
|
|
<option value="valid">Valid</option>
|
|
<option value="due">Due</option>
|
|
<option value="expired">Expired</option>
|
|
</select>
|
|
</div>
|
|
|
|
{/* Action Buttons */}
|
|
<div className="flex items-center gap-2 w-full md:w-auto justify-end">
|
|
<Button className="flex items-center gap-1.5 bg-[#0b1727] hover:bg-slate-800/60 text-slate-200 border border-slate-800 rounded-lg px-3.5 py-2 text-xs font-semibold transition-colors">
|
|
<span>Download</span>
|
|
</Button>
|
|
|
|
<Button className="flex items-center gap-1.5 bg-teal-400 hover:bg-teal-300 text-slate-950 font-bold rounded-lg px-3.5 py-2 text-xs transition-colors">
|
|
<Plus size={15} className="stroke-[3]" />
|
|
<span>New Obligation</span>
|
|
</Button>
|
|
</div>
|
|
</div>
|
|
|
|
{/* --- TABLE CONTAINER --- */}
|
|
<div className="mt-5">
|
|
<Table headers={statutoryheaders} rows={statutoryrows} />
|
|
</div>
|
|
<div className="mb-10 mt-5">
|
|
<InfoBanner
|
|
boldText="Automated governance: "
|
|
normalText="each obligation carries a hard expiry; reminders fire at 90 / 30 / 7 days and escalate on breach. Click any row to view its audit history; attach certificates in the document vault; renewals reset the cycle and log to the trail."
|
|
/>
|
|
</div>
|
|
</div>
|
|
);
|
|
} |