From 104f8f7abfdc58d3d1d20cb089ecae5ff742e87f Mon Sep 17 00:00:00 2001 From: Shaily Mishra Date: Wed, 15 Jul 2026 18:11:25 +0530 Subject: [PATCH] Overview dashboard and Employee Engagement is added --- app/dashboard/layout.tsx | 35 ++++ app/dashboard/overview/buildingOwner/page.tsx | 0 app/dashboard/overview/dashboard/page.tsx | 18 ++ app/dashboard/overview/engagement/page.tsx | 19 ++ .../overview/propertyManager/page.tsx | 0 .../overview/serviceEngineer/page.tsx | 0 app/dashboard/page.tsx | 24 +-- components/dashboard/dashboard.tsx | 7 +- components/dashboard/engagement.tsx | 182 ++++++++++++++++++ components/dashboard/navbar.tsx | 39 ++-- components/dashboard/sideBarItem.tsx | 11 +- components/dashboard/sidebar.tsx | 9 +- constants/constant.ts | 20 +- 13 files changed, 314 insertions(+), 50 deletions(-) create mode 100644 app/dashboard/layout.tsx create mode 100644 app/dashboard/overview/buildingOwner/page.tsx create mode 100644 app/dashboard/overview/dashboard/page.tsx create mode 100644 app/dashboard/overview/engagement/page.tsx create mode 100644 app/dashboard/overview/propertyManager/page.tsx create mode 100644 app/dashboard/overview/serviceEngineer/page.tsx create mode 100644 components/dashboard/engagement.tsx diff --git a/app/dashboard/layout.tsx b/app/dashboard/layout.tsx new file mode 100644 index 0000000..85e11b1 --- /dev/null +++ b/app/dashboard/layout.tsx @@ -0,0 +1,35 @@ +"use client"// app/dashboard/layout.tsx +import Sidebar from "@/components/dashboard/sidebar"; +import Navbar from "@/components/dashboard/navbar"; +import { Sparkles } from "lucide-react"; + +export default function DashboardLayout({ + children, +}: { + children: React.ReactNode; +}) { + return ( +
+ {/* Shared Sidebar */} + + +
+ {/* Shared Navbar */} + + + {/* The active page content renders here */} +
+ {children} +
+
+ + {/* Shared Ask AI Floating Button */} + +
+ ); +} \ No newline at end of file diff --git a/app/dashboard/overview/buildingOwner/page.tsx b/app/dashboard/overview/buildingOwner/page.tsx new file mode 100644 index 0000000..e69de29 diff --git a/app/dashboard/overview/dashboard/page.tsx b/app/dashboard/overview/dashboard/page.tsx new file mode 100644 index 0000000..d044991 --- /dev/null +++ b/app/dashboard/overview/dashboard/page.tsx @@ -0,0 +1,18 @@ +"use client"; + +import Sidebar from "@/components/dashboard/sidebar"; + +import OperationsDashboard from "@/components/dashboard/dashboard"; + + +export default function OverViewDashboardPage() { + return ( + + +
+ + +
+ + ); +} \ No newline at end of file diff --git a/app/dashboard/overview/engagement/page.tsx b/app/dashboard/overview/engagement/page.tsx new file mode 100644 index 0000000..007736b --- /dev/null +++ b/app/dashboard/overview/engagement/page.tsx @@ -0,0 +1,19 @@ +"use client"; + +import EngagementPage from "@/components/dashboard/engagement"; + + + + + +export default function EngagementDashboard() { + return ( + + +
+ + +
+ + ); +} \ No newline at end of file diff --git a/app/dashboard/overview/propertyManager/page.tsx b/app/dashboard/overview/propertyManager/page.tsx new file mode 100644 index 0000000..e69de29 diff --git a/app/dashboard/overview/serviceEngineer/page.tsx b/app/dashboard/overview/serviceEngineer/page.tsx new file mode 100644 index 0000000..e69de29 diff --git a/app/dashboard/page.tsx b/app/dashboard/page.tsx index c60266d..a02c0f1 100644 --- a/app/dashboard/page.tsx +++ b/app/dashboard/page.tsx @@ -1,21 +1,7 @@ -"use client"; +// app/dashboard/page.tsx +import { redirect } from "next/navigation"; -import Sidebar from "@/components/dashboard/sidebar"; - -import OperationsDashboard from "@/components/dashboard/dashboard"; - -export default function DashboardPage() { - return ( - - -
- - -
- -
-
- - - ); +export default function DashboardBasePage() { + // Automatically redirect the user to the actual overview dashboard page + redirect("/dashboard/overview/dashboard"); } \ No newline at end of file diff --git a/components/dashboard/dashboard.tsx b/components/dashboard/dashboard.tsx index b45f361..a5ac918 100644 --- a/components/dashboard/dashboard.tsx +++ b/components/dashboard/dashboard.tsx @@ -14,10 +14,11 @@ export default function Dashboard() { return ( -
- +
+ +
-
+
{/* Title Section */}
diff --git a/components/dashboard/engagement.tsx b/components/dashboard/engagement.tsx new file mode 100644 index 0000000..ffc7907 --- /dev/null +++ b/components/dashboard/engagement.tsx @@ -0,0 +1,182 @@ +"use client"; +import { + Smile, + Activity, + AlertTriangle, + Star, + Plus, + Sparkles +} from "lucide-react"; + +import {SATISFACTION_DRIVERS,TICKETS_DATA} from "@/constants/constant"; +export default function EngagementPage() { + return ( +
+ +
+ + {/* Page Header Section */} +
+
+
+ Apple One — HQ Tower + · + Intelligence + · + Engagement +
+

Employee engagement

+

+ Pulse satisfaction surveys, complaint tickets and a suggestion system — boosting morale, transparency and retention. +

+
+ + {/* Action Buttons */} +
+ + +
+
+ + {/* 3. Metrics Cards Grid (4 Columns) */} +
+ + {/* Card 1: Engagement Score */} +
+
+
+ +
+ +4 vs Q1 +
+
+ 82% +

Engagement score

+
+
+ + {/* Card 2: Survey Response */} +
+
+
+ +
+ this pulse +
+
+ 71% +

Survey response

+
+
+ + {/* Card 3: Open Tickets */} +
+
+
+ +
+ to resolve +
+
+ 2 +

Open tickets

+
+
+ + {/* Card 4: CSAT */} +
+
+
+ +
+ of 5.0 +
+
+ 4.2 +

CSAT

+
+
+ +
+ + {/* 4. Double Columns layout (Drivers & Tickets lists) */} +
+ + {/* Left Column: Satisfaction Drivers */} +
+
+

Satisfaction drivers

+ latest pulse +
+ +
+ {SATISFACTION_DRIVERS.map((driver) => ( +
+
+ {driver.label} + {driver.score} +
+ + {/* Track line background */} +
+ {/* Filled bar width */} +
+
+
+ ))} +
+
+ + {/* Right Column: Tickets & Suggestions */} +
+
+

Tickets & suggestions

+
+ +
+ {TICKETS_DATA.map((ticket, index) => ( +
+
+

{ticket.title}

+ + {ticket.type} + +
+ + {/* Status Indicator Badges */} +
+ {ticket.status === "OPEN" ? ( + + + OPEN + + ) : ( + + + CLOSED + + )} +
+
+ ))} +
+
+ +
+ +
+ + + +
+ ); +} \ No newline at end of file diff --git a/components/dashboard/navbar.tsx b/components/dashboard/navbar.tsx index f85fc41..fad6250 100644 --- a/components/dashboard/navbar.tsx +++ b/components/dashboard/navbar.tsx @@ -2,36 +2,39 @@ import { Search, HelpCircle, Globe, Sun, Bell, ChevronDown, MapPin } from 'lucid export default function Navbar() { return ( -
+ /* + - 'fixed top-0 right-0 left-64' anchors the navbar to the top of the screen, + leaving room exactly for your 64-width sidebar. + - 'bg-[#071321]' matches your master UI background. + - 'h-16' gives it a consistent height. + */ +
{/* Left Group */}
{/* Company Selector */} -
- - Apple One - -
+
+ + Apple One + +
{/* Location Selector */} -
- - - Apple One — HQ Tower - - -
+
+ + + Apple One — HQ Tower + + +
{/* Search Bar */}
- +
diff --git a/components/dashboard/sideBarItem.tsx b/components/dashboard/sideBarItem.tsx index f61b515..f142b20 100644 --- a/components/dashboard/sideBarItem.tsx +++ b/components/dashboard/sideBarItem.tsx @@ -4,15 +4,14 @@ import Link from "next/link"; import { useState } from "react"; import { ChevronDown } from "lucide-react"; import {Props} from "@/constants/types"; - - +import Button from "@/utils/button"; export default function SidebarItem({ item }: Props) { const [open, setOpen] = useState(item.title === "Overview"); return ( -
- + {open && item.children.length > 0 && ( -
+
{item.children.map((child: any) => ( +