table constant data is added and Compliance Safety completed
This commit is contained in:
@@ -13,165 +13,9 @@ import InfoBanner from "@/components/common/infoBanner";
|
||||
import FilterTabs from '@/components/common/roundedFilters';
|
||||
import { visitorFilters } from '@/constants/constant';
|
||||
import Table from '@/components/common/dataTable';
|
||||
import { visitorheaders, visitorrows } from '@/constants/tabledata';
|
||||
|
||||
export default function VistiorManagementPortal() {
|
||||
const headers = [
|
||||
"Pass",
|
||||
"Visitor",
|
||||
"Company",
|
||||
"Host",
|
||||
"Purpose",
|
||||
"Type",
|
||||
"In",
|
||||
"Out",
|
||||
"Status",
|
||||
"",
|
||||
];
|
||||
const Badge = ({
|
||||
text,
|
||||
color,
|
||||
}: {
|
||||
text: string;
|
||||
color: string;
|
||||
}) => (
|
||||
<span
|
||||
className={`inline-flex items-center rounded-full px-3 py-1 text-[10px] font-bold uppercase tracking-wider ${color}`}
|
||||
>
|
||||
<span className="mr-1.5 h-1.5 w-1.5 rounded-full bg-current"></span>
|
||||
{text}
|
||||
</span>
|
||||
);
|
||||
|
||||
const rows = [
|
||||
[
|
||||
<span className="font-semibold text-[#2EE6C5]">VIS-4145</span>,
|
||||
<span className="font-semibold text-slate-100">Rahul Mehta</span>,
|
||||
"Voltas Ltd",
|
||||
"Dhananjay T.",
|
||||
"Maintenance visit",
|
||||
<span className="px-3 py-1 rounded-lg bg-slate-900 border border-slate-700 text-xs">Contractor</span>,
|
||||
"09:12",
|
||||
"—",
|
||||
<Badge text="Checked-In" color="bg-emerald-500/15 text-emerald-400" />,
|
||||
<Button className="text-teal-400 font-semibold hover:text-teal-300">Check out</Button>,
|
||||
],
|
||||
|
||||
[
|
||||
<span className="font-semibold text-[#2EE6C5]">VIS-4146</span>,
|
||||
<span className="font-semibold text-slate-100">Anita Desai</span>,
|
||||
"Siemens",
|
||||
"ME Local",
|
||||
"Interview",
|
||||
<span className="px-3 py-1 rounded-lg bg-slate-900 border border-slate-700 text-xs">Interview</span>,
|
||||
"—",
|
||||
"—",
|
||||
<Badge text="Expected" color="bg-blue-500/15 text-blue-400" />,
|
||||
<Button className="text-emerald-400 font-semibold hover:text-emerald-300">Check in</Button>,
|
||||
],
|
||||
|
||||
[
|
||||
<span className="font-semibold text-[#2EE6C5]">VIS-4147</span>,
|
||||
<span className="font-semibold text-slate-100">Karthik R.</span>,
|
||||
"Schindler",
|
||||
"Site FM Lead",
|
||||
"Client meeting",
|
||||
<span className="px-3 py-1 rounded-lg bg-slate-900 border border-slate-700 text-xs">Guest</span>,
|
||||
"08:05",
|
||||
"10:40",
|
||||
<Badge text="Checked-Out" color="bg-slate-700 text-slate-400" />,
|
||||
<span className="text-slate-500">—</span>,
|
||||
],
|
||||
|
||||
[
|
||||
<span className="font-semibold text-[#2EE6C5]">VIS-4148</span>,
|
||||
<span className="font-semibold text-slate-100">Priya Nair</span>,
|
||||
"Amazon Logistics",
|
||||
"Estates Office",
|
||||
"Material delivery",
|
||||
<span className="px-3 py-1 rounded-lg bg-slate-900 border border-slate-700 text-xs">Delivery</span>,
|
||||
"—",
|
||||
"—",
|
||||
<Badge text="Pre-Reg" color="bg-yellow-500/15 text-yellow-400" />,
|
||||
<Button className="text-emerald-400 font-semibold hover:text-emerald-300">Check in</Button>,
|
||||
],
|
||||
|
||||
[
|
||||
<span className="font-semibold text-[#2EE6C5]">VIS-4149</span>,
|
||||
<span className="font-semibold text-slate-100">Imran Q.</span>,
|
||||
"FreshMenu",
|
||||
"TECH Local",
|
||||
"AMC service",
|
||||
<span className="px-3 py-1 rounded-lg bg-slate-900 border border-slate-700 text-xs">Contractor</span>,
|
||||
"10:30",
|
||||
"—",
|
||||
<Badge text="Checked-In" color="bg-emerald-500/15 text-emerald-400" />,
|
||||
<Button className="text-teal-400 font-semibold hover:text-teal-300">Check out</Button>,
|
||||
],
|
||||
[
|
||||
<span className="font-semibold text-[#2EE6C5]">VIS-4145</span>,
|
||||
<span className="font-semibold text-slate-100">Rahul Mehta</span>,
|
||||
"Voltas Ltd",
|
||||
"Dhananjay T.",
|
||||
"Maintenance visit",
|
||||
<span className="px-3 py-1 rounded-lg bg-slate-900 border border-slate-700 text-xs">Contractor</span>,
|
||||
"09:12",
|
||||
"—",
|
||||
<Badge text="Checked-In" color="bg-emerald-500/15 text-emerald-400" />,
|
||||
<Button className="text-teal-400 font-semibold hover:text-teal-300">Check out</Button>,
|
||||
],
|
||||
|
||||
[
|
||||
<span className="font-semibold text-[#2EE6C5]">VIS-4146</span>,
|
||||
<span className="font-semibold text-slate-100">Anita Desai</span>,
|
||||
"Siemens",
|
||||
"ME Local",
|
||||
"Interview",
|
||||
<span className="px-3 py-1 rounded-lg bg-slate-900 border border-slate-700 text-xs">Interview</span>,
|
||||
"—",
|
||||
"—",
|
||||
<Badge text="Expected" color="bg-blue-500/15 text-blue-400" />,
|
||||
<Button className="text-emerald-400 font-semibold hover:text-emerald-300">Check in</Button>,
|
||||
],
|
||||
|
||||
[
|
||||
<span className="font-semibold text-[#2EE6C5]">VIS-4147</span>,
|
||||
<span className="font-semibold text-slate-100">Karthik R.</span>,
|
||||
"Schindler",
|
||||
"Site FM Lead",
|
||||
"Client meeting",
|
||||
<span className="px-3 py-1 rounded-lg bg-slate-900 border border-slate-700 text-xs">Guest</span>,
|
||||
"08:05",
|
||||
"10:40",
|
||||
<Badge text="Checked-Out" color="bg-slate-700 text-slate-400" />,
|
||||
<span className="text-slate-500">—</span>,
|
||||
],
|
||||
|
||||
[
|
||||
<span className="font-semibold text-[#2EE6C5]">VIS-4148</span>,
|
||||
<span className="font-semibold text-slate-100">Priya Nair</span>,
|
||||
"Amazon Logistics",
|
||||
"Estates Office",
|
||||
"Material delivery",
|
||||
<span className="px-3 py-1 rounded-lg bg-slate-900 border border-slate-700 text-xs">Delivery</span>,
|
||||
"—",
|
||||
"—",
|
||||
<Badge text="Pre-Reg" color="bg-yellow-500/15 text-yellow-400" />,
|
||||
<Button className="text-emerald-400 font-semibold hover:text-emerald-300">Check in</Button>,
|
||||
],
|
||||
|
||||
[
|
||||
<span className="font-semibold text-[#2EE6C5]">VIS-4149</span>,
|
||||
<span className="font-semibold text-slate-100">Imran Q.</span>,
|
||||
"FreshMenu",
|
||||
"TECH Local",
|
||||
"AMC service",
|
||||
<span className="px-3 py-1 rounded-lg bg-slate-900 border border-slate-700 text-xs">Contractor</span>,
|
||||
"10:30",
|
||||
"—",
|
||||
<Badge text="Checked-In" color="bg-emerald-500/15 text-emerald-400" />,
|
||||
<Button className="text-teal-400 font-semibold hover:text-teal-300">Check out</Button>,
|
||||
],
|
||||
];
|
||||
|
||||
const [activeFilter, setActiveFilter] = useState<string>('All');
|
||||
return (
|
||||
@@ -263,7 +107,7 @@ const [activeFilter, setActiveFilter] = useState<string>('All');
|
||||
onChange={setActiveFilter}
|
||||
/>
|
||||
</div>
|
||||
<Table headers={headers} rows={rows}/>
|
||||
<Table headers={visitorheaders} rows={visitorrows}/>
|
||||
|
||||
<div className="mb-10 mt-10">
|
||||
<InfoBanner
|
||||
|
||||
Reference in New Issue
Block a user