"use client"; import { BarChart2, Globe } from "lucide-react"; import { SATISFACTION_DRIVERS, TICKETS_DATA } from "@/constants/constant"; import Button from "@/components/common/button"; import InfoBanner from "@/components/common/infoBanner"; // Import your custom Card components import { Card } from "@/components/common/cardWrapper"; import { CardHeader } from "@/components/common/cardHeader"; import Table from "@/components/common/dataTable"; import { connectedheaders, connectedrows } from "@/constants/tabledata"; // Custom Stat Card Data matching the UI image exactly const STAT_CARDS_DATA = [ { title: "SLA ADHERENCE", value: "90%", subtext: "target 90% · automated tracking", progress: 90, color: "bg-[#00c985]", // Vibrant emerald green valueColor: "text-[#00c985]", }, { title: "AVG WO RESOLUTION", value: "22.4 h", subtext: "target < 24 h · portfolio median", progress: 93, color: "bg-[#2dd4bf]", // Mint / Teal valueColor: "text-white", }, { title: "MANUAL DATA ENTRY", value: "-80%", subtext: "agent-captured requests & readings", progress: 80, color: "bg-[#2dd4bf]", // Mint / Teal valueColor: "text-[#2dd4bf]", }, { title: "REPORTING EFFORT", value: "-75%", subtext: "metrics ready for review — no compiling", progress: 75, color: "bg-[#2dd4bf]", // Mint / Teal valueColor: "text-[#2dd4bf]", }, ]; // Data for Risk Radar const RISK_RADAR_ITEMS = [ { title: "Coastal One · vendor gap", desc: "HVAC vendor completion rate fell to 61% — 8 PPMs at risk of slipping this month. Backup vendor suggested.", tag: "Escalates in ~6 days", tagColor: "text-rose-400", dotColor: "bg-rose-500", action: "Assign backup", }, { title: "Lakeside · SLA drift", desc: "P2 response times trending +18% over 3 weeks; correlated with night-shift staffing.", tag: "Breach risk · next week", tagColor: "text-amber-400", dotColor: "bg-amber-400", action: "Adjust roster", }, { title: "Monsoon readiness", desc: "4 of 11 waterproofing checks pending across portfolio with rains forecast in 10 days.", tag: "Window closing", tagColor: "text-amber-400", dotColor: "bg-amber-400", action: "Schedule now", }, { title: "Spares shortfall", desc: "AHU belt stock below reorder level at 2 sites; next PPM cycle consumes remaining stock.", tag: "3 weeks of stock left", tagColor: "text-sky-400", dotColor: "bg-sky-400", action: "Raise PO", }, ]; // Data for Vendor Performance const VENDOR_PERFORMANCE = [ { name: "CoolServ HVAC", score: 94, barColor: "bg-emerald-400" }, { name: "Apex Elevators", score: 91, barColor: "bg-emerald-400" }, { name: "SecureWatch", score: 86, barColor: "bg-emerald-400" }, { name: "AquaPure", score: 82, barColor: "bg-amber-400" }, { name: "GreenScape", score: 61, barColor: "bg-rose-400" }, ]; // Data for Live Context Feed const LIVE_FEED = [ { time: "now", text: "Vendor CoolServ acknowledged P1 · Chiller-02 — tenant portal updated" }, { time: "4 min", text: "Energy spike at Lakeside auto-linked to AHU-07 alert" }, { time: "11 min", text: "Coastal One WO-1221 completed · SLA met · invoice draft created" }, { time: "26 min", text: "Tenant satisfaction pulse: 4.4 ★ this week (+0.2)" }, ]; export default function ConnectedOpsPortal() { return (
{/* Page Header Section */}
APPLE ONE — HQ TOWER INTELLIGENCE CONNECTED OPS

Connected operations

Every team, vendor and system on the same live context — portfolio-wide work orders, costs, SLAs and vendor performance in one place, with risks flagged before they escalate.

{/* Action Buttons */}
{/* --- STAT CARD GRID (REPLACED WITH UI MATCHING CARDS) --- */}
{STAT_CARDS_DATA.map((card, idx) => (

{card.title}

{card.value}

{card.subtext}

{/* Progress Bar */}
))}
{/* --- TABLE SECTION --- */}
{/* --- BELOW TABLE SECTION (RISK RADAR, VENDOR PERFORMANCE & LIVE FEED) --- */}
{/* Left Column: Risk Radar (7 Cols) */}
{RISK_RADAR_ITEMS.map((item, index) => (

{item.title}

{item.desc}

⏱ {item.tag}

))}
{/* Right Column: Vendor Performance & Live Context Feed (5 Cols) */}
{/* Top Right: Vendor Performance */}
{VENDOR_PERFORMANCE.map((vendor, idx) => (
{vendor.name}
{vendor.score}
))}

GreenScape flagged — also holds the disputed invoice in AI Helpdesk.

{/* Bottom Right: Live Context Feed */}
{LIVE_FEED.map((feed, idx) => (
{feed.time}

{feed.text}

))}
{/* --- INFO BANNER --- */}
); }