Project structure changes ad new files added in dashboard folders
This commit is contained in:
201
components/dashboard/finance/budget.tsx
Normal file
201
components/dashboard/finance/budget.tsx
Normal 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>
|
||||
);
|
||||
}
|
||||
298
components/dashboard/finance/costInvoice.tsx
Normal file
298
components/dashboard/finance/costInvoice.tsx
Normal 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>
|
||||
);
|
||||
}
|
||||
182
components/dashboard/insight/reports.tsx
Normal file
182
components/dashboard/insight/reports.tsx
Normal 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>
|
||||
);
|
||||
}
|
||||
@@ -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";
|
||||
|
||||
|
||||
|
||||
@@ -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">
|
||||
@@ -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 = ({
|
||||
@@ -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";
|
||||
|
||||
|
||||
|
||||
@@ -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 = ({
|
||||
@@ -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 = [
|
||||
@@ -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
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ActivityFeedProps } from "@/constants/types"
|
||||
import { ActivityFeedProps } from "@/types/types"
|
||||
|
||||
|
||||
|
||||
@@ -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 (
|
||||
@@ -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() {
|
||||
|
||||
@@ -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 (
|
||||
@@ -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() {
|
||||
@@ -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 (
|
||||
179
components/dashboard/workplace/meetingRoom.tsx
Normal file
179
components/dashboard/workplace/meetingRoom.tsx
Normal 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="Today’s 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>
|
||||
);
|
||||
}
|
||||
@@ -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 = [
|
||||
218
components/dashboard/workplace/workspace.tsx
Normal file
218
components/dashboard/workplace/workspace.tsx
Normal 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>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user