Operations dashboard screens are added

This commit is contained in:
2026-07-20 18:06:04 +05:30
parent a0426e8c8a
commit 0c9151b3a0
33 changed files with 826 additions and 47 deletions

View File

@@ -0,0 +1,96 @@
import { useState } from 'react';
import { Plus } from 'lucide-react';
import Button from "@/utils/button";
import LocationTable from '@/utils/table';
import NavigationTabs from '@/utils/tabs';
import { Reqeusttabs } from '@/constants/constant';
export default function ServiceRequestsPortal() {
const [activeTab, setActiveTab] = useState<string>('TFM Requests');
const [activeFilter, setActiveFilter] = useState<string>('All');
const statusFilters = [
{ label: 'All', count: 18 },
{ label: 'Registered', count: 4 },
{ label: 'Assigned', count: 3 },
{ label: 'Working', count: 4 },
{ label: 'Completed', count: 3 },
{ label: 'Overdue', count: 4 },
];
return (
<div className="my-15 text-slate-100 max-w-7xl mx-auto 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>Operations</span>
<span></span>
<span>Requests</span>
</div>
<h1 className="text-2xl font-bold text-white tracking-tight mt-2">
Service requests
</h1>
<p className="text-sm font-medium text-slate-400 mt-2 max-w-xl leading-relaxed">
TFM helpdesk tickets, engineering breakdowns, and auto-generated recurring complaints one request lifecycle.
</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-6 gap-4">
{/* Navigation Tabs */}
<NavigationTabs
tabs={Reqeusttabs}
activeTab={activeTab}
onTabChange={setActiveTab}
className="mb-6"
/>
{/* Action Buttons */}
<div className="flex items-center gap-3 pb-3 md:pb-0">
<Button className="flex items-center gap-2 bg-[#0b1727] hover:bg-slate-800/60 text-slate-200 border border-slate-800 rounded-lg px-4 py-2 text-xs font-semibold transition-colors">
<span>Export</span>
</Button>
<Button className="flex items-center gap-2 bg-teal-400 hover:bg-teal-300 text-slate-950 font-bold rounded-lg px-4 py-2 text-xs transition-colors">
<Plus size={16} className="stroke-[3]" />
<span>New request</span>
</Button>
</div>
</div>
{/* --- STATUS PILL FILTERS --- */}
<div className="flex items-center gap-2.5 overflow-x-auto no-scrollbar py-1">
{statusFilters.map((filter) => {
const isActive = activeFilter === filter.label;
return (
<button
key={filter.label}
onClick={() => setActiveFilter(filter.label)}
className={`flex items-center gap-2 px-3.5 py-1.5 rounded-full text-xs font-medium transition-all ${
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>
<span
className={`font-mono text-[11px] ${
isActive ? 'text-teal-400 font-bold' : 'text-slate-400'
}`}
>
{filter.count}
</span>
</button>
);
})}
</div>
<LocationTable/>
</div>
);
}