Repository navigation
Expand file tree
/
Copy pathcustomer.html
More file actions
215 lines (193 loc) · 9.3 KB
/
Copy pathcustomer.html
File metadata and controls
215 lines (193 loc) · 9.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
<!DOCTYPE html>
<html lang="en" data-theme="light">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Customer Portal – QueueLess</title>
<link rel="icon" type="image/svg+xml" href="assets/images/logo.svg">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@600;700;800&family=Plus+Jakarta+Sans:wght@700;800&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/dashboard.css">
<link rel="stylesheet" href="css/responsive.css">
</head>
<body>
<!-- Navbar -->
<header class="navbar">
<div class="container navbar-inner">
<a href="index.html" class="brand-logo">
<img src="assets/images/logo.svg" alt="QueueLess Logo">
<span>Queue<span class="gradient-text">Less</span></span>
</a>
<nav aria-label="Main Navigation">
<ul class="nav-links">
<li><a href="index.html" class="nav-link">Home</a></li>
<li><a href="customer.html" class="nav-link active">Book Token</a></li>
<li><a href="tracking.html" class="nav-link">Live Tracking</a></li>
</ul>
</nav>
<div class="nav-actions">
<!-- Notification Bell -->
<div class="notif-wrapper">
<button type="button" class="btn btn-ghost btn-icon" data-notif-toggle aria-label="Notifications">
<i class="fa-regular fa-bell"></i>
<span class="notif-badge hidden" data-notif-count>0</span>
</button>
<div class="notif-dropdown">
<div class="notif-dropdown-header">
<span>Queue Notifications</span>
<button type="button" class="btn btn-sm btn-ghost" data-notif-clear>Clear</button>
</div>
<div class="notif-list" data-notif-list></div>
</div>
</div>
<button type="button" class="btn btn-ghost btn-icon" data-theme-toggle aria-label="Toggle dark mode">
<i class="fa-solid fa-moon"></i>
</button>
<a href="admin-login.html" class="btn btn-secondary nav-desktop-only">
<i class="fa-solid fa-shield-halved"></i> Admin
</a>
<button type="button" id="mobileMenuBtn" class="btn btn-ghost btn-icon mobile-menu-btn" aria-label="Open menu">
<i class="fa-solid fa-bars"></i>
</button>
</div>
</div>
<div id="mobileNavDrawer" class="mobile-nav-drawer">
<a href="index.html" class="nav-link">Home</a>
<a href="customer.html" class="nav-link active">Book Digital Token</a>
<a href="tracking.html" class="nav-link">Live Queue Tracking</a>
<a href="admin-login.html" class="btn btn-secondary">Admin Portal</a>
</div>
</header>
<main class="container">
<div class="page-header">
<div class="page-header-row">
<div>
<h1 style="font-size:1.85rem;">Book Your Digital Token</h1>
<p style="color:var(--text-secondary); font-size:0.95rem;">
Register your details, choose a service, and receive an instant virtual queue pass.
</p>
</div>
<div style="display:flex; gap:0.6rem; flex-wrap:wrap;">
<button type="button" id="fillDemoCustomerBtn" class="btn btn-soft btn-sm">
<i class="fa-solid fa-wand-magic-sparkles"></i> Fill Demo Customer
</button>
<a href="tracking.html" class="btn btn-secondary btn-sm">
<i class="fa-solid fa-satellite-dish"></i> Live Queue Tracker
</a>
</div>
</div>
</div>
<!-- Browser Notification Permission Prompt -->
<div id="notifPermissionBanner" class="alert-banner">
<div style="display:flex; align-items:center; gap:0.75rem;">
<i class="fa-solid fa-bell" style="color:var(--primary); font-size:1.1rem;"></i>
<span>Enable browser notifications so QueueLess can alert you when only 3 people are ahead or your turn starts.</span>
</div>
<button type="button" id="enableNotifBannerBtn" class="btn btn-primary btn-sm">
Enable Alerts
</button>
</div>
<div class="customer-layout">
<!-- Left: Booking Form -->
<div style="display:flex; flex-direction:column; gap:1.5rem;">
<form id="customerBookingForm" class="card" novalidate>
<div class="card-header">
<div>
<h2 class="card-title">1. Customer Details</h2>
<p class="card-subtitle">Used to identify your token and prevent duplicate bookings</p>
</div>
<button type="button" id="findMyTokenBtn" class="btn btn-sm btn-secondary">
<i class="fa-solid fa-magnifying-glass"></i> Find Active Token
</button>
</div>
<div class="form-row">
<div class="form-group">
<label for="custName" class="form-label">Full Name <span class="required">*</span></label>
<div class="input-with-icon">
<i class="fa-regular fa-user"></i>
<input type="text" id="custName" class="form-control" placeholder="e.g. Rahul Sharma" required>
</div>
<div id="custNameError" class="form-error"></div>
</div>
<div class="form-group">
<label for="custPhone" class="form-label">Mobile Number <span class="required">*</span></label>
<div class="input-with-icon">
<i class="fa-solid fa-phone"></i>
<input type="tel" id="custPhone" class="form-control" placeholder="10-digit mobile number" maxlength="15" required>
</div>
<div id="custPhoneError" class="form-error"></div>
</div>
</div>
<hr style="border:none; border-top:1px solid var(--border-color); margin:0.75rem 0 1.25rem;">
<div class="card-header" style="margin-bottom:0.85rem;">
<div>
<h2 class="card-title">2. Select Category & Business</h2>
<p class="card-subtitle">Filter by industry or pick a service location directly</p>
</div>
</div>
<div id="categoryPills" class="category-pills"></div>
<div class="form-group">
<label for="businessSelect" class="form-label">Select Business <span class="required">*</span></label>
<select id="businessSelect" class="form-control" required></select>
</div>
<div id="businessMetaBox" style="margin-bottom:1.25rem;"></div>
<div class="card-header" style="margin-bottom:0.6rem;">
<div>
<h2 class="card-title">3. Available Services</h2>
<p class="card-subtitle">Estimated wait time updates dynamically based on live queue length</p>
</div>
</div>
<div id="servicesGrid" class="service-cards-grid"></div>
<div id="serviceSelectError" class="form-error" style="margin-top:0.5rem;"></div>
<div id="bookingFormAlert" class="alert-banner hidden" style="margin-top:1rem; margin-bottom:0;"></div>
<div style="margin-top:1.4rem;">
<button type="submit" class="btn btn-primary btn-lg" style="width:100%;">
<i class="fa-solid fa-ticket"></i> Generate Digital Token
</button>
</div>
</form>
<!-- Customer's Today Tokens History -->
<div class="card">
<div class="card-header">
<div>
<h2 class="card-title">Your Tokens Today</h2>
<p class="card-subtitle">Quickly view or switch between your active and past tokens</p>
</div>
</div>
<div id="customerTokensHistory" style="display:flex; flex-direction:column; gap:0.65rem;"></div>
</div>
</div>
<!-- Right: Digital Ticket Display -->
<div style="position:sticky; top:90px;">
<div id="digitalTicketContainer"></div>
</div>
</div>
</main>
<!-- Cancel Confirmation Modal -->
<div id="cancelConfirmModal" class="modal-backdrop" role="dialog" aria-modal="true" aria-labelledby="cancelModalTitle">
<div class="modal-dialog" style="max-width:420px;">
<div class="modal-header">
<h3 id="cancelModalTitle">Cancel Digital Token?</h3>
<button type="button" class="btn btn-ghost btn-icon" data-close-modal="cancelConfirmModal" aria-label="Close">
<i class="fa-solid fa-xmark"></i>
</button>
</div>
<p style="color:var(--text-secondary); font-size:0.93rem;">
Are you sure you want to cancel token <strong id="cancelModalTokenNum" class="mono"></strong>? You will lose your current position in the queue.
</p>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-close-modal="cancelConfirmModal">Keep Token</button>
<button type="button" id="confirmCancelTokenBtn" class="btn btn-danger">Yes, Cancel Token</button>
</div>
</div>
</div>
<script src="js/storage.js"></script>
<script src="js/notifications.js"></script>
<script src="js/queue.js"></script>
<script src="js/app.js"></script>
<script src="js/customer.js"></script>
</body>
</html>