create-cedro-app 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/index.js +32 -18
- package/package.json +1 -1
- package/templates/inventory-management-system/client/README.md +16 -0
- package/templates/inventory-management-system/client/eslint.config.js +21 -0
- package/templates/inventory-management-system/client/index.html +13 -0
- package/templates/inventory-management-system/client/package.json +35 -0
- package/templates/inventory-management-system/client/public/favicon.svg +1 -0
- package/templates/inventory-management-system/client/public/icons.svg +24 -0
- package/templates/inventory-management-system/client/src/App.jsx +15 -0
- package/templates/inventory-management-system/client/src/assets/hero.png +0 -0
- package/templates/inventory-management-system/client/src/assets/react.svg +1 -0
- package/templates/inventory-management-system/client/src/assets/vite.svg +1 -0
- package/templates/inventory-management-system/client/src/components/AppRoutes.jsx +39 -0
- package/templates/inventory-management-system/client/src/components/Customer.jsx +326 -0
- package/templates/inventory-management-system/client/src/components/Dashboard.jsx +512 -0
- package/templates/inventory-management-system/client/src/components/Invoice.jsx +523 -0
- package/templates/inventory-management-system/client/src/components/Login.jsx +170 -0
- package/templates/inventory-management-system/client/src/components/PageNotFound.jsx +11 -0
- package/templates/inventory-management-system/client/src/components/Register.jsx +171 -0
- package/templates/inventory-management-system/client/src/components/Report.jsx +383 -0
- package/templates/inventory-management-system/client/src/components/Service.jsx +390 -0
- package/templates/inventory-management-system/client/src/index.css +1 -0
- package/templates/inventory-management-system/client/src/main.jsx +13 -0
- package/templates/inventory-management-system/client/vite.config.js +9 -0
- package/templates/inventory-management-system/server/.env +8 -0
- package/templates/inventory-management-system/server/Functions/Customer.js +79 -0
- package/templates/inventory-management-system/server/Functions/Invoice.js +192 -0
- package/templates/inventory-management-system/server/Functions/Service.js +86 -0
- package/templates/inventory-management-system/server/Functions/dashboard.js +33 -0
- package/templates/inventory-management-system/server/Functions/report.js +50 -0
- package/templates/inventory-management-system/server/Functions/users.js +101 -0
- package/templates/inventory-management-system/server/db.js +22 -0
- package/templates/inventory-management-system/server/package.json +23 -0
- package/templates/inventory-management-system/server/server.js +294 -0
- package/templates/slot-car-management-system/client/README.md +16 -0
- package/templates/slot-car-management-system/client/eslint.config.js +21 -0
- package/templates/slot-car-management-system/client/index.html +13 -0
- package/templates/slot-car-management-system/client/package.json +35 -0
- package/templates/slot-car-management-system/client/public/favicon.svg +1 -0
- package/templates/slot-car-management-system/client/public/icons.svg +24 -0
- package/templates/slot-car-management-system/client/src/App.css +184 -0
- package/templates/slot-car-management-system/client/src/App.jsx +49 -0
- package/templates/slot-car-management-system/client/src/assets/hero.png +0 -0
- package/templates/slot-car-management-system/client/src/assets/react.svg +1 -0
- package/templates/slot-car-management-system/client/src/assets/vite.svg +1 -0
- package/templates/slot-car-management-system/client/src/components/Cars.jsx +246 -0
- package/templates/slot-car-management-system/client/src/components/Dashboard.jsx +629 -0
- package/templates/slot-car-management-system/client/src/components/Login.jsx +170 -0
- package/templates/slot-car-management-system/client/src/components/PageNotFound.jsx +11 -0
- package/templates/slot-car-management-system/client/src/components/ParkingRecord.jsx +553 -0
- package/templates/slot-car-management-system/client/src/components/ParkingSlot.jsx +268 -0
- package/templates/slot-car-management-system/client/src/components/Payment.jsx +464 -0
- package/templates/slot-car-management-system/client/src/components/Register.jsx +171 -0
- package/templates/slot-car-management-system/client/src/components/Report.jsx +407 -0
- package/templates/slot-car-management-system/client/src/index.css +1 -0
- package/templates/slot-car-management-system/client/src/main.jsx +10 -0
- package/templates/slot-car-management-system/client/vite.config.js +9 -0
- package/templates/slot-car-management-system/parking_slot.sql +218 -0
- package/templates/slot-car-management-system/server/.env +8 -0
- package/templates/slot-car-management-system/server/Functions/Payment.js +107 -0
- package/templates/slot-car-management-system/server/Functions/car.js +93 -0
- package/templates/slot-car-management-system/server/Functions/dashboard.js +64 -0
- package/templates/slot-car-management-system/server/Functions/parkingRecord.js +220 -0
- package/templates/slot-car-management-system/server/Functions/parkingslot.js +58 -0
- package/templates/slot-car-management-system/server/Functions/report.js +48 -0
- package/templates/slot-car-management-system/server/Functions/users.js +101 -0
- package/templates/slot-car-management-system/server/db.js +22 -0
- package/templates/slot-car-management-system/server/package.json +23 -0
- package/templates/slot-car-management-system/server/server.js +192 -0
|
@@ -0,0 +1,629 @@
|
|
|
1
|
+
import React, { useEffect, useState } from "react";
|
|
2
|
+
import axios from "axios";
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
LayoutDashboard,
|
|
6
|
+
Car,
|
|
7
|
+
SquareParking,
|
|
8
|
+
CreditCard,
|
|
9
|
+
FileBarChart,
|
|
10
|
+
LogOut,
|
|
11
|
+
Search,
|
|
12
|
+
UserCircle,
|
|
13
|
+
ClipboardList,
|
|
14
|
+
} from "lucide-react";
|
|
15
|
+
|
|
16
|
+
import { useNavigate } from "react-router-dom";
|
|
17
|
+
|
|
18
|
+
import ParkingSlot from "./ParkingSlot";
|
|
19
|
+
import ParkingRecord from "./ParkingRecord";
|
|
20
|
+
import Report from "./Report";
|
|
21
|
+
import Payment from "./Payment";
|
|
22
|
+
import Cars from "./Cars";
|
|
23
|
+
|
|
24
|
+
function Dashboard() {
|
|
25
|
+
|
|
26
|
+
const token = localStorage.getItem("token");
|
|
27
|
+
|
|
28
|
+
const navigate = useNavigate();
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
// =========================
|
|
33
|
+
// CHECK TOKEN
|
|
34
|
+
// =========================
|
|
35
|
+
useEffect(() => {
|
|
36
|
+
|
|
37
|
+
const token = localStorage.getItem("token");
|
|
38
|
+
|
|
39
|
+
if (!token) {
|
|
40
|
+
navigate("/");
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
}, [navigate]);
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
// =========================
|
|
48
|
+
// STATES
|
|
49
|
+
// =========================
|
|
50
|
+
const [stats, setStats] = useState({
|
|
51
|
+
cars: 0,
|
|
52
|
+
slots: 0,
|
|
53
|
+
records: 0,
|
|
54
|
+
payments: 0
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
const [activeTab, setActiveTab] =
|
|
58
|
+
useState("Dashboard");
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
// =========================
|
|
63
|
+
// FETCH DASHBOARD STATS
|
|
64
|
+
// =========================
|
|
65
|
+
const fetchStats = async () => {
|
|
66
|
+
|
|
67
|
+
try {
|
|
68
|
+
|
|
69
|
+
const res = await axios.get(
|
|
70
|
+
"http://localhost:3000/dashboard-stats",
|
|
71
|
+
{
|
|
72
|
+
headers: {
|
|
73
|
+
Authorization: `Bearer ${token}`
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
setStats(res.data);
|
|
79
|
+
|
|
80
|
+
} catch (error) {
|
|
81
|
+
|
|
82
|
+
console.log(error);
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
useEffect(() => {
|
|
89
|
+
|
|
90
|
+
fetchStats();
|
|
91
|
+
|
|
92
|
+
}, []);
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
// =========================
|
|
98
|
+
// LOGOUT
|
|
99
|
+
// =========================
|
|
100
|
+
const handleLogout = () => {
|
|
101
|
+
|
|
102
|
+
localStorage.clear();
|
|
103
|
+
|
|
104
|
+
navigate("/");
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
return (
|
|
110
|
+
|
|
111
|
+
<div className="min-h-screen bg-gray-100 flex">
|
|
112
|
+
|
|
113
|
+
{/* SIDEBAR */}
|
|
114
|
+
<aside className="w-72 bg-slate-900 text-white flex flex-col shadow-2xl">
|
|
115
|
+
|
|
116
|
+
{/* LOGO */}
|
|
117
|
+
<div className="p-6 border-b border-slate-700">
|
|
118
|
+
|
|
119
|
+
<h1 className="text-3xl font-bold text-indigo-400">
|
|
120
|
+
SmartPark
|
|
121
|
+
</h1>
|
|
122
|
+
|
|
123
|
+
<p className="text-gray-400 text-sm mt-2">
|
|
124
|
+
Parking Space Sales Management System
|
|
125
|
+
</p>
|
|
126
|
+
|
|
127
|
+
</div>
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
{/* MENU */}
|
|
132
|
+
<nav className="flex-1 px-4 py-6 space-y-3">
|
|
133
|
+
|
|
134
|
+
{/* DASHBOARD */}
|
|
135
|
+
<button
|
|
136
|
+
onClick={() => setActiveTab("Dashboard")}
|
|
137
|
+
className={`w-full flex items-center gap-4 px-4 py-3 rounded-xl transition ${
|
|
138
|
+
activeTab === "Dashboard"
|
|
139
|
+
? "bg-indigo-600"
|
|
140
|
+
: "hover:bg-slate-800"
|
|
141
|
+
}`}
|
|
142
|
+
>
|
|
143
|
+
|
|
144
|
+
<LayoutDashboard size={22} />
|
|
145
|
+
|
|
146
|
+
Dashboard
|
|
147
|
+
|
|
148
|
+
</button>
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
{/* CARS */}
|
|
153
|
+
<button
|
|
154
|
+
onClick={() => setActiveTab("Cars")}
|
|
155
|
+
className={`w-full flex items-center gap-4 px-4 py-3 rounded-xl transition ${
|
|
156
|
+
activeTab === "Cars"
|
|
157
|
+
? "bg-indigo-600"
|
|
158
|
+
: "hover:bg-slate-800"
|
|
159
|
+
}`}
|
|
160
|
+
>
|
|
161
|
+
|
|
162
|
+
<Car size={22} />
|
|
163
|
+
|
|
164
|
+
Cars
|
|
165
|
+
|
|
166
|
+
</button>
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
{/* PARKING SLOT */}
|
|
171
|
+
<button
|
|
172
|
+
onClick={() => setActiveTab("ParkingSlot")}
|
|
173
|
+
className={`w-full flex items-center gap-4 px-4 py-3 rounded-xl transition ${
|
|
174
|
+
activeTab === "ParkingSlot"
|
|
175
|
+
? "bg-indigo-600"
|
|
176
|
+
: "hover:bg-slate-800"
|
|
177
|
+
}`}
|
|
178
|
+
>
|
|
179
|
+
|
|
180
|
+
<SquareParking size={22} />
|
|
181
|
+
|
|
182
|
+
Parking Slots
|
|
183
|
+
|
|
184
|
+
</button>
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
{/* PARKING RECORD */}
|
|
189
|
+
<button
|
|
190
|
+
onClick={() => setActiveTab("ParkingRecord")}
|
|
191
|
+
className={`w-full flex items-center gap-4 px-4 py-3 rounded-xl transition ${
|
|
192
|
+
activeTab === "ParkingRecord"
|
|
193
|
+
? "bg-indigo-600"
|
|
194
|
+
: "hover:bg-slate-800"
|
|
195
|
+
}`}
|
|
196
|
+
>
|
|
197
|
+
|
|
198
|
+
<ClipboardList size={22} />
|
|
199
|
+
|
|
200
|
+
Parking Records
|
|
201
|
+
|
|
202
|
+
</button>
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
{/* PAYMENT */}
|
|
207
|
+
<button
|
|
208
|
+
onClick={() => setActiveTab("Payment")}
|
|
209
|
+
className={`w-full flex items-center gap-4 px-4 py-3 rounded-xl transition ${
|
|
210
|
+
activeTab === "Payment"
|
|
211
|
+
? "bg-indigo-600"
|
|
212
|
+
: "hover:bg-slate-800"
|
|
213
|
+
}`}
|
|
214
|
+
>
|
|
215
|
+
|
|
216
|
+
<CreditCard size={22} />
|
|
217
|
+
|
|
218
|
+
Payments
|
|
219
|
+
|
|
220
|
+
</button>
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
{/* REPORT */}
|
|
225
|
+
<button
|
|
226
|
+
onClick={() => setActiveTab("Report")}
|
|
227
|
+
className={`w-full flex items-center gap-4 px-4 py-3 rounded-xl transition ${
|
|
228
|
+
activeTab === "Report"
|
|
229
|
+
? "bg-indigo-600"
|
|
230
|
+
: "hover:bg-slate-800"
|
|
231
|
+
}`}
|
|
232
|
+
>
|
|
233
|
+
|
|
234
|
+
<FileBarChart size={22} />
|
|
235
|
+
|
|
236
|
+
Reports
|
|
237
|
+
|
|
238
|
+
</button>
|
|
239
|
+
|
|
240
|
+
</nav>
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
{/* LOGOUT */}
|
|
245
|
+
<div className="p-4 border-t border-slate-700">
|
|
246
|
+
|
|
247
|
+
<button
|
|
248
|
+
onClick={handleLogout}
|
|
249
|
+
className="w-full flex items-center justify-center gap-3 bg-red-500 hover:bg-red-600 py-3 rounded-xl font-semibold transition"
|
|
250
|
+
>
|
|
251
|
+
|
|
252
|
+
<LogOut size={20} />
|
|
253
|
+
|
|
254
|
+
Logout
|
|
255
|
+
|
|
256
|
+
</button>
|
|
257
|
+
|
|
258
|
+
</div>
|
|
259
|
+
|
|
260
|
+
</aside>
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
{/* MAIN CONTENT */}
|
|
265
|
+
<div className="flex-1 flex flex-col">
|
|
266
|
+
|
|
267
|
+
{/* HEADER */}
|
|
268
|
+
<header className="bg-white shadow-md px-8 py-5 flex items-center justify-between">
|
|
269
|
+
|
|
270
|
+
<div>
|
|
271
|
+
|
|
272
|
+
<h2 className="text-3xl font-bold text-gray-800">
|
|
273
|
+
SmartPark Dashboard
|
|
274
|
+
</h2>
|
|
275
|
+
|
|
276
|
+
<p className="text-gray-500">
|
|
277
|
+
Welcome to Parking Management System
|
|
278
|
+
</p>
|
|
279
|
+
|
|
280
|
+
</div>
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
{/* SEARCH + USER */}
|
|
285
|
+
<div className="flex items-center gap-6">
|
|
286
|
+
|
|
287
|
+
{/* SEARCH */}
|
|
288
|
+
<div className="flex items-center bg-gray-100 px-4 py-2 rounded-xl">
|
|
289
|
+
|
|
290
|
+
<Search
|
|
291
|
+
size={18}
|
|
292
|
+
className="text-gray-500"
|
|
293
|
+
/>
|
|
294
|
+
|
|
295
|
+
<input
|
|
296
|
+
placeholder="Search..."
|
|
297
|
+
className="bg-transparent outline-none px-2"
|
|
298
|
+
/>
|
|
299
|
+
|
|
300
|
+
</div>
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
{/* USER */}
|
|
305
|
+
<div className="flex items-center gap-3">
|
|
306
|
+
|
|
307
|
+
<UserCircle
|
|
308
|
+
size={40}
|
|
309
|
+
className="text-indigo-600"
|
|
310
|
+
/>
|
|
311
|
+
|
|
312
|
+
<div>
|
|
313
|
+
|
|
314
|
+
<p className="font-semibold">
|
|
315
|
+
Parking Manager
|
|
316
|
+
</p>
|
|
317
|
+
|
|
318
|
+
<p className="text-sm text-gray-500">
|
|
319
|
+
SmartPark User
|
|
320
|
+
</p>
|
|
321
|
+
|
|
322
|
+
</div>
|
|
323
|
+
|
|
324
|
+
</div>
|
|
325
|
+
|
|
326
|
+
</div>
|
|
327
|
+
|
|
328
|
+
</header>
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
{/* MAIN */}
|
|
333
|
+
<main className="flex-1 p-8 overflow-y-auto bg-gray-100">
|
|
334
|
+
|
|
335
|
+
{/* DASHBOARD */}
|
|
336
|
+
{activeTab === "Dashboard" && (
|
|
337
|
+
|
|
338
|
+
<div>
|
|
339
|
+
|
|
340
|
+
{/* TITLE */}
|
|
341
|
+
<div className="mb-10">
|
|
342
|
+
|
|
343
|
+
<h1 className="text-4xl font-bold text-gray-800">
|
|
344
|
+
Parking System Overview
|
|
345
|
+
</h1>
|
|
346
|
+
|
|
347
|
+
<p className="text-gray-500 mt-2 text-lg">
|
|
348
|
+
SmartPark Parking Space Sales Management
|
|
349
|
+
</p>
|
|
350
|
+
|
|
351
|
+
</div>
|
|
352
|
+
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
{/* CARDS */}
|
|
356
|
+
<div className="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-8">
|
|
357
|
+
|
|
358
|
+
{/* CARS */}
|
|
359
|
+
<div className="bg-white rounded-3xl p-8 shadow-md border-l-[8px] border-blue-600">
|
|
360
|
+
|
|
361
|
+
<div className="flex items-center justify-between">
|
|
362
|
+
|
|
363
|
+
<div>
|
|
364
|
+
|
|
365
|
+
<h2 className="text-gray-500 text-lg">
|
|
366
|
+
Total Cars
|
|
367
|
+
</h2>
|
|
368
|
+
|
|
369
|
+
<h1 className="text-5xl font-bold text-blue-600 mt-4">
|
|
370
|
+
{stats.cars}
|
|
371
|
+
</h1>
|
|
372
|
+
|
|
373
|
+
</div>
|
|
374
|
+
|
|
375
|
+
<div className="bg-blue-100 p-5 rounded-full">
|
|
376
|
+
|
|
377
|
+
<Car
|
|
378
|
+
size={40}
|
|
379
|
+
className="text-blue-600"
|
|
380
|
+
/>
|
|
381
|
+
|
|
382
|
+
</div>
|
|
383
|
+
|
|
384
|
+
</div>
|
|
385
|
+
|
|
386
|
+
</div>
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
{/* SLOTS */}
|
|
391
|
+
<div className="bg-white rounded-3xl p-8 shadow-md border-l-[8px] border-green-600">
|
|
392
|
+
|
|
393
|
+
<div className="flex items-center justify-between">
|
|
394
|
+
|
|
395
|
+
<div>
|
|
396
|
+
|
|
397
|
+
<h2 className="text-gray-500 text-lg">
|
|
398
|
+
Parking Slots
|
|
399
|
+
</h2>
|
|
400
|
+
|
|
401
|
+
<h1 className="text-5xl font-bold text-green-600 mt-4">
|
|
402
|
+
{stats.slots}
|
|
403
|
+
</h1>
|
|
404
|
+
|
|
405
|
+
</div>
|
|
406
|
+
|
|
407
|
+
<div className="bg-green-100 p-5 rounded-full">
|
|
408
|
+
|
|
409
|
+
<SquareParking
|
|
410
|
+
size={40}
|
|
411
|
+
className="text-green-600"
|
|
412
|
+
/>
|
|
413
|
+
|
|
414
|
+
</div>
|
|
415
|
+
|
|
416
|
+
</div>
|
|
417
|
+
|
|
418
|
+
</div>
|
|
419
|
+
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
{/* RECORDS */}
|
|
423
|
+
<div className="bg-white rounded-3xl p-8 shadow-md border-l-[8px] border-orange-500">
|
|
424
|
+
|
|
425
|
+
<div className="flex items-center justify-between">
|
|
426
|
+
|
|
427
|
+
<div>
|
|
428
|
+
|
|
429
|
+
<h2 className="text-gray-500 text-lg">
|
|
430
|
+
Parking Records
|
|
431
|
+
</h2>
|
|
432
|
+
|
|
433
|
+
<h1 className="text-5xl font-bold text-orange-500 mt-4">
|
|
434
|
+
{stats.records}
|
|
435
|
+
</h1>
|
|
436
|
+
|
|
437
|
+
</div>
|
|
438
|
+
|
|
439
|
+
<div className="bg-orange-100 p-5 rounded-full">
|
|
440
|
+
|
|
441
|
+
<ClipboardList
|
|
442
|
+
size={40}
|
|
443
|
+
className="text-orange-500"
|
|
444
|
+
/>
|
|
445
|
+
|
|
446
|
+
</div>
|
|
447
|
+
|
|
448
|
+
</div>
|
|
449
|
+
|
|
450
|
+
</div>
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
|
|
454
|
+
{/* PAYMENTS */}
|
|
455
|
+
<div className="bg-white rounded-3xl p-8 shadow-md border-l-[8px] border-red-500">
|
|
456
|
+
|
|
457
|
+
<div className="flex items-center justify-between">
|
|
458
|
+
|
|
459
|
+
<div>
|
|
460
|
+
|
|
461
|
+
<h2 className="text-gray-500 text-lg">
|
|
462
|
+
Payments
|
|
463
|
+
</h2>
|
|
464
|
+
|
|
465
|
+
<h1 className="text-5xl font-bold text-red-500 mt-4">
|
|
466
|
+
{stats.payments}
|
|
467
|
+
</h1>
|
|
468
|
+
|
|
469
|
+
</div>
|
|
470
|
+
|
|
471
|
+
<div className="bg-red-100 p-5 rounded-full">
|
|
472
|
+
|
|
473
|
+
<CreditCard
|
|
474
|
+
size={40}
|
|
475
|
+
className="text-red-500"
|
|
476
|
+
/>
|
|
477
|
+
|
|
478
|
+
</div>
|
|
479
|
+
|
|
480
|
+
</div>
|
|
481
|
+
|
|
482
|
+
</div>
|
|
483
|
+
|
|
484
|
+
</div>
|
|
485
|
+
|
|
486
|
+
|
|
487
|
+
|
|
488
|
+
{/* INFO SECTION */}
|
|
489
|
+
<div className="mt-12 bg-white rounded-3xl shadow-md overflow-hidden">
|
|
490
|
+
|
|
491
|
+
<div className="p-6 border-b border-gray-200">
|
|
492
|
+
|
|
493
|
+
<h2 className="text-2xl font-bold text-gray-800">
|
|
494
|
+
SmartPark System Information
|
|
495
|
+
</h2>
|
|
496
|
+
|
|
497
|
+
<p className="text-gray-500 mt-1">
|
|
498
|
+
Parking Space Sales Management System
|
|
499
|
+
</p>
|
|
500
|
+
|
|
501
|
+
</div>
|
|
502
|
+
|
|
503
|
+
|
|
504
|
+
|
|
505
|
+
<div className="p-8 grid grid-cols-1 md:grid-cols-2 gap-8">
|
|
506
|
+
|
|
507
|
+
{/* FEATURES */}
|
|
508
|
+
<div className="bg-indigo-50 rounded-2xl p-6">
|
|
509
|
+
|
|
510
|
+
<h3 className="text-xl font-bold text-indigo-700 mb-4">
|
|
511
|
+
System Features
|
|
512
|
+
</h3>
|
|
513
|
+
|
|
514
|
+
<ul className="space-y-3 text-gray-700">
|
|
515
|
+
|
|
516
|
+
<li>• Car Registration</li>
|
|
517
|
+
|
|
518
|
+
<li>• Parking Slot Management</li>
|
|
519
|
+
|
|
520
|
+
<li>• Parking Records</li>
|
|
521
|
+
|
|
522
|
+
<li>• Payment Processing</li>
|
|
523
|
+
|
|
524
|
+
<li>• Daily Reports</li>
|
|
525
|
+
|
|
526
|
+
</ul>
|
|
527
|
+
|
|
528
|
+
</div>
|
|
529
|
+
|
|
530
|
+
|
|
531
|
+
|
|
532
|
+
{/* STATISTICS */}
|
|
533
|
+
<div className="bg-green-50 rounded-2xl p-6">
|
|
534
|
+
|
|
535
|
+
<h3 className="text-xl font-bold text-green-700 mb-4">
|
|
536
|
+
Parking Statistics
|
|
537
|
+
</h3>
|
|
538
|
+
|
|
539
|
+
<div className="space-y-4">
|
|
540
|
+
|
|
541
|
+
<div className="flex justify-between">
|
|
542
|
+
|
|
543
|
+
<span>Registered Cars</span>
|
|
544
|
+
|
|
545
|
+
<span className="font-bold text-blue-600">
|
|
546
|
+
{stats.cars}
|
|
547
|
+
</span>
|
|
548
|
+
|
|
549
|
+
</div>
|
|
550
|
+
|
|
551
|
+
|
|
552
|
+
|
|
553
|
+
<div className="flex justify-between">
|
|
554
|
+
|
|
555
|
+
<span>Parking Slots</span>
|
|
556
|
+
|
|
557
|
+
<span className="font-bold text-green-600">
|
|
558
|
+
{stats.slots}
|
|
559
|
+
</span>
|
|
560
|
+
|
|
561
|
+
</div>
|
|
562
|
+
|
|
563
|
+
|
|
564
|
+
|
|
565
|
+
<div className="flex justify-between">
|
|
566
|
+
|
|
567
|
+
<span>Parking Records</span>
|
|
568
|
+
|
|
569
|
+
<span className="font-bold text-orange-500">
|
|
570
|
+
{stats.records}
|
|
571
|
+
</span>
|
|
572
|
+
|
|
573
|
+
</div>
|
|
574
|
+
|
|
575
|
+
|
|
576
|
+
|
|
577
|
+
<div className="flex justify-between">
|
|
578
|
+
|
|
579
|
+
<span>Payments</span>
|
|
580
|
+
|
|
581
|
+
<span className="font-bold text-red-500">
|
|
582
|
+
{stats.payments}
|
|
583
|
+
</span>
|
|
584
|
+
|
|
585
|
+
</div>
|
|
586
|
+
|
|
587
|
+
</div>
|
|
588
|
+
|
|
589
|
+
</div>
|
|
590
|
+
|
|
591
|
+
</div>
|
|
592
|
+
|
|
593
|
+
</div>
|
|
594
|
+
|
|
595
|
+
</div>
|
|
596
|
+
|
|
597
|
+
)}
|
|
598
|
+
|
|
599
|
+
|
|
600
|
+
|
|
601
|
+
{/* OTHER PAGES */}
|
|
602
|
+
{activeTab === "Cars" && <Cars />}
|
|
603
|
+
|
|
604
|
+
{activeTab === "ParkingSlot" && <ParkingSlot />}
|
|
605
|
+
|
|
606
|
+
{activeTab === "ParkingRecord" && <ParkingRecord />}
|
|
607
|
+
|
|
608
|
+
{activeTab === "Payment" && <Payment />}
|
|
609
|
+
|
|
610
|
+
{activeTab === "Report" && <Report />}
|
|
611
|
+
|
|
612
|
+
</main>
|
|
613
|
+
|
|
614
|
+
|
|
615
|
+
|
|
616
|
+
{/* FOOTER */}
|
|
617
|
+
<footer className="bg-white border-t py-4 px-8 text-sm text-gray-500">
|
|
618
|
+
|
|
619
|
+
© 2026 SmartPark - Parking Space Sales Management System
|
|
620
|
+
|
|
621
|
+
</footer>
|
|
622
|
+
|
|
623
|
+
</div>
|
|
624
|
+
|
|
625
|
+
</div>
|
|
626
|
+
);
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
export default Dashboard;
|