-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathadmin.html
executable file
·467 lines (465 loc) · 25.1 KB
/
admin.html
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
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href='./assets/img/favicon.png' rel='icon' type='image/x-icon' />
<link rel="stylesheet" href="assets/css/admin.css">
<link rel="stylesheet" href="./assets/css/toast-message.css">
<link href="./assets/font/font-awesome-pro-v6-6.2.0/css/all.min.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="./assets/css/admin-responsive.css">
<title>Quản lý cửa hàng</title>
</head>
<body>
<header class="header">
<button class="menu-icon-btn">
<div class="menu-icon">
<i class="fa-regular fa-bars"></i>
</div>
</button>
</header>
<div class="container">
<aside class="sidebar open">
<div class="top-sidebar">
<a href="#" class="channel-logo"><img src="./assets/img/favicon.png" alt="Channel Logo"></a>
<div class="hidden-sidebar your-channel"><img src="assets/img/admin/vy-food-title.png"
style="height: 30px;" alt="">
</div>
</div>
<div class="middle-sidebar">
<ul class="sidebar-list">
<li class="sidebar-list-item tab-content active">
<a href="#" class="sidebar-link">
<div class="sidebar-icon"><i class="fa-light fa-house"></i></div>
<div class="hidden-sidebar">Trang tổng quan</div>
</a>
</li>
<li class="sidebar-list-item tab-content">
<a href="#" class="sidebar-link">
<div class="sidebar-icon"><i class="fa-light fa-pot-food"></i></div>
<div class="hidden-sidebar">Sản phẩm</div>
</a>
</li>
<li class="sidebar-list-item tab-content">
<a href="#" class="sidebar-link">
<div class="sidebar-icon"><i class="fa-light fa-users"></i></div>
<div class="hidden-sidebar">Khách hàng</div>
</a>
</li>
<li class="sidebar-list-item tab-content">
<a href="#" class="sidebar-link">
<div class="sidebar-icon"><i class="fa-light fa-basket-shopping"></i></div>
<div class="hidden-sidebar">Đơn hàng</div>
</a>
</li>
<li class="sidebar-list-item tab-content">
<a href="#" class="sidebar-link">
<div class="sidebar-icon"><i class="fa-light fa-chart-simple"></i></div>
<div class="hidden-sidebar">Thống kê</div>
</a>
</li>
</ul>
</div>
<div class="bottom-sidebar">
<ul class="sidebar-list">
<li class="sidebar-list-item user-logout">
<a href="/" class="sidebar-link">
<div class="sidebar-icon"><i class="fa-thin fa-circle-chevron-left"></i></div>
<div class="hidden-sidebar">Trang chủ</div>
</a>
</li>
<li class="sidebar-list-item user-logout">
<a href="#" class="sidebar-link">
<div class="sidebar-icon"><i class="fa-light fa-circle-user"></i></div>
<div class="hidden-sidebar" id="name-acc"></div>
</a>
</li>
<li class="sidebar-list-item user-logout">
<a href="#" class="sidebar-link" id="logout-acc">
<div class="sidebar-icon"><i class="fa-light fa-arrow-right-from-bracket"></i></div>
<div class="hidden-sidebar">Đăng xuất</div>
</a>
</li>
</ul>
</div>
</aside>
<main class="content">
<div class="section active">
<h1 class="page-title">Trang tổng quát của cửa hàng Vy Food</h1>
<div class="cards">
<div class="card-single">
<div class="box">
<h2 id="amount-user">0</h2>
<div class="on-box">
<img src="assets/img/admin/s1.png" alt="" style=" width: 200px;">
<h3>Khách hàng</h3>
<p>Sản phẩm là bất cứ cái gì có thể đưa vào thị trường để tạo sự chú ý, mua sắm, sử dụng
hay tiêu dùng nhằm thỏa mãn một nhu cầu hay ước muốn. Nó có thể là những vật thể,
dịch vụ, con người, địa điểm, tổ chức hoặc một ý tưởng.</p>
</div>
</div>
</div>
<div class="card-single">
<div class="box">
<div class="on-box">
<img src="assets/img/admin/s2.png" alt="" style=" width: 200px;">
<h2 id="amount-product">0</h2>
<h3>Sản phẩm</h3>
<p>Khách hàng mục tiêu là một nhóm đối tượng khách hàng trong phân khúc thị trường mục
tiêu mà doanh nghiệp bạn đang hướng tới. </p>
</div>
</div>
</div>
<div class="card-single">
<div class="box">
<h2 id="doanh-thu">$5020</h2>
<div class="on-box">
<img src="assets/img/admin/s3.png" alt="" style=" width: 200px;">
<h3>Doanh thu</h3>
<p>Doanh thu của doanh nghiệp là toàn bộ số tiền sẽ thu được do tiêu thụ sản phẩm, cung
cấp dịch vụ với sản lượng.</p>
</div>
</div>
</div>
</div>
</div>
<!-- Product -->
<div class="section product-all">
<div class="admin-control">
<div class="admin-control-left">
<select name="the-loai" id="the-loai" onchange="showProduct()">
<option>Tất cả</option>
<option>Món chay</option>
<option>Món mặn</option>
<option>Món lẩu</option>
<option>Món ăn vặt</option>
<option>Món tráng miệng</option>
<option>Nước uống</option>
<option>Đã xóa</option>
</select>
</div>
<div class="admin-control-center">
<form action="" class="form-search">
<span class="search-btn"><i class="fa-light fa-magnifying-glass"></i></span>
<input id="form-search-product" type="text" class="form-search-input" placeholder="Tìm kiếm tên món..." oninput="showProduct()">
</form>
</div>
<div class="admin-control-right">
<button class="btn-control-large" id="btn-cancel-product" onclick="cancelSearchProduct()"><i class="fa-light fa-rotate-right"></i> Làm mới</button>
<button class="btn-control-large" id="btn-add-product"><i class="fa-light fa-plus"></i> Thêm món mới</button>
</div>
</div>
<div id="show-product"></div>
<div class="page-nav">
<ul class="page-nav-list">
</ul>
</div>
</div>
<!-- Account -->
<div class="section">
<div class="admin-control">
<div class="admin-control-left">
<select name="tinh-trang-user" id="tinh-trang-user" onchange="showUser()">
<option value="2">Tất cả</option>
<option value="1">Hoạt động</option>
<option value="0">Bị khóa</option>
</select>
</div>
<div class="admin-control-center">
<form action="" class="form-search">
<span class="search-btn"><i class="fa-light fa-magnifying-glass"></i></span>
<input id="form-search-user" type="text" class="form-search-input" placeholder="Tìm kiếm khách hàng..." oninput="showUser()">
</form>
</div>
<div class="admin-control-right">
<form action="" class="fillter-date">
<div>
<label for="time-start">Từ</label>
<input type="date" class="form-control-date" id="time-start-user" onchange="showUser()">
</div>
<div>
<label for="time-end">Đến</label>
<input type="date" class="form-control-date" id="time-end-user" onchange="showUser()">
</div>
</form>
<button class="btn-reset-order" onclick="cancelSearchUser()"><i class="fa-light fa-arrow-rotate-right"></i></button>
<button id="btn-add-user" class="btn-control-large" onclick="openCreateAccount()"><i class="fa-light fa-plus"></i> <span>Thêm khách hàng</span></button>
</div>
</div>
<div class="table">
<table width="100%">
<thead>
<tr>
<td>STT</td>
<td>Họ và tên</td>
<td>Liên hệ</td>
<td>Ngày tham gia</td>
<td>Tình trạng</td>
<td></td>
</tr>
</thead>
<tbody id="show-user">
</tbody>
</table>
</div>
<!-- </div> -->
</div>
<!-- Order -->
<div class="section">
<div class="admin-control">
<div class="admin-control-left">
<select name="tinh-trang" id="tinh-trang" onchange="findOrder()">
<option value="2">Tất cả</option>
<option value="1">Đã xử lý</option>
<option value="0">Chưa xử lý</option>
</select>
</div>
<div class="admin-control-center">
<form action="" class="form-search">
<span class="search-btn"><i class="fa-light fa-magnifying-glass"></i></span>
<input id="form-search-order" type="text" class="form-search-input" placeholder="Tìm kiếm mã đơn, khách hàng..." oninput="findOrder()">
</form>
</div>
<div class="admin-control-right">
<form action="" class="fillter-date">
<div>
<label for="time-start">Từ</label>
<input type="date" class="form-control-date" id="time-start" onchange="findOrder()">
</div>
<div>
<label for="time-end">Đến</label>
<input type="date" class="form-control-date" id="time-end" onchange="findOrder()">
</div>
</form>
<button class="btn-reset-order" onclick="cancelSearchOrder()"><i class="fa-light fa-arrow-rotate-right"></i></button>
</div>
</div>
<div class="table">
<table width="100%">
<thead>
<tr>
<td>Mã đơn</td>
<td>Khách hàng</td>
<td>Ngày đặt</td>
<td>Tổng tiền</td>
<td>Trạng thái</td>
<td>Thao tác</td>
</tr>
</thead>
<tbody id="showOrder">
</tbody>
</table>
</div>
</div>
<div class="section">
<div class="admin-control">
<div class="admin-control-left">
<select name="the-loai-tk" id="the-loai-tk" onchange="thongKe()">
<option>Tất cả</option>
<option>Món chay</option>
<option>Món mặn</option>
<option>Món lẩu</option>
<option>Món ăn vặt</option>
<option>Món tráng miệng</option>
<option>Nước uống</option>
<option>Món khác</option>
</select>
</div>
<div class="admin-control-center">
<form action="" class="form-search">
<span class="search-btn"><i class="fa-light fa-magnifying-glass"></i></span>
<input id="form-search-tk" type="text" class="form-search-input" placeholder="Tìm kiếm tên món..." oninput="thongKe()">
</form>
</div>
<div class="admin-control-right">
<form action="" class="fillter-date">
<div>
<label for="time-start">Từ</label>
<input type="date" class="form-control-date" id="time-start-tk" onchange="thongKe()">
</div>
<div>
<label for="time-end">Đến</label>
<input type="date" class="form-control-date" id="time-end-tk" onchange="thongKe()">
</div>
</form>
<button class="btn-reset-order" onclick="thongKe(1)"><i class="fa-regular fa-arrow-up-short-wide"></i></i></button>
<button class="btn-reset-order" onclick="thongKe(2)"><i class="fa-regular fa-arrow-down-wide-short"></i></button>
<button class="btn-reset-order" onclick="thongKe(0)"><i class="fa-light fa-arrow-rotate-right"></i></button>
</div>
</div>
<div class="order-statistical" id="order-statistical">
<div class="order-statistical-item">
<div class="order-statistical-item-content">
<p class="order-statistical-item-content-desc">Sản phẩm được bán ra</p>
<h4 class="order-statistical-item-content-h" id="quantity-product"></h4>
</div>
<div class="order-statistical-item-icon">
<i class="fa-light fa-salad"></i>
</div>
</div>
<div class="order-statistical-item">
<div class="order-statistical-item-content">
<p class="order-statistical-item-content-desc">Số lượng bán ra</p>
<h4 class="order-statistical-item-content-h" id="quantity-order"></h4>
</div>
<div class="order-statistical-item-icon">
<i class="fa-light fa-file-lines"></i>
</div>
</div>
<div class="order-statistical-item">
<div class="order-statistical-item-content">
<p class="order-statistical-item-content-desc">Doanh thu</p>
<h4 class="order-statistical-item-content-h" id="quantity-sale"></h4>
</div>
<div class="order-statistical-item-icon">
<i class="fa-light fa-dollar-sign"></i>
</div>
</div>
</div>
<div class="table">
<table width="100%">
<thead>
<tr>
<td>STT</td>
<td>Tên món</td>
<td>Số lượng bán</td>
<td>Doanh thu</td>
<td></td>
</tr>
</thead>
<tbody id="showTk">
</tbody>
</table>
</div>
</div>
</main>
</div>
<div class="modal add-product">
<div class="modal-container">
<h3 class="modal-container-title add-product-e">THÊM MỚI SẢN PHẨM</h3>
<h3 class="modal-container-title edit-product-e">CHỈNH SỬA SẢN PHẨM</h3>
<button class="modal-close product-form"><i class="fa-regular fa-xmark"></i></button>
<div class="modal-content">
<form action="" class="add-product-form">
<div class="modal-content-left">
<img src="./assets/img/blank-image.png" alt="" class="upload-image-preview">
<div class="form-group file">
<label for="up-hinh-anh" class="form-label-file"><i class="fa-regular fa-cloud-arrow-up"></i>Chọn hình ảnh</label>
<input accept="image/jpeg, image/png, image/jpg" id="up-hinh-anh" name="up-hinh-anh" type="file" class="form-control" onchange="uploadImage(this)">
</div>
</div>
<div class="modal-content-right">
<div class="form-group">
<label for="ten-mon" class="form-label">Tên món</label>
<input id="ten-mon" name="ten-mon" type="text" placeholder="Nhập tên món"
class="form-control">
<span class="form-message"></span>
</div>
<div class="form-group">
<label for="category" class="form-label">Chọn món</label>
<select name="category" id="chon-mon">
<option>Món chay</option>
<option>Món mặn</option>
<option>Món lẩu</option>
<option>Món ăn vặt</option>
<option>Món tráng miệng</option>
<option>Nước uống</option>
</select>
<span class="form-message"></span>
</div>
<div class="form-group">
<label for="gia-moi" class="form-label">Giá bán</label>
<input id="gia-moi" name="gia-moi" type="text" placeholder="Nhập giá bán"
class="form-control">
<span class="form-message"></span>
</div>
<div class="form-group">
<label for="mo-ta" class="form-label">Mô tả</label>
<textarea class="product-desc" id="mo-ta" placeholder="Nhập mô tả món ăn..."></textarea>
<span class="form-message"></span>
</div>
<button class="form-submit btn-add-product-form add-product-e" id="add-product-button">
<i class="fa-regular fa-plus"></i>
<span>THÊM MÓN</span>
</button>
<button class="form-submit btn-update-product-form edit-product-e" id="update-product-button">
<i class="fa-light fa-pencil"></i>
<span>LƯU THAY ĐỔI</span>
</button>
</div>
</form>
</div>
</form>
</div>
</div>
<div class="modal detail-order">
<div class="modal-container">
<h3 class="modal-container-title">CHI TIẾT ĐƠN HÀNG</h3>
<button class="modal-close"><i class="fa-regular fa-xmark"></i></button>
<div class="modal-detail-order">
</div>
<div class="modal-detail-bottom">
</div>
</form>
</div>
</div>
<div class="modal detail-order-product">
<div class="modal-container">
<button class="modal-close"><i class="fa-regular fa-xmark"></i></button>
<div class="table">
<table width="100%">
<thead>
<tr>
<td>Mã đơn</td>
<td>Số lượng</td>
<td>Đơn giá</td>
<td>Ngày đặt</td>
</tr>
</thead>
<tbody id="show-product-order-detail">
</tbody>
</table>
</div>
</form>
</div>
</div>
<div class="modal signup">
<div class="modal-container">
<h3 class="modal-container-title add-account-e">THÊM KHÁCH HÀNG MỚI</h3>
<h3 class="modal-container-title edit-account-e">CHỈNH SỬA THÔNG TIN</h3>
<button class="modal-close"><i class="fa-regular fa-xmark"></i></button>
<div class="form-content sign-up">
<form action="" class="signup-form">
<div class="form-group">
<label for="fullname" class="form-label">Tên đầy đủ</label>
<input id="fullname" name="fullname" type="text" placeholder="VD: Nhật Sinh" class="form-control">
<span class="form-message-name form-message"></span>
</div>
<div class="form-group">
<label for="phone" class="form-label">Số điện thoại</label>
<input id="phone" name="phone" type="text" placeholder="Nhập số điện thoại" class="form-control">
<span class="form-message-phone form-message"></span>
</div>
<div class="form-group">
<label for="password" class="form-label">Mật khẩu</label>
<input id="password" name="password" type="text" placeholder="Nhập mật khẩu" class="form-control">
<span class="form-message-password form-message"></span>
</div>
<div class="form-group edit-account-e">
<label for="" class="form-label">Trạng thái</label>
<input type="checkbox" id="user-status" class="switch-input">
<label for="user-status" class="switch"></label>
</div>
<button class="form-submit add-account-e" id="signup-button">Đăng ký</button>
<button class="form-submit edit-account-e" id="btn-update-account"><i class="fa-regular fa-floppy-disk"></i> Lưu thông tin</button>
</form>
</div>
</div>
</div>
</div>
<div id="toast"></div>
<script src="./js/admin.js"></script>
<script src="./js/toast-message.js"></script>
</body>
</html>