2import { useState } from "react";
4export default function LanesPage() {
5 const [lanes] = useState([
6 { id: 1, name: "Lane 1 - Main Counter", status: "active", operator: "John Smith", lastActivity: "2 mins ago" },
7 { id: 2, name: "Lane 2 - Express", status: "active", operator: "Sarah Jones", lastActivity: "5 mins ago" },
8 { id: 3, name: "Lane 3 - Self-Checkout", status: "idle", operator: null, lastActivity: "15 mins ago" },
9 { id: 4, name: "Lane 4 - Customer Service", status: "offline", operator: null, lastActivity: "2 hours ago" }
12 const getStatusColor = (status: string) => {
15 return "bg-success/10 text-success border-success/20";
17 return "bg-warn/10 text-warn border-warn/20";
19 return "bg-muted/10 text-muted border-muted/20";
21 return "bg-muted/10 text-muted border-muted/20";
25 const getStatusIcon = (status: string) => {
39 <div className="min-h-screen" style={{ background: 'var(--bg)' }}>
40 <div className="max-w-7xl mx-auto p-6">
41 <div className="mb-8">
42 <h1 className="text-3xl font-bold mb-2" style={{ color: 'var(--text)' }}>POS Lanes Management</h1>
43 <p style={{ color: 'var(--muted)' }}>Monitor and manage point-of-sale terminals</p>
47 <div className="grid grid-cols-1 md:grid-cols-4 gap-4 mb-6">
48 <div className="bg-surface rounded-lg shadow-sm border border-border p-4">
49 <div className="text-sm mb-1" style={{ color: 'var(--muted)' }}>Total Lanes</div>
50 <div className="text-2xl font-bold" style={{ color: 'var(--text)' }}>{lanes.length}</div>
52 <div className="bg-green-50 rounded-lg shadow-sm border border-green-200 p-4">
53 <div className="text-sm text-green-600 mb-1">Active</div>
54 <div className="text-2xl font-bold text-green-900">
55 {lanes.filter(l => l.status === "active").length}
58 <div className="bg-yellow-50 rounded-lg shadow-sm border border-yellow-200 p-4">
59 <div className="text-sm text-yellow-600 mb-1">Idle</div>
60 <div className="text-2xl font-bold text-yellow-900">
61 {lanes.filter(l => l.status === "idle").length}
64 <div className="bg-gray-50 rounded-lg shadow-sm border border-gray-200 p-4">
65 <div className="text-sm text-gray-600 mb-1">Offline</div>
66 <div className="text-2xl font-bold text-gray-900">
67 {lanes.filter(l => l.status === "offline").length}
73 <div className="grid grid-cols-1 md:grid-cols-2 gap-6 mb-6">
74 {lanes.map((lane) => (
75 <div key={lane.id} className="bg-white rounded-lg shadow-sm border border-gray-200 p-6">
76 <div className="flex items-start justify-between mb-4">
78 <h3 className="text-lg font-bold text-gray-900 mb-1">{lane.name}</h3>
79 <p className="text-sm text-gray-600">Lane ID: {lane.id}</p>
81 <span className={`inline-flex items-center px-3 py-1 rounded-full text-xs font-medium border ${getStatusColor(lane.status)}`}>
82 <span className="mr-1">{getStatusIcon(lane.status)}</span>
83 {lane.status.toUpperCase()}
87 <div className="space-y-2 mb-4">
88 <div className="flex justify-between text-sm">
89 <span className="text-gray-600">Operator:</span>
90 <span className="font-medium text-gray-900">{lane.operator || "None"}</span>
92 <div className="flex justify-between text-sm">
93 <span className="text-gray-600">Last Activity:</span>
94 <span className="font-medium text-gray-900">{lane.lastActivity}</span>
98 <div className="flex gap-2">
99 <button className="flex-1 px-3 py-2 text-sm bg-blue-600 text-white rounded hover:bg-blue-700 transition">
102 <button className="flex-1 px-3 py-2 text-sm border border-gray-300 text-gray-700 rounded hover:bg-gray-50 transition">
111 <div className="bg-white rounded-lg shadow-sm border border-gray-200 p-6">
112 <h2 className="text-xl font-bold text-gray-900 mb-4">Lane Management</h2>
113 <div className="grid grid-cols-1 md:grid-cols-3 gap-4">
114 <button className="px-4 py-3 bg-green-600 text-white rounded-lg hover:bg-green-700 transition">
115 <div className="text-lg font-semibold mb-1">âž• Add New Lane</div>
116 <div className="text-xs opacity-90">Register a new POS terminal</div>
118 <button className="px-4 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition">
119 <div className="text-lg font-semibold mb-1">🔄 Sync All Lanes</div>
120 <div className="text-xs opacity-90">Update all terminals</div>
122 <button className="px-4 py-3 bg-purple-600 text-white rounded-lg hover:bg-purple-700 transition">
123 <div className="text-lg font-semibold mb-1">📊 Lane Reports</div>
124 <div className="text-xs opacity-90">Performance analytics</div>
130 <div className="mt-6 bg-blue-50 border border-blue-200 rounded-lg p-4">
131 <h3 className="font-semibold text-blue-900 mb-2">About POS Lanes</h3>
132 <p className="text-blue-800 text-sm">
133 POS lanes represent individual checkout terminals in your store. Each lane can be independently
134 configured with its own settings, operator assignments, and hardware peripherals (receipt printers,
135 scanners, cash drawers, etc.).