import { useState } from 'react'; import { Plus, ShieldCheck, Clock, Check, AlertTriangle, QrCode, FileText, Eye } from 'lucide-react'; import Button from "@/components/common/button"; import { permitsData, workPermitFilters } from '@/constants/constant'; import FilterTabs from '@/components/common/roundedFilters'; import StatCard from '@/components/common/dashStatCard'; import InfoBanner from '@/components/common/infoBanner'; export default function WorkPermitPortal() { const [activeFilter, setActiveFilter] = useState('All'); // Permit Data matching the UI const renderStatusBadge = (status: string) => { switch (status) { case "ACTIVE": return ( ACTIVE ); case "SUBMITTED": return ( SUBMITTED ); case "APPROVED": return ( APPROVED ); case "EXPIRED": return ( EXPIRED ); case "CLOSED": return ( CLOSED ); case "REJECTED": return ( REJECTED ); case "DRAFT": return ( DRAFT ); default: return null; } }; return (
{/* --- HEADER SECTION --- */}
Apple One — HQ Tower Operations Work Permit

Permit to Work

A controlled permit-to-work lifecycle — request, risk review, approval, activation and close-out — per site and hazard type. QR-driven on the floor.

{/* Action Buttons */}
{/* --- NAVIGATION TABS & TOP ACTION BUTTONS --- */}
{/* Navigation tabs component if needed */}
{/* --- STAT CARDS --- */}
{/* Active on site */} {/* Awaiting approval */} {/* Approved · ready */} {/* Expired · breach */}
{/* --- STATUS PILL FILTERS --- */}
{/* --- PERMIT TABLE SECTION --- */}
{permitsData.map((row, index) => ( {/* Permit ID */} {/* Working Type */} {/* Location */} {/* Contractor */} {/* Validity */} {/* Crew */} {/* Status Badge */} {/* Actions */} ))}
Permit Working Type Location Contractor Validity Crew Status
{row.isHighlighted && (
)} {row.permit}
{row.workingType} {row.location} {row.contractor}
{row.validityDate}
{row.validityTime}
{row.crew} {renderStatusBadge(row.status)}
{row.hasViewIconOnly ? (
) : (
)}
); }