import { useState } from 'react'; import { Star, ShieldCheck, Activity, Clock, BarChart2, Plus } from "lucide-react"; import Button from "@/utils/button"; import StatCard from "@/utils/dashStatCard"; import InfoBanner from "@/utils/infoBanner"; export default function VendorServicePortal() { const vendorData = [ { name: "Voltas Ltd", id: "CTR-700", scope: "HVAC AMC & breakdown", rating: "4.6", sla: "95%", slaColor: "text-emerald-400", response: "4.0h", openJobs: "2", }, { name: "Blue Star", id: "CTR-701", scope: "Chiller & VRV service", rating: "4.1", sla: "88%", slaColor: "text-amber-400", response: "1.2h", openJobs: "2", }, { name: "Sterling FM", id: "CTR-702", scope: "Integrated FM / soft services", rating: "3.4", sla: "94%", slaColor: "text-emerald-400", response: "2.4h", openJobs: "4", }, { name: "OTIS Elevators", id: "CTR-704", scope: "Elevator AMC", rating: "4.8", sla: "95%", slaColor: "text-emerald-400", response: "2.8h", openJobs: "—", }, { name: "Sodexo", id: "CTR-705", scope: "Soft services & cafeteria", rating: "4.3", sla: "90%", slaColor: "text-amber-400", response: "2.8h", openJobs: "1", }, { name: "In-house team", id: "—", scope: "Day-to-day maintenance", rating: "4.0", sla: "93%", slaColor: "text-amber-400", response: "3.2h", openJobs: "3", }, ]; const fieldCrewData = [ { initials: "RK", name: "Ravi Kumar", role: "M&E Technician • Chiller plant", status: "ON-SITE", statusType: "onsite", time: "6.4h today", }, { initials: "SI", name: "Sana Iqbal", role: "HVAC Engineer • AHU room L7", status: "ON-SITE", statusType: "onsite", time: "6.1h today", }, { initials: "MD", name: "Mohan D.", role: "Electrician • En route", status: "EN-ROUTE", statusType: "enroute", time: "—", }, { initials: "LN", name: "Lakshmi N.", role: "Housekeeping Lead • Lobby + L2", status: "ON-SITE", statusType: "onsite", time: "6.7h today", }, { initials: "AP", name: "Arjun P.", role: "Plumber • Off-site", status: "OFF-SITE", statusType: "offsite", time: "—", }, { initials: "FR", name: "Fatima R.", role: "BMS Operator • Control room", status: "ON-SITE", statusType: "onsite", time: "7.6h today", }, ]; return (
{/* --- HEADER SECTION --- */}
Apple One — HQ Tower Operations Vendors

Vendor & field service

Vendor performance scorecards and live field-crew status in one view — SLA adherence, response times and job dispatch across your service partners.

{/* --- HEADER BUTTONS --- */}
{/* --- STAT CARDS --- */}
{/* Active vendors */} {/* Avg SLA adherence */} {/* Open field jobs */} {/* Avg response time */}
{/* --- TABLES GRID (SIDE-BY-SIDE) --- */}
{/* LEFT TABLE: VENDOR SCORECARD */}

Vendor scorecard

SLA • rating • jobs
{vendorData.map((row, index) => ( ))}
Vendor Scope Rating SLA Response Open
{row.name}
{row.id}
{row.scope}
{row.rating}
{row.sla} {row.response} {row.openJobs}
{/* RIGHT TABLE: FIELD CREW • LIVE */}

Field crew • live

4 on site
{fieldCrewData.map((crew, index) => { return (
{crew.initials}
{crew.name}
{crew.role}
{crew.statusType === "onsite" && ( {crew.status} )} {crew.statusType === "enroute" && ( {crew.status} )} {crew.statusType === "offsite" && ( {crew.status} )}
{crew.time}
); })}
); }