Project structure changes ad new files added in dashboard folders

This commit is contained in:
2026-07-23 18:32:07 +05:30
parent 1993d91319
commit 5a2ae769d8
63 changed files with 1550 additions and 190 deletions

View File

@@ -4,7 +4,7 @@ import { useState } from "react";
import LoginForm from "./loginForm";
import VerifyCode from "./verifyCode";
import ForgotPassword from "./forgetPassword";
import {Step} from "@/constants/types"
import {Step} from "@/types/types"

View File

@@ -1,4 +1,4 @@
import { AuthLayoutProps } from "@/constants/types";
import { AuthLayoutProps } from "@/types/types";
import LeftPanel from "./leftpanel";

14
components/auth/badge.tsx Normal file
View File

@@ -0,0 +1,14 @@
export default function Badge({
children,
icon,
}: {
children: React.ReactNode;
icon: React.ReactNode;
}) {
return (
<div className="inline-flex w-fit items-center gap-2 rounded-full border border-slate-700 bg-[#0d1b2d] px-4 py-2 text-sm text-slate-300">
<span className="text-teal-400">{icon}</span>
{children}
</div>
);
}

View File

@@ -1,8 +1,8 @@
import FormInput from "@/utils/formInput";
import Button from "@/utils/button";
import FormInput from "@/components/common/formInput";
import Button from "@/components/common/button";
import {Props} from "@/constants/types"
import {Props} from "@/types/types"
export default function ForgotPassword({ onBack }: Props) {

View File

@@ -1,6 +1,6 @@
"use client";
import Badge from "@/utils/badge";
import Stat from "@/utils/statCard";
import Badge from "@/components/auth/badge";
import Stat from "@/components/auth/statCard";
import { ShieldCheck, KeyRound, FileText } from "lucide-react";

View File

@@ -1,9 +1,9 @@
import { Eye,EyeOff } from "lucide-react";
import FormInput from "@/utils/formInput";
import Button from "@/utils/button";
import FormInput from "@/components/common/formInput";
import Button from "@/components/common/button";
import { useState } from "react";
import {Props} from "@/constants/types"
import {Props} from "@/types/types"
import { signIn } from "next-auth/react";

View File

@@ -0,0 +1,16 @@
export default function Stat({
number,
label,
}: {
number: string;
label: string;
}) {
return (
<div>
<h2 className="text-3xl font-bold">{number}</h2>
<p className="mt-2 text-xs tracking-[3px] text-slate-400">
{label}
</p>
</div>
);
}

View File

@@ -1,8 +1,8 @@
import Button from "@/utils/button";
import Button from "@/components/common/button";
import OTPInput from "./otpInput";
import { useEffect, useState, } from "react";
import {Props} from "@/constants/types"
import {Props} from "@/types/types"
export default function VerifyCode({ onBack }: Props) {

View File

@@ -0,0 +1,27 @@
import {BarChartProps} from "@/types/types";
export default function BarChart({ data }: BarChartProps) {
return (
<div>
{/* Bars */}
<div className="flex items-end justify-between h-40 px-2 border-b border-[#1b3454] pb-2">
{data.map((item, idx) => (
<div key={idx} className="flex flex-col items-center flex-1 group">
<div className={`w-5 ${item.height} bg-teal-400 rounded-t transition-all duration-300 group-hover:bg-teal-300`} />
</div>
))}
</div>
{/* X-Axis */}
<div className="flex justify-between pt-3 px-2 text-xs font-medium text-gray-500">
{data.map((item, idx) => (
<span key={idx} className="w-5 text-center">{item.month}</span>
))}
</div>
</div>
);
}

View File

@@ -0,0 +1,18 @@
import { ProgressBarProps } from "@/types/types";
export function ProgressBarRow({ label, value, maxValue }: ProgressBarProps) {
const percentage = (value / maxValue) * 100;
return (
<div className="flex items-center justify-between py-1.5 text-sm">
<span className="text-[#899db7] w-32 truncate">{label}</span>
<div className="flex-1 mx-4 bg-[#122238] h-2.5 rounded-full overflow-hidden">
<div
className="bg-[#17cbb5] h-full rounded-full transition-all duration-500"
style={{ width: `${percentage}%` }}
/>
</div>
<span className="text-white font-bold w-6 text-right">{value}</span>
</div>
);
}

View File

@@ -0,0 +1,21 @@
import { StatusProgressProps } from "@/types/types";
export function StatusProgressRow({ label, value, total, barColor = "bg-[#17cbb5]" }: StatusProgressProps) {
const percentage = (value / total) * 100;
return (
<div className="space-y-2 py-1.5">
<div className="flex justify-between text-xs font-semibold">
<span className="text-white">{label}</span>
<span className="text-[#5b7391]">{value}/{total}</span>
</div>
<div className="bg-[#122238] h-3 rounded-full overflow-hidden">
<div
className={`${barColor} h-full rounded-full transition-all duration-500`}
style={{ width: `${percentage}%` }}
/>
</div>
</div>
);
}

View File

@@ -0,0 +1,14 @@
import { ButtonProps } from "@/types/types";
export default function Button({
children,
onClick,
className,
}: ButtonProps) {
return (
<button onClick={onClick} className={className}>
{children}
</button>
);
}

View File

@@ -0,0 +1,14 @@
export function CardHeader({ title, subtitle }: { title: string; subtitle?: string }) {
return (
<div className="flex justify-between items-baseline mb-2 border-b border-[#162942]/50 pb-3">
<h3 className="text-white text-base font-semibold tracking-wide">{title}</h3>
{subtitle && (
<span className="text-[#4e6178] text-xs font-medium uppercase tracking-wider">
{subtitle}
</span>
)}
</div>
);
}

View File

@@ -0,0 +1,9 @@
export function Card({ children, className = "" }:
{ children: React.ReactNode; className?: string }) {
return (
<div className={`bg-[#0a1526] border border-[#162942] rounded-xl p-3
shadow-xl flex flex-col justify-between ${className}`}>
{children}
</div>
);
}

View File

@@ -0,0 +1,66 @@
import { StatCardProps } from "@/types/types";
import { colorMap } from "@/constants/constant";
export default function StatCard({
title,
value,
variant = "progress",
subtitle,
progress,
color = "teal",
icon: Icon,
badgeText,
badgeClassName = "text-slate-500 font-mono uppercase",
iconContainerClassName = "bg-[#11233a] border-[#1b2c3f]/50 text-cyan-400",
isActiveCard = false,
}: StatCardProps) {
// Base structural classes matched exactly to your dark UI design
const cardBorder = isActiveCard ? "border-[#0d9488]" : "border-[#142538]";
return (
<div className={`relative rounded-2xl border ${cardBorder} bg-[#091624] p-5 flex flex-col justify-between min-h-[142px] w-full transition-all duration-300`}>
{/* --- TOP HEADER SECTION --- */}
<div className="flex items-center justify-between w-full">
{variant === "icon" && Icon ? (
<div className={`flex h-9 w-9 items-center justify-center rounded-lg border ${iconContainerClassName}`}>
<Icon size={18} />
</div>
) : (
<span className="text-xs font-bold uppercase tracking-wider text-slate-400/80">
{title}
</span>
)}
{badgeText && (
<span className={`text-[10px] font-semibold tracking-wider ${badgeClassName}`}>
{badgeText}
</span>
)}
</div>
{/* --- BODY STATS SECTION --- */}
<div className="mt-4 flex-grow flex flex-col justify-end">
<div className="text-3xl font-extrabold text-white tracking-tight leading-none">
{value}
</div>
{/* Subtitle / Bottom Label text arrangement layout swap */}
<p className="text-xs font-semibold text-slate-400/70 mt-2">
{variant === "icon" ? title : subtitle}
</p>
</div>
{/* --- PROGRESS LAYER (Only renders if variant="progress") --- */}
{variant === "progress" && progress !== undefined && (
<div className="w-full bg-[#162a45] h-1.5 rounded-full mt-3 overflow-hidden">
<div
className={`h-1.5 rounded-full ${colorMap[color] || 'bg-teal-500'} transition-all duration-500`}
style={{ width: `${progress}%` }}
/>
</div>
)}
</div>
);
}

View File

@@ -0,0 +1,55 @@
import React from "react";
type TableProps = {
headers: string[];
rows: React.ReactNode[][];
};
export default function Table({ headers, rows }: TableProps) {
return (
<div className="w-full overflow-hidden rounded-2xl border border-slate-800 bg-[#0B1727] shadow-xl">
<div className="overflow-x-auto">
<table className="w-full border-collapse text-[12px]">
<thead>
<tr className="border-b border-slate-800 uppercase tracking-[0.12em] text-[10px] text-slate-500">
{headers.map((header, index) => (
<th
key={index}
className={`px-5 py-4 font-semibold whitespace-nowrap ${
index === headers.length - 1
? "text-center"
: "text-left"
}`}
>
{header}
</th>
))}
</tr>
</thead>
<tbody className="divide-y divide-slate-800/70">
{rows.map((row, rowIndex) => (
<tr
key={rowIndex}
className="transition-colors duration-200 hover:bg-slate-800/30"
>
{row.map((cell, cellIndex) => (
<td
key={cellIndex}
className={`px-5 py-4 text-[12px] text-slate-300 whitespace-nowrap ${
cellIndex === row.length - 1
? "text-center"
: "text-left"
}`}
>
{cell}
</td>
))}
</tr>
))}
</tbody>
</table>
</div>
</div>
);
}

View File

@@ -0,0 +1,25 @@
import { FormProps } from "@/types/types";
export default function FormInput({
label,
value,
type = "text",
placeholder="string"
}: FormProps) {
return (
<div>
<label className="mb-2 block text-sm text-slate-400">
{label}
</label>
<input
type={type}
defaultValue={value}
placeholder={placeholder}
className="h-10 w-full rounded-xl border border-slate-700 text-white px-5"
/>
</div>
);
}

View File

@@ -0,0 +1,22 @@
import {InfoBannerProps} from "@/types/types";
export default function InfoBanner({
boldText,
normalText,
}: InfoBannerProps) {
return (
<div className="w-full
rounded-xl border border-l-4 border-[#142538]
border-l-[#10b981] bg-[#091624]
p-4 flex items-center shadow-sm">
<p className="text-sm font-medium text-slate-300 tracking-wide leading-relaxed">
{boldText && <strong className="text-white font-bold mr-1.5">{boldText}</strong>}
{normalText}
</p>
</div>
);
}

View File

@@ -0,0 +1,44 @@
import { FilterTabsProps } from "@/types/types";
export default function FilterTabs({
options = [],
activeFilter,
onChange,
className = "",
}: FilterTabsProps) {
if (!Array.isArray(options) || options.length === 0) {
return null;
}
return (
<div className={`flex items-center gap-2.5 overflow-x-auto no-scrollbar py-1 ${className}`}>
{options.map((filter) => {
const isActive = activeFilter === filter.label;
return (
<button
key={filter.label}
type="button"
onClick={() => onChange(filter.label)}
className={`flex items-center gap-2 px-3.5 py-1.5 rounded-full text-xs font-medium transition-all whitespace-nowrap cursor-pointer ${
isActive
? "bg-teal-950/40 text-teal-400 border border-teal-500/50"
: "bg-[#0b1727] text-slate-400 border border-slate-800/80 hover:text-slate-200"
}`}
>
<span>{filter.label}</span>
{filter.count !== undefined && (
<span
className={`font-mono text-[11px] ${
isActive ? "text-teal-400 font-bold" : "text-slate-400"
}`}
>
{filter.count}
</span>
)}
</button>
);
})}
</div>
);
}

View File

@@ -0,0 +1,31 @@
import { NavigationTabsProps } from "@/types/types";
export default function NavigationTabs({
tabs,
activeTab,
onTabChange,
className = '',
}: NavigationTabsProps) {
return (
<div
className={`flex items-center gap-8 border-b border-slate-800 text-sm font-semibold overflow-x-auto no-scrollbar ${className}`}
>
{tabs.map((tab) => (
<button
key={tab}
onClick={() => onTabChange(tab)}
className={`pb-3 relative transition-colors whitespace-nowrap ${
activeTab === tab
? 'text-teal-400 border-b-2 border-teal-400 font-bold'
: 'text-slate-400 hover:text-slate-200'
}`}
>
{tab}
</button>
))}
</div>
);
}

View File

@@ -0,0 +1,201 @@
import {
Database,
FileText,
Activity,
AlertTriangle,
Plus
} from "lucide-react";
import InfoBanner from "@/components/common/infoBanner";
import Button from "@/components/common/button";
import StatCard from "@/components/common/dashStatCard";
import { Card } from '@/components/common/cardWrapper';
import { CardHeader } from '@/components/common/cardHeader';
import { approvalQueueData, categoryData } from "@/constants/constant";
export default function BudgetPortal() {
return (
<div className="my-15 text-slate-100 font-sans">
{/* --- HEADER SECTION WITH BUTTONS --- */}
<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-[10px] font-bold tracking-widest text-slate-500 uppercase font-mono">
<span className="text-teal-400">Apple One HQ Tower</span>
<span></span>
<span>FINANCE</span>
<span></span>
<span>O&M BUDGET</span>
</div>
<h1 className="text-2xl font-bold text-white tracking-tight mt-2">
O&M budget management
</h1>
<p className="text-sm font-medium text-slate-400 mt-2 max-w-xl leading-relaxed">
Multi-dimensional budgets by site, department and asset planned vs actual, variance, approvals and overrun alerts.
</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-4 py-2 rounded-lg font-semibold transition-colors">
<span>Export</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 budget</span>
</Button>
</div>
</div>
{/* --- STAT CARDS --- */}
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-6">
{/* Annual budget */}
<StatCard
variant="icon"
title="Annual budget"
value="₹1.91 Cr"
icon={Database}
badgeText="FY 2026"
badgeClassName="text-slate-400 lowercase font-mono"
iconContainerClassName="bg-blue-950/40 border-blue-800/30 text-blue-400"
/>
{/* Spent YTD */}
<StatCard
variant="icon"
title="Spent YTD"
value="₹1.42 Cr"
icon={FileText}
badgeText="74% used"
badgeClassName="text-emerald-400 lowercase font-mono"
iconContainerClassName="bg-emerald-950/40 border-emerald-800/30 text-emerald-400"
/>
{/* Remaining */}
<StatCard
variant="icon"
title="Remaining"
value="₹49.0 L"
icon={Activity}
badgeText="26% left"
badgeClassName="text-slate-400 lowercase font-mono"
iconContainerClassName="bg-amber-950/40 border-amber-800/30 text-amber-400"
/>
{/* Overrun lines */}
<StatCard
variant="icon"
title="Overrun lines"
value="1"
icon={AlertTriangle}
badgeText="review"
badgeClassName="text-rose-400 lowercase font-mono"
iconContainerClassName="bg-rose-950/40 border-rose-900/30 text-rose-400"
/>
</div>
{/* --- BUDGET DETAILS & APPROVAL QUEUE SECTION --- */}
<div className="grid grid-cols-1 lg:grid-cols-3 gap-6 mb-8">
{/* Planned vs Actual Table (Left 2 Columns) */}
<Card className="lg:col-span-2 justify-start">
<CardHeader
title="Planned vs actual · by category"
subtitle="CAPEX ₹35.0 L • OPEX ₹1.56 Cr"
/>
<div className="overflow-x-auto mt-2">
<table className="w-full text-left border-collapse">
<thead>
<tr className="border-b border-[#162942]/60 text-[11px] font-mono font-bold text-slate-500 uppercase tracking-wider">
<th className="py-2.5 px-2">Category</th>
<th className="py-2.5 px-2">Type</th>
<th className="py-2.5 px-2 font-mono">Planned</th>
<th className="py-2.5 px-2 font-mono">Actual</th>
<th className="py-2.5 px-2 font-mono">Variance</th>
<th className="py-2.5 px-2 font-mono min-w-[120px]">Utilization</th>
</tr>
</thead>
<tbody className="divide-y divide-[#162942]/40 text-xs">
{categoryData.map((row, idx) => (
<tr key={idx} className="hover:bg-slate-900/30 transition-colors">
<td className="py-3 px-2 font-semibold text-slate-100">
{row.category}
</td>
<td className="py-3 px-2">
<span className="bg-[#12233a] border border-[#1d3554] text-slate-300 font-mono text-[10px] px-2 py-0.5 rounded">
{row.type}
</span>
</td>
<td className="py-3 px-2 font-mono text-slate-300">
{row.planned}
</td>
<td className="py-3 px-2 font-mono text-slate-300">
{row.actual}
</td>
<td className={`py-3 px-2 font-mono font-semibold ${row.varianceColor}`}>
{row.variance}
</td>
<td className="py-3 px-2">
<div className="w-full bg-[#12233a] h-1.5 rounded-full overflow-hidden mb-1">
<div
className={`h-full ${row.barColor}`}
style={{ width: `${Math.min(row.utilization, 100)}%` }}
/>
</div>
<span className="text-[10px] font-mono text-slate-400">
{row.utilization}%
</span>
</td>
</tr>
))}
</tbody>
</table>
</div>
</Card>
{/* Approval Queue Panel (Right 1 Column) */}
<Card className="justify-start">
<CardHeader title="Approval queue" subtitle="multi-level" />
<div className="divide-y divide-[#162942]/60 mt-1">
{approvalQueueData.map((item) => (
<div key={item.id} className="py-3.5 flex items-center justify-between gap-3">
<div>
<h4 className="text-xs font-semibold text-white leading-snug">
{item.title}
</h4>
<p className="text-[11px] font-mono text-slate-500 mt-1">
{item.id} · {item.meta}
</p>
</div>
{item.status === "pending" ? (
<button className="bg-[#12233a] hover:bg-[#1a3252] border border-[#1d3554] text-slate-200 text-xs font-semibold px-3 py-1 rounded transition-colors whitespace-nowrap">
Approve
</button>
) : (
<span className="flex items-center gap-1.5 bg-emerald-950/40 border border-emerald-800/30 text-emerald-400 text-[10px] font-mono font-bold px-2.5 py-1 rounded-full whitespace-nowrap">
<span className="w-1.5 h-1.5 rounded-full bg-emerald-400" />
COMPLETED
</span>
)}
</div>
))}
</div>
</Card>
</div>
{/* Info Banner */}
<div className="my-8">
<InfoBanner
boldText="Utilization %"
normalText=" per category = Actual ÷ Planned × 100 (the bar turns amber past 90%, red on overrun); categories & types are configured in Master Data → Finance. Integration: budget lines link to work orders, purchase orders and vendor invoices — actuals post back automatically and overruns raise an alert to the approver."
/>
</div>
</div>
);
}

View File

@@ -0,0 +1,298 @@
import {
FileText,
Database,
AlertTriangle,
Activity,
Sparkles,
Plus
} from "lucide-react";
import InfoBanner from "@/components/common/infoBanner";
import Button from "@/components/common/button";
import StatCard from "@/components/common/dashStatCard";
import Table from "@/components/common/dataTable";
const StatusBadge = ({
text,
color,
}: {
text: string;
color: string;
}) => (
<span
className={`inline-flex items-center gap-1 rounded-full px-3 py-1 text-[10px] font-semibold uppercase tracking-wider whitespace-nowrap ${color}`}
>
<span className="h-1.5 w-1.5 rounded-full bg-current" />
{text}
</span>
);
const ActionButton = ({ text }: { text: string }) => (
<Button className="rounded-lg border border-slate-700/60 bg-[#16243a] px-3 py-1.5 text-sm font-semibold text-slate-300 hover:bg-slate-700 transition">
{text}
</Button>
);
const headers = [
"Invoice",
"Client",
"Period",
"Amount",
"Raised",
"Due",
"Status",
"",
];
const rows = [
[
<span className="font-semibold text-[#2EE6C5]">INV-9040</span>,
<span className="font-semibold text-slate-100">Apple One Corp</span>,
"Jun 2026",
<span className="font-semibold">12.4 L</span>,
<span className="font-mono">Jun 5, 2026</span>,
<span className="font-mono">Jul 5, 2026</span>,
<StatusBadge
text="Paid"
color="bg-emerald-500/15 text-emerald-400"
/>,
<span className="text-slate-500"></span>,
],
[
<span className="font-semibold text-[#2EE6C5]">INV-9041</span>,
<span className="font-semibold text-slate-100">Novotel F&B</span>,
"Jun 2026",
<span className="font-semibold">8.6 L</span>,
<span className="font-mono">Jun 9, 2026</span>,
<span className="font-mono">Jul 9, 2026</span>,
<StatusBadge
text="Sent"
color="bg-amber-500/15 text-amber-400"
/>,
<ActionButton text="Mark paid" />,
],
[
<span className="font-semibold text-[#2EE6C5]">INV-9042</span>,
<span className="font-semibold text-slate-100">SRM Estates</span>,
"Jun 2026",
<span className="font-semibold">4.3 L</span>,
<span className="font-mono">Jun 13, 2026</span>,
<span className="font-mono">Jul 13, 2026</span>,
<StatusBadge
text="Overdue"
color="bg-red-500/15 text-red-400"
/>,
<ActionButton text="Mark paid" />,
],
[
<span className="font-semibold text-[#2EE6C5]">INV-9043</span>,
<span className="font-semibold text-slate-100">Local Mart</span>,
"Jun 2026",
<span className="font-semibold">21.0 L</span>,
<span className="font-mono">Jun 17, 2026</span>,
<span className="font-mono">Jul 17, 2026</span>,
<StatusBadge
text="Paid"
color="bg-emerald-500/15 text-emerald-400"
/>,
<span className="text-slate-500"></span>,
],
[
<span className="font-semibold text-[#2EE6C5]">INV-9044</span>,
<span className="font-semibold text-slate-100">Regus Spaces</span>,
"Jun 2026",
<span className="font-semibold">6.8 L</span>,
<span className="font-mono">Jun 21, 2026</span>,
<span className="font-mono">Jul 21, 2026</span>,
<StatusBadge
text="Draft"
color="bg-slate-700/60 text-slate-400"
/>,
<ActionButton text="Send" />,
],
[
<span className="font-semibold text-[#2EE6C5]">INV-9105</span>,
<span className="font-semibold text-slate-100">Apple One Corp</span>,
"Jun 2026",
<span className="font-semibold">12.4 L</span>,
<span className="font-mono">Jun 5, 2026</span>,
<span className="font-mono">Jul 5, 2026</span>,
<StatusBadge
text="Sent"
color="bg-amber-500/15 text-amber-400"
/>,
<ActionButton text="Mark paid" />,
],
[
<span className="font-semibold text-[#2EE6C5]">INV-9106</span>,
<span className="font-semibold text-slate-100">Novotel F&B</span>,
"Jun 2026",
<span className="font-semibold">8.6 L</span>,
<span className="font-mono">Jun 9, 2026</span>,
<span className="font-mono">Jul 9, 2026</span>,
<StatusBadge
text="Draft"
color="bg-slate-700/60 text-slate-400"
/>,
<ActionButton text="Send" />,
],
[
<span className="font-semibold text-[#2EE6C5]">INV-9107</span>,
<span className="font-semibold text-slate-100">SRM Estates</span>,
"Jun 2026",
<span className="font-semibold">4.3 L</span>,
<span className="font-mono">Jun 13, 2026</span>,
<span className="font-mono">Jul 13, 2026</span>,
<StatusBadge
text="Draft"
color="bg-slate-700/60 text-slate-400"
/>,
<ActionButton text="Send" />,
],
[
<span className="font-semibold text-[#2EE6C5]">INV-9108</span>,
<span className="font-semibold text-slate-100">Local Mart</span>,
"Jun 2026",
<span className="font-semibold">21.0 L</span>,
<span className="font-mono">Jun 17, 2026</span>,
<span className="font-mono">Jul 17, 2026</span>,
<StatusBadge
text="Paid"
color="bg-emerald-500/15 text-emerald-400"
/>,
<span className="text-slate-500"></span>,
],
[
<span className="font-semibold text-[#2EE6C5]">INV-9107</span>,
<span className="font-semibold text-slate-100">SRM Estates</span>,
"Jun 2026",
<span className="font-semibold">4.3 L</span>,
<span className="font-mono">Jun 13, 2026</span>,
<span className="font-mono">Jul 13, 2026</span>,
<StatusBadge
text="Draft"
color="bg-slate-700/60 text-slate-400"
/>,
<ActionButton text="Send" />,
],
[
<span className="font-semibold text-[#2EE6C5]">INV-9108</span>,
<span className="font-semibold text-slate-100">Local Mart</span>,
"Jun 2026",
<span className="font-semibold">21.0 L</span>,
<span className="font-mono">Jun 17, 2026</span>,
<span className="font-mono">Jul 17, 2026</span>,
<StatusBadge
text="Paid"
color="bg-emerald-500/15 text-emerald-400"
/>,
<span className="text-slate-500"></span>,
],
];
export default function CostInvoicePortal() {
return (
<div className="my-15 text-slate-100 font-sans">
{/* --- HEADER SECTION WITH BUTTONS --- */}
<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-[10px] font-bold tracking-widest text-slate-500 uppercase font-mono">
<span className="text-teal-400">Apple One HQ Tower</span>
<span></span>
<span>FINANCE</span>
<span></span>
<span>COSTING & INVOICING</span>
</div>
<h1 className="text-2xl font-bold text-white tracking-tight mt-2">
Client costing & auto-invoicing
</h1>
<p className="text-sm font-medium text-slate-400 mt-2 max-w-xl leading-relaxed">
Client-wise costing setup, automatic project approval and invoice generation fully native, no external dependency.
</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>Costing rules</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>Generate invoice</span>
</Button>
</div>
</div>
{/* --- STAT CARDS --- */}
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-6">
{/* Billed */}
<StatCard
variant="icon"
title="Billed"
value="₹99.4 L"
icon={FileText}
badgeText="this month"
badgeClassName="text-slate-400 lowercase font-mono"
iconContainerClassName="bg-blue-950/40 border-blue-800/30 text-blue-400"
/>
{/* Outstanding */}
<StatCard
variant="icon"
title="Outstanding"
value="₹45.0 L"
icon={Database}
badgeText="receivable"
badgeClassName="text-amber-400 lowercase font-mono"
iconContainerClassName="bg-amber-950/40 border-amber-800/30 text-amber-400"
/>
{/* Overdue */}
<StatCard
variant="icon"
title="Overdue"
value="₹4.3 L"
icon={AlertTriangle}
badgeText="follow up"
badgeClassName="text-rose-400 lowercase font-mono"
iconContainerClassName="bg-rose-950/40 border-rose-900/30 text-rose-400"
/>
{/* Collection rate */}
<StatCard
variant="icon"
title="Collection rate"
value="55%"
icon={Activity}
badgeText="MTD"
badgeClassName="text-slate-400 font-mono uppercase"
iconContainerClassName="bg-emerald-950/40 border-emerald-800/30 text-emerald-400"
/>
</div>
<div className="mt-5">
<Table headers={headers} rows={rows}/>
</div>
{/* Info Banner */}
<div className="my-8">
<InfoBanner
boldText="Auto-invoicing:"
normalText=" completed work orders and AMC visits roll up into client costing by contract rate → invoice drafts are generated, approved, and dispatched without manual re-entry."
/>
</div>
</div>
);
}

View File

@@ -0,0 +1,182 @@
import { useState } from 'react';
import { Plus, Download } from 'lucide-react';
import Button from "@/components/common/button";
import NavigationTabs from '@/components/common/tabs';
import { reportFilters, reporttabs, Reqeusttabs, statusFilters } from '@/constants/constant';
import FilterTabs from '@/components/common/roundedFilters';
import Table from '@/components/common/dataTable';
const StatusBadge = ({
text,
color,
}: {
text: string;
color: string;
}) => (
<span
className={`inline-flex items-center gap-1 rounded-full px-3 py-1 text-[10px] font-semibold uppercase tracking-wider whitespace-nowrap ${color}`}
>
<span className="h-1.5 w-1.5 rounded-full bg-current" />
{text}
</span>
);
const headers = [
"Code",
"Equipment",
"Group",
"Block · Floor",
"Service Provider",
"Manufacturer",
"Model",
];
const rows = [
[
<span className="font-semibold text-teal-400 whitespace-nowrap">APP-1100</span>,
<span className="font-semibold whitespace-nowrap">Cooling Tower</span>,
"Electrical",
"Block 1 · 2",
"Blue Star",
"Kirloskar",
<span className="font-mono text-slate-400">M-550</span>,
],
[
<span className="font-semibold text-teal-400 whitespace-nowrap">APP-1103</span>,
<span className="font-semibold whitespace-nowrap">Air Handling Unit</span>,
"Plumbing",
"Tower A · 1",
"Blue Star",
"Voltas",
<span className="font-mono text-slate-400">M-550</span>,
],
[
<span className="font-semibold text-teal-400 whitespace-nowrap">APP-1106</span>,
<span className="font-semibold whitespace-nowrap">VRV Outdoor</span>,
"Electrical",
"Tower A · G",
"Voltas",
"Daikin",
<span className="font-mono text-slate-400">M-320</span>,
],
[
<span className="font-semibold text-teal-400 whitespace-nowrap">APP-1109</span>,
<span className="font-semibold whitespace-nowrap">VRV Outdoor</span>,
"HVAC",
"Tower A · 1",
"Voltas",
"Blue Star",
<span className="font-mono text-slate-400">M-320</span>,
],
[
<span className="font-semibold text-teal-400 whitespace-nowrap">APP-1112</span>,
<span className="font-semibold whitespace-nowrap">Air Handling Unit</span>,
"HVAC",
"Tower A · G",
"In-house",
"Voltas",
<span className="font-mono text-slate-400">M-550</span>,
],
[
<span className="font-semibold text-teal-400 whitespace-nowrap">APP-1115</span>,
<span className="font-semibold whitespace-nowrap">Air Handling Unit</span>,
"Electrical",
"Tower A · 2",
"Voltas",
"Daikin",
<span className="font-mono text-slate-400">M-XR9</span>,
],
[
<span className="font-semibold text-teal-400 whitespace-nowrap">APP-1118</span>,
<span className="font-semibold whitespace-nowrap">Chiller</span>,
"Electrical",
"Block 1 · 1",
"In-house",
"Blue Star",
<span className="font-mono text-slate-400">M-XR9</span>,
],
[
<span className="font-semibold text-teal-400 whitespace-nowrap">APP-1121</span>,
<span className="font-semibold whitespace-nowrap">Cooling Tower</span>,
"Plumbing",
"Tower A · 1",
"Blue Star",
"Daikin",
<span className="font-mono text-slate-400">M-550</span>,
],
];
export default function ReportPortal() {
const [activeTab, setActiveTab] = useState<string>('Equipment');
const [activeFilter, setActiveFilter] = useState<string>('Site All');
const handleDownload = () => {
// Add your export/download logic here
console.log("Downloading report...");
};
return (
<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-[10px] font-bold tracking-widest text-slate-500 uppercase font-mono">
<span className="text-teal-400">Apple One HQ Tower</span>
<span></span>
<span>INSIGHT</span>
<span></span>
<span>REPORTS</span>
</div>
<h1 className="text-2xl font-bold text-white tracking-tight mt-2">
Reports & MMR
</h1>
<p className="text-sm font-medium text-slate-400 mt-2 max-w-xl leading-relaxed">
A read-only layer over every module filter, visualise, and export. Never on the write path.
</p>
</div>
</div>
{/* --- NAVIGATION TABS & TOP ACTION BUTTONS --- */}
<div className="flex flex-col
md:flex-row md:items-center justify-between
border-b border-slate-800/80 mb-4 gap-4">
{/* Navigation Tabs */}
<NavigationTabs
tabs={reporttabs}
activeTab={activeTab}
onTabChange={setActiveTab}
className="mb-6"
/>
</div>
{/* --- STATUS PILL FILTERS & DOWNLOAD BUTTON --- */}
<div className="flex items-center justify-between gap-4">
<FilterTabs
options={reportFilters}
activeFilter={activeFilter}
onChange={setActiveFilter}
/>
<button
onClick={handleDownload}
className="inline-flex items-center gap-2 rounded-xl bg-teal-400 px-5 py-2.5 text-sm font-semibold text-slate-950 hover:bg-teal-300 transition-colors focus:outline-none focus:ring-2 focus:ring-teal-400/50 shrink-0"
>
Download
</button>
</div>
<div className='mt-5'>
<Table headers={headers} rows={rows}/>
</div>
</div>
);
}

View File

@@ -6,8 +6,8 @@ import {
LayoutGrid,
Plus
} from "lucide-react";
import Button from "@/utils/button";
import StatCard from "@/utils/dashStatCard";
import Button from "@/components/common/button";
import StatCard from "@/components/common/dashStatCard";

View File

@@ -12,12 +12,13 @@ import {
LayoutGrid,
} from "lucide-react";
import Table from "@/utils/dataTable";
import InfoBanner from "@/utils/infoBanner";
import Button from "@/utils/button";
import NavigationTabs from "@/utils/tabs";
import Table from "@/components/common/dataTable";
import InfoBanner from "@/components/common/infoBanner";
import Button from "@/components/common/button";
import NavigationTabs from "@/components/common/tabs";
import { equipmentTabs } from "@/constants/constant";
import { useState } from "react";
import StatCard from "@/components/common/dashStatCard";
const headers = [
"Code",
@@ -189,64 +190,51 @@ export default function EquipmentPortal() {
className="mb-6"
/>
{/* --- STAT CARDS (4 CARDS MATCHING SCREENSHOT) --- */}
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-6">
{/* Total equipment */}
<div className="bg-[#0b1727] border border-teal-500/50 rounded-xl p-4 flex flex-col justify-between relative shadow-lg">
<div className="flex items-center justify-between">
<div className="p-2.5 rounded-lg bg-teal-950/60 border border-teal-800/40 text-teal-400">
<Target size={18} />
</div>
<span className="text-xs font-mono text-slate-400">4 groups</span>
</div>
<div className="mt-4">
<div className="text-3xl font-bold text-white tracking-tight">8</div>
<div className="text-xs text-slate-400 mt-1 font-medium">Total equipment</div>
</div>
</div>
{/* Total equipment */}
<StatCard
variant="icon"
title="Total equipment"
value="8"
icon={Target}
badgeText="4 groups"
badgeClassName="text-slate-400 font-mono"
iconContainerClassName="bg-teal-950/60 border-teal-800/40 text-teal-400"
/>
{/* Critical assets */}
<div className="bg-[#0b1727] border border-slate-800/80 rounded-xl p-4 flex flex-col justify-between relative">
<div className="flex items-center justify-between">
<div className="p-2.5 rounded-lg bg-rose-950/50 border border-rose-800/40 text-rose-400">
<AlertTriangle size={18} />
</div>
<span className="text-xs font-mono text-rose-400 font-semibold">priority</span>
</div>
<div className="mt-4">
<div className="text-3xl font-bold text-white tracking-tight">4</div>
<div className="text-xs text-slate-400 mt-1 font-medium">Critical assets</div>
</div>
</div>
{/* Critical assets */}
<StatCard
variant="icon"
title="Critical assets"
value="4"
icon={AlertTriangle}
badgeText="priority"
badgeClassName="text-rose-400 font-semibold font-mono"
iconContainerClassName="bg-rose-950/50 border-rose-800/40 text-rose-400"
/>
{/* PPM attention */}
<div className="bg-[#0b1727] border border-slate-800/80 rounded-xl p-4 flex flex-col justify-between relative">
<div className="flex items-center justify-between">
<div className="p-2.5 rounded-lg bg-amber-950/50 border border-amber-800/40 text-amber-400">
<Clock size={18} />
</div>
<span className="text-xs font-mono text-amber-400 font-semibold">due / overdue</span>
</div>
<div className="mt-4">
<div className="text-3xl font-bold text-white tracking-tight">3</div>
<div className="text-xs text-slate-400 mt-1 font-medium">PPM attention</div>
</div>
</div>
{/* PPM attention */}
<StatCard
variant="icon"
title="PPM attention"
value="3"
icon={Clock}
badgeText="due / overdue"
badgeClassName="text-amber-400 font-semibold font-mono"
iconContainerClassName="bg-amber-950/50 border-amber-800/40 text-amber-400"
/>
{/* On plan */}
<div className="bg-[#0b1727] border border-slate-800/80 rounded-xl p-4 flex flex-col justify-between relative">
<div className="flex items-center justify-between">
<div className="p-2.5 rounded-lg bg-emerald-950/50 border border-emerald-800/40 text-emerald-400">
<ShieldCheck size={18} />
</div>
<span className="text-xs font-mono text-emerald-400 font-semibold">healthy</span>
</div>
<div className="mt-4">
<div className="text-3xl font-bold text-white tracking-tight">5</div>
<div className="text-xs text-slate-400 mt-1 font-medium">On plan</div>
</div>
</div>
</div>
{/* On plan */}
<StatCard
variant="icon"
title="On plan"
value="5"
icon={ShieldCheck}
badgeText="healthy"
badgeClassName="text-emerald-400 font-semibold font-mono"
iconContainerClassName="bg-emerald-950/50 border-emerald-800/40 text-emerald-400"
/>
</div>
{/* --- ROW 2: SEARCH, FILTERS & ACTION BUTTONS --- */}
<div className="flex flex-col md:flex-row items-center justify-between gap-3 mb-6">

View File

@@ -11,10 +11,10 @@ import {
Pencil,
Plus,
} from 'lucide-react';
import Button from "@/utils/button";
import StatCard from "@/utils/dashStatCard";
import Table from "@/utils/dataTable";
import NavigationTabs from '@/utils/tabs';
import Button from "@/components/common/button";
import StatCard from "@/components/common/dashStatCard";
import Table from "@/components/common/dataTable";
import NavigationTabs from '@/components/common/tabs';
import { helpdeskTtabs } from '@/constants/constant';
const StatusBadge = ({

View File

@@ -6,9 +6,9 @@ import {
LayoutGrid,
Plus
} from "lucide-react";
import Button from "@/utils/button";
import StatCard from "@/utils/dashStatCard";
import InfoBanner from "@/utils/infoBanner";
import Button from "@/components/common/button";
import StatCard from "@/components/common/dashStatCard";
import InfoBanner from "@/components/common/infoBanner";

View File

@@ -1,11 +1,11 @@
import { useState } from 'react';
import { Plus } from 'lucide-react';
import Button from "@/utils/button";
import LocationTable from '@/utils/dataTable';
import NavigationTabs from '@/utils/tabs';
import Button from "@/components/common/button";
import LocationTable from '@/components/common/dataTable';
import NavigationTabs from '@/components/common/tabs';
import { Reqeusttabs,statusFilters } from '@/constants/constant';
import FilterTabs from '@/utils/roundedFilters';
import Table from '@/utils/dataTable';
import FilterTabs from '@/components/common/roundedFilters';
import Table from '@/components/common/dataTable';
const StatusBadge = ({

View File

@@ -7,9 +7,9 @@ import {
BarChart2,
Plus
} from "lucide-react";
import Button from "@/utils/button";
import StatCard from "@/utils/dashStatCard";
import InfoBanner from "@/utils/infoBanner";
import Button from "@/components/common/button";
import StatCard from "@/components/common/dashStatCard";
import InfoBanner from "@/components/common/infoBanner";
export default function VendorServicePortal() {
const vendorData = [

View File

@@ -1,13 +1,13 @@
import { useState } from 'react';
import { Plus, ShieldCheck, Clock, Check, AlertTriangle, QrCode, FileText, Eye } from 'lucide-react';
import Button from "@/utils/button";
import Button from "@/components/common/button";
import { workPermitFilters } from '@/constants/constant';
import FilterTabs from '@/utils/roundedFilters';
import StatCard from '@/utils/dashStatCard';
import InfoBanner from '@/utils/infoBanner';
import FilterTabs from '@/components/common/roundedFilters';
import StatCard from '@/components/common/dashStatCard';
import InfoBanner from '@/components/common/infoBanner';
export default function WorkPermitPortal() {
const [activeTab, setActiveTab] = useState<string>('TFM Requests');
const [activeFilter, setActiveFilter] = useState<string>('All');
// Permit Data matching the UI

View File

@@ -1,4 +1,4 @@
import { ActivityFeedProps } from "@/constants/types"
import { ActivityFeedProps } from "@/types/types"

View File

@@ -1,14 +1,14 @@
import { Building2, ShieldCheck, Database, Leaf, FileSpreadsheet } from "lucide-react";
import StatCard from "@/utils/dashStatCard";
import StatCard from "@/components/common/dashStatCard";
import { energyData } from "@/constants/constant";
import BarChart from "@/utils/barchart";
import InfoBanner from "@/utils/infoBanner";
import Button from "@/utils/button";
import { ProgressBarRow } from "@/utils/progressBarRow";
import BarChart from "@/components/charts/barchart";
import InfoBanner from "@/components/common/infoBanner";
import Button from "@/components/common/button";
import { ProgressBarRow } from "@/components/charts/progressBarRow";
// Import your custom Card components
import { Card } from "@/utils/cardWrapper";
import { CardHeader } from "@/utils/cardHeader";
import { Card } from "@/components/common/cardWrapper";
import { CardHeader } from "@/components/common/cardHeader";
export default function BuildingOwnerPortal() {
return (

View File

@@ -1,13 +1,13 @@
import { Check } from 'lucide-react';
import BarChart from "@/utils/barchart";
import StatCard from "@/utils/dashStatCard";
import ActivityFeed from "@/components/dashboard/activityFeed";
import BarChart from "@/components/charts/barchart";
import StatCard from "@/components/common/dashStatCard";
import ActivityFeed from "@/components/dashboard/overview/activityFeed";
import {activities, chartData} from "@/constants/constant"
import { Card } from '@/utils/cardWrapper';
import {CardHeader} from '@/utils/cardHeader';
import {ProgressBarRow }from '@/utils/progressBarRow';
import {StatusProgressRow} from '@/utils/statusProgressRow';
import { Card } from '@/components/common/cardWrapper';
import {CardHeader} from '@/components/common/cardHeader';
import {ProgressBarRow }from '@/components/charts/progressBarRow';
import {StatusProgressRow} from '@/components/charts/statusProgressRow';
export default function Dashboard() {

View File

@@ -8,13 +8,13 @@ import {
} from "lucide-react";
import { SATISFACTION_DRIVERS, TICKETS_DATA } from "@/constants/constant";
import StatCard from "../../utils/dashStatCard";
import Button from "@/utils/button";
import InfoBanner from "@/utils/infoBanner";
import StatCard from "../../common/dashStatCard";
import Button from "@/components/common/button";
import InfoBanner from "@/components/common/infoBanner";
// Import your custom Card components
import { Card } from "@/utils/cardWrapper";
import { CardHeader } from "@/utils/cardHeader";
import { Card } from "@/components/common/cardWrapper";
import { CardHeader } from "@/components/common/cardHeader";
export default function EngagementPage() {
return (

View File

@@ -1,7 +1,7 @@
import Button from "@/utils/button";
import StatCard from "@/utils/dashStatCard";
import InfoBanner from "@/utils/infoBanner";
import { ProgressBarRow } from "@/utils/progressBarRow";
import Button from "@/components/common/button";
import StatCard from "@/components/common/dashStatCard";
import InfoBanner from "@/components/common/infoBanner";
import { ProgressBarRow } from "@/components/charts/progressBarRow";
import {
FileText,
Wrench,
@@ -12,8 +12,8 @@ import {
} from "lucide-react";
// Import your custom Card components
import { Card } from "@/utils/cardWrapper";
import { CardHeader } from "@/utils/cardHeader";
import { Card } from "@/components/common/cardWrapper";
import { CardHeader } from "@/components/common/cardHeader";
export default function PropertyManagerPortal() {

View File

@@ -1,6 +1,6 @@
import Button from "@/utils/button";
import StatCard from "@/utils/dashStatCard";
import InfoBanner from "@/utils/infoBanner";
import Button from "@/components/common/button";
import StatCard from "@/components/common/dashStatCard";
import InfoBanner from "@/components/common/infoBanner";
import {
FileText,
Wrench,
@@ -11,8 +11,8 @@ import {
} from "lucide-react";
// Import your custom Card components
import { Card } from "@/utils/cardWrapper";
import { CardHeader } from "@/utils/cardHeader";
import { Card } from "@/components/common/cardWrapper";
import { CardHeader } from "@/components/common/cardHeader";
export default function ServiceEngineerPortal() {
return (

View File

@@ -0,0 +1,179 @@
import { useState } from 'react';
import {
Calendar,
Clock,
Activity,
Check,
Plus,
Pencil,
Trash2
} from "lucide-react";
import Button from "@/components/common/button";
import StatCard from "@/components/common/dashStatCard";
import { roomData, scheduleData } from '@/constants/constant';
import { Card } from '@/components/common/cardWrapper';
import { CardHeader } from '@/components/common/cardHeader';
// Your Card Comp
export default function MeetingRoomPortal() {
return (
<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-[10px] font-bold tracking-widest text-slate-500 uppercase font-mono">
<span className="text-teal-400">Apple One HQ Tower</span>
<span></span>
<span>WORKPLACE</span>
<span></span>
<span>MEETING ROOMS</span>
</div>
<h1 className="text-2xl font-bold text-white tracking-tight mt-1">
Meeting room booking
</h1>
<p className="text-sm font-medium text-slate-400 mt-1 max-w-xl leading-relaxed">
Real-time availability, calendar-synced reservations, room services and utilization analytics.
</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">
<Calendar className="w-4 h-4 text-slate-300" />
<span>Sync calendar</span>
</Button>
<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">
<Plus className="w-4 h-4 text-slate-300" />
<span>Add room</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>Book room</span>
</Button>
</div>
</div>
{/* --- STAT CARDS --- */}
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-6">
{/* Available now */}
<StatCard
variant="icon"
title="Available now"
value="3"
icon={Calendar}
badgeText="of 6 rooms"
badgeClassName="text-emerald-400 lowercase font-mono"
iconContainerClassName="bg-emerald-950/40 border-emerald-800/30 text-emerald-400"
/>
{/* In use now */}
<StatCard
variant="icon"
title="In use now"
value="2"
icon={Clock}
badgeText="live"
badgeClassName="text-rose-400 lowercase font-mono"
iconContainerClassName="bg-rose-950/40 border-rose-900/30 text-rose-400"
/>
{/* Utilization */}
<StatCard
variant="icon"
title="Utilization"
value="50%"
icon={Activity}
badgeText="today"
badgeClassName="text-slate-400 lowercase font-mono"
iconContainerClassName="bg-blue-950/50 border-blue-800/30 text-blue-400"
/>
{/* Bookings today */}
<StatCard
variant="icon"
title="Bookings today"
value="5"
icon={Check}
badgeText="scheduled"
badgeClassName="text-slate-400 lowercase font-mono"
iconContainerClassName="bg-amber-950/40 border-amber-800/30 text-amber-500"
/>
</div>
{/* --- MAIN CONTENT UI (ADDED BELOW STAT CARDS) --- */}
<div className="grid grid-cols-1 lg:grid-cols-3 gap-6">
{/* Room List (Left 2 Columns) */}
<div className="lg:col-span-2 grid grid-cols-1 md:grid-cols-2 gap-4">
{roomData.map((room) => (
<Card key={room.id} className="min-h-[170px]">
<div>
{/* Header info inside room card */}
<div className="flex justify-between items-start mb-1">
<div>
<h3 className="text-white font-semibold text-base">{room.name}</h3>
<p className="text-xs text-slate-400 font-mono mt-0.5">{room.location}</p>
</div>
<span className={`flex items-center gap-1.5 px-2 py-0.5 rounded text-[10px] font-mono font-bold border ${room.statusColor}`}>
<span className={`w-1.5 h-1.5 rounded-full ${room.dotColor}`} />
{room.status}
</span>
</div>
{/* Feature Tags */}
<div className="flex flex-wrap gap-1.5 my-3">
{room.tags.map((tag, idx) => (
<span key={idx} className="bg-[#12233a] border border-[#1d3554] text-slate-300 text-[11px] px-2 py-0.5 rounded">
{tag}
</span>
))}
</div>
</div>
{/* Bottom Info & Action Buttons */}
<div className="flex items-center justify-between border-t border-[#162942]/60 pt-3 mt-2">
<span className="text-xs text-slate-400">{room.subtitle}</span>
<div className="flex items-center gap-1.5">
<button className="bg-[#12233a] hover:bg-[#1a3252] border border-[#1d3554] text-slate-200 text-xs font-semibold px-3 py-1.5 rounded transition-colors">
{room.actionType === "book" ? "Book" : "View"}
</button>
<button className="bg-[#12233a] hover:bg-[#1a3252] border border-[#1d3554] text-slate-400 hover:text-slate-200 p-1.5 rounded transition-colors">
<Pencil className="w-3.5 h-3.5" />
</button>
<button className="bg-[#12233a] hover:bg-[#1a3252] border border-[#1d3554] text-slate-400 hover:text-rose-400 p-1.5 rounded transition-colors">
<Trash2 className="w-3.5 h-3.5" />
</button>
</div>
</div>
</Card>
))}
</div>
{/* Today's Schedule Timeline (Right 1 Column) */}
<div>
<Card className="h-full justify-start">
<CardHeader title="Todays schedule" subtitle="Apple One — HQ Tower" />
<div className="mt-4 space-y-6 relative before:absolute before:inset-0 before:left-[7px] before:w-[2px] before:bg-[#1d3554] pl-6">
{scheduleData.map((item, idx) => (
<div key={idx} className="relative">
{/* Timeline dot */}
<span className="absolute -left-[23px] top-1 w-3.5 h-3.5 rounded-full border-2 border-[#0a1526] bg-teal-400 ring-2 ring-teal-400/20" />
{/* Event Details */}
<h4 className="text-sm font-semibold text-white leading-tight">
{item.room} <span className="text-slate-400 font-normal"> {item.title}</span>
</h4>
<p className="text-xs text-slate-500 font-mono mt-1">
{item.time} <span className="text-slate-600"></span> {item.status}
</p>
</div>
))}
</div>
</Card>
</div>
</div>
</div>
);
}

View File

@@ -7,12 +7,12 @@ import {
BarChart2,
Plus
} from "lucide-react";
import Button from "@/utils/button";
import StatCard from "@/utils/dashStatCard";
import InfoBanner from "@/utils/infoBanner";
import FilterTabs from '@/utils/roundedFilters';
import Button from "@/components/common/button";
import StatCard from "@/components/common/dashStatCard";
import InfoBanner from "@/components/common/infoBanner";
import FilterTabs from '@/components/common/roundedFilters';
import { visitorFilters } from '@/constants/constant';
import Table from '@/utils/dataTable';
import Table from '@/components/common/dataTable';
export default function VistiorManagementPortal() {
const headers = [

View File

@@ -0,0 +1,218 @@
import {
Activity,
Monitor,
Clock,
ShieldCheck,
Pencil,
Trash2,
Sparkles,
Plus
} from "lucide-react";
import InfoBanner from "@/components/common/infoBanner";
import Button from "@/components/common/button";
import NavigationTabs from "@/components/common/tabs";
import { useState } from "react";
import { workspaceTabs, zoneUtilizationData } from "@/constants/constant";
import StatCard from "@/components/common/dashStatCard";
import { Card } from '@/components/common/cardWrapper';
import { CardHeader } from '@/components/common/cardHeader';
export default function WorkSpacePortal() {
const [activeTab, setActiveTab] = useState<string>("Desk Booking");
// Grid state matching the UI: 4 rows x 12 columns (48 seats)
// Types: 'occupied' (red/purple outline), 'free' (teal), 'reserved' (amber)
const deskGrid = Array.from({ length: 48 }).map((_, index) => {
if (index === 42) return "reserved"; // 1 Reserved desk
if (index >= 36) return "free"; // Free desks on the bottom row
return "occupied"; // Occupied desks
});
return (
<div className="my-15 text-slate-100 font-sans">
{/* --- HEADER SECTION WITH BUTTONS --- */}
<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-[10px] font-bold tracking-widest text-slate-500 uppercase font-mono">
<span className="text-teal-400">Apple One HQ Tower</span>
<span></span>
<span>WORKPLACE</span>
<span></span>
<span>WORKSPACE</span>
</div>
<h1 className="text-2xl font-bold text-white tracking-tight mt-2">
Workspace management
</h1>
<p className="text-sm font-medium text-slate-400 mt-2 max-w-xl leading-relaxed">
Desk booking, live floor plans and shift timetable unified, all reading the Block Floor Zone master.
</p>
</div>
{/* --- ACTION BUTTONS --- */}
<div className="flex items-center gap-2.5 self-start mt-10">
<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>Policies</span>
</Button>
<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">
<Plus className="w-4 h-4 text-slate-300" />
<span>Add zone</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>Book desk</span>
</Button>
</div>
</div>
{/* Navigation Tabs */}
<NavigationTabs
tabs={workspaceTabs}
activeTab={activeTab}
onTabChange={setActiveTab}
className="mb-6"
/>
{/* --- STAT CARDS --- */}
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-6">
{/* Total desks */}
<StatCard
variant="icon"
title="Total desks"
value="162"
icon={Monitor}
badgeText="4 zones"
badgeClassName="text-slate-400 lowercase font-mono"
iconContainerClassName="bg-blue-950/40 border-blue-800/30 text-blue-400"
/>
{/* Available */}
<StatCard
variant="icon"
title="Available"
value="39"
icon={ShieldCheck}
badgeText="free now"
badgeClassName="text-emerald-400 lowercase font-mono"
iconContainerClassName="bg-emerald-950/40 border-emerald-800/30 text-emerald-400"
/>
{/* Occupied */}
<StatCard
variant="icon"
title="Occupied"
value="123"
icon={Clock}
badgeText="checked in"
badgeClassName="text-rose-400 lowercase font-mono"
iconContainerClassName="bg-rose-950/40 border-rose-900/30 text-rose-400"
/>
{/* Utilization */}
<StatCard
variant="icon"
title="Utilization"
value="76%"
icon={Activity}
badgeText="today"
badgeClassName="text-slate-400 lowercase font-mono"
iconContainerClassName="bg-amber-950/40 border-amber-800/30 text-amber-400"
/>
</div>
{/* --- OCCUPANCY & ZONE UTILIZATION SECTION --- */}
<div className="grid grid-cols-1 lg:grid-cols-3 gap-6 mb-8">
{/* Live Occupancy Grid (Left 2 Columns) */}
<Card className="lg:col-span-2 justify-start">
<CardHeader
title="Live occupancy · North Wing L8"
subtitle="39 / 48 occupied"
/>
{/* Desk Layout Grid */}
<div className="grid grid-cols-6 sm:grid-cols-12 gap-2 my-4">
{deskGrid.map((type, i) => (
<div
key={i}
className={`h-10 rounded-lg border transition-all ${
type === "occupied"
? "bg-[#181828]/50 border-rose-500/30"
: type === "free"
? "bg-teal-950/30 border-teal-500/50"
: "bg-slate-900/60 border-amber-500/50"
}`}
/>
))}
</div>
{/* Map Legend */}
<div className="flex items-center gap-6 mt-2 pt-2 text-xs text-slate-400">
<div className="flex items-center gap-2">
<span className="w-3 h-3 rounded border border-teal-500/50 bg-teal-950/30" />
<span>Free</span>
</div>
<div className="flex items-center gap-2">
<span className="w-3 h-3 rounded border border-amber-500/50 bg-slate-900/60" />
<span>Reserved</span>
</div>
<div className="flex items-center gap-2">
<span className="w-3 h-3 rounded border border-rose-500/30 bg-[#181828]/50" />
<span>Occupied</span>
</div>
</div>
</Card>
{/* Zone Utilization Bars (Right 1 Column) */}
<Card className="justify-start">
<CardHeader title="Zone utilization" />
<div className="space-y-5 mt-3">
{zoneUtilizationData.map((zone, idx) => {
const percentage = Math.round((zone.current / zone.max) * 100);
return (
<div key={idx} className="flex items-center justify-between gap-3">
<span className="text-xs font-medium text-slate-300 w-32 truncate">
{zone.name}
</span>
{/* Progress Bar Container */}
<div className="flex-1 bg-[#12233a] h-2 rounded-full overflow-hidden">
<div
className={`h-full ${zone.barColor} transition-all duration-300`}
style={{ width: `${percentage}%` }}
/>
</div>
{/* Value & Actions */}
<div className="flex items-center gap-2 font-mono text-xs text-slate-200">
<span className="font-bold">{zone.current}/{zone.max}</span>
<button className="bg-[#12233a] hover:bg-[#1a3252] border border-[#1d3554] text-slate-400 hover:text-slate-200 p-1 rounded transition-colors">
<Pencil className="w-3 h-3" />
</button>
<button className="bg-[#12233a] hover:bg-[#1a3252] border border-[#1d3554] text-slate-400 hover:text-rose-400 p-1 rounded transition-colors">
<Trash2 className="w-3 h-3" />
</button>
</div>
</div>
);
})}
</div>
</Card>
</div>
{/* Info Banner */}
<div className="my-8">
<InfoBanner
boldText="Policy:"
normalText="hot desks auto-release after a 15-min no-show; fixed desks are role-assigned; collaboration zones are first-come via QR check-in."
/>
</div>
</div>
);
}

View File

@@ -0,0 +1,83 @@
import { Search, HelpCircle, Globe, Sun, Bell, ChevronDown, MapPin } from 'lucide-react';
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.
*/
<header className="fixed top-0 right-0 left-64 z-30 flex h-16 items-center justify-between border-b border-[#142538]/50 bg-[#071321] px-8">
{/* Left Group */}
<div className="flex items-center gap-2">
{/* Company Selector */}
<div className="flex items-center gap-2 rounded-full bg-[#0a1826] px-3 py-1.5 text-sm font-semibold text-[#10b981] border border-[#132338] cursor-pointer hover:bg-[#0f2338] transition whitespace-nowrap">
<span className="h-2 w-2 rounded-full bg-[#10b981] shrink-0"></span>
<span className="font-semibold">Apple One</span>
<ChevronDown className="h-3.5 w-3.5 text-[#10b981]" />
</div>
{/* Location Selector */}
<div className="flex items-center gap-2 rounded-full bg-[#0a1826] px-4 py-2 text-sm font-medium text-[#cbd5e1] border border-[#132338] cursor-pointer hover:bg-[#0f2338] transition whitespace-nowrap">
<MapPin className="h-4 w-4 text-gray-500 shrink-0" />
<span className="whitespace-nowrap">
Apple One <span className="text-[#cbd5e1] font-semibold">HQ Tower</span>
</span>
<ChevronDown className="h-4 w-4 text-gray-500 shrink-0" />
</div>
{/* Search Bar */}
<div className="relative w-60">
<Search className="absolute left-4 top-2.5 h-4 w-4 text-gray-500" />
<input
type="text"
placeholder="Search requests, equipment, met"
className="w-full rounded-xl bg-[#0a1826] pl-10 pr-4 py-2 text-sm text-white placeholder-gray-500 border border-[#132338] focus:outline-none focus:border-[#3de0c4]/50"
/>
</div>
</div>
{/* Right Utilities */}
<div className="flex items-center gap-3">
{/* Tour */}
<button className="flex items-center gap-2 rounded-xl border border-[#132338] bg-[#0a1826] px-4 py-2 text-sm font-semibold text-white transition hover:bg-[#14253d]">
<HelpCircle className="h-4 w-4 text-gray-400" />
<span>Tour</span>
</button>
{/* Language */}
<div className="flex items-center gap-1.5 rounded-xl border border-[#132338] bg-[#0a1826] px-4 py-2 text-sm font-semibold text-[#cbd5e1] cursor-pointer hover:bg-[#14253d]">
<Globe className="h-4 w-4 text-gray-400" />
<span>English</span>
<ChevronDown className="h-4 w-4 text-gray-500" />
</div>
{/* Live Indicator */}
<div className="flex items-center gap-2 px-1 text-sm font-bold text-[#10b981] tracking-wider">
<span className="h-1.5 w-1.5 rounded-full bg-[#10b981]"></span>
<span className="text-xs font-bold text-gray-400">LIVE</span>
</div>
{/* Theme Toggle */}
<button className="flex h-9 w-9 items-center justify-center rounded-xl border border-[#132338] bg-[#0a1826] text-gray-400 hover:text-white transition">
<Sun className="h-4 w-4" />
</button>
{/* Notifications */}
<div className="relative flex h-9 w-9 items-center justify-center rounded-xl border border-[#132338] bg-[#0a1826] cursor-pointer hover:bg-[#14253d] transition">
<Bell className="h-4 w-4 text-gray-400" />
<span className="absolute -top-1 -right-1 flex h-4 w-4 items-center justify-center rounded-full bg-[#ef4444] text-[9px] font-bold text-white">
8
</span>
</div>
{/* Profile Avatar */}
<div className="flex h-9 w-9 items-center justify-center rounded-full bg-[#1b3454] text-xs font-bold text-white cursor-pointer hover:opacity-90 transition">
DH
</div>
</div>
</header>
);
}

View File

@@ -0,0 +1,50 @@
"use client";
import Link from "next/link";
import { useState } from "react";
import { ChevronDown } from "lucide-react";
import {Props} from "@/types/types";
import Button from "@/components/common/button";
export default function SidebarItem({ item }: Props) {
const [open, setOpen] = useState(item.title === "Overview");
return (
<div className=" border-b border-slate-800 ">
<Button
onClick={() => setOpen(!open)}
className="flex w-full items-center justify-between
px-3 py-4 hover:bg-slate-900"
>
<div className="flex items-center gap-2">
<item.icon size={16} />
<span className="text-base">{item.title}</span>
</div>
<ChevronDown
size={16}
className={`transition-transform ${
open ? "rotate-180" : ""
}`}
/>
</Button>
{open && item.children.length > 0 && (
<div className="ml-4 border-l border-slate-700 pl-2 pb-1">
{item.children.map((child: any) => (
<Link
key={child.title}
href={child.href}
className="group mt-2 flex items-center gap-3 rounded-lg px-2 py-2 text-slate-300 hover:bg-teal-500/20 hover:text-teal-400"
>
<child.icon size={16} />
<span>{child.title}</span>
</Link>
))}
</div>
)}
</div>
);
}

View File

@@ -0,0 +1,82 @@
import { SIDEBAR_ITEMS } from "@/constants/constant";
import SidebarItem from "./sideBarItem";
import {
ShieldCheck,
Activity,
ChevronDown,
ChevronsLeft,
} from "lucide-react";
import { useSession, signOut } from "next-auth/react";
export default function Sidebar() {
const { data: session } = useSession();
console.log("Session data ",session?.user?.name)
console.log("Session data ",session?.user?.email)
return (
<aside className="fixed bg-[#071321] text-white h-screen overflow-y-auto [scrollbar-color:#1b2a40_#071321] [scrollbar-width:thin]">
<div className="flex items-center gap-2 px-2 pt-2 pb-3">
<div className="flex h-9 w-9 items-center justify-center rounded-lg
bg-[#3de0c4] font-bold text-[#05111d] text-sm">
K
</div>
<span className="text-sm font-bold tracking-tight text-white">
KA<span className="text-[#3de0c4]">FM</span>
</span>
</div>
<hr className="border-[#142538]" />
<div className="mx-4 my-4 flex rounded-xl
bg-[#091624] p-2 border border-[#142538]">
<button className="flex flex-1
items-center justify-center gap-1 rounded-lg bg-[#3de0c4] py-1.5 text-xs
text-black font-bold shadow-sm">
<Activity size={14} />
Operations
</button>
<button className="flex flex-1 items-center justify-center gap-1
rounded-lg py-1 text-xs text-slate-400 font-medium hover:text-white transition-colors">
<ShieldCheck size={14} />
Admin
</button>
</div>
<p className="px-2 pt-2 pb-1 text-xs font-semibold uppercase
tracking-wider text-slate-500">
Tenant runtime
</p>
<div className="py-2">
{SIDEBAR_ITEMS.map((item) => (
<SidebarItem
key={item.title}
item={item}
/>
))}
</div>
<div className="px-3 pb-2 pt-1
border-t border-[#0f1f30]">
<button className="flex w-full items-center gap-2 rounded-xl py-2 px-3 text-xs text-slate-400 hover:bg-[#091624] hover:text-white transition-colors">
<ChevronsLeft size={16} />
Minimise menu
</button>
</div>
{/* Profile Card Section */}
<div className="m-3 mt-0 rounded-xl border border-[#142538] bg-[#071321] p-2.5">
<div className="flex items-center justify-between">
<div className="flex gap-2.5 items-center">
<div className="flex h-9 w-9 shrink-0 items-center justify-center rounded-lg border border-cyan-600/50 bg-[#0d2430] text-cyan-400 text-xs font-bold">
DT
</div>
<div className="min-w-0 leading-tight">
<h4 className="font-semibold text-xs text-white truncate">{session?.user?.name}</h4>
<p className="text-[11px] text-slate-500 truncate">
{session?.user?.email}
</p>
</div>
</div>
<ChevronDown className="-rotate-90 text-slate-500 shrink-0" size={14}
onClick={() => signOut({ callbackUrl: "/login" })} />
</div>
</div>
</aside>
);
}