-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
1741 lines (1689 loc) · 84.9 KB
/
Copy pathindex.html
File metadata and controls
1741 lines (1689 loc) · 84.9 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
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
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="vi">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<div class="sidebar-header">
<h3>Quản Lý Tiệm Bánh</h3>
<div class="theme-toggle ms-2">
<button id="theme-toggle-btn" class="btn btn-outline-secondary">
<i class="bi bi-moon-stars"></i>
</button>
</div>
</div> <!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Bootstrap Icons -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.0/font/bootstrap-icons.css">
<!-- Custom CSS -->
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div id="app">
<!-- Login Page -->
<div id="login-page">
<div class="container">
<div class="row justify-content-center align-items-center">
<div class="col-md-6 col-lg-5">
<div class="login-form">
<div class="text-center mb-4">
<i class="bi bi-cake2 display-1"></i>
<h2 class="mt-3 fw-bold">Đăng Nhập Hệ Thống</h2>
<p class="text-muted">Quản lý tiệm bánh của bạn</p>
</div>
<div id="login-error" class="alert alert-danger d-none" role="alert">
<i class="bi bi-exclamation-triangle-fill me-2"></i>
Tên đăng nhập hoặc mật khẩu không đúng!
</div>
<form id="login-form">
<div class="mb-3">
<label for="username" class="form-label">Tên đăng nhập</label>
<div class="input-group">
<span class="input-group-text bg-light">
<i class="bi bi-person"></i>
</span>
<input type="text" class="form-control" id="username" placeholder="Nhập tên đăng nhập" required>
</div>
</div>
<div class="mb-3">
<div class="d-flex justify-content-between">
<label for="password" class="form-label">Mật khẩu</label>
<a href="#" class="text-decoration-none small">Quên mật khẩu?</a>
</div>
<div class="input-group">
<span class="input-group-text bg-light">
<i class="bi bi-lock"></i>
</span>
<input type="password" class="form-control" id="password" placeholder="Nhập mật khẩu" required>
<button class="btn btn-outline-secondary toggle-password" type="button">
<i class="bi bi-eye-slash"></i>
</button>
</div>
</div>
<div class="mb-3 form-check">
<input class="form-check-input" type="checkbox" id="remember-me">
<label class="form-check-label" for="remember-me">
Ghi nhớ đăng nhập
</label>
</div>
<button type="submit" class="btn btn-primary w-100 mb-3 py-2 fw-bold">
<i class="bi bi-box-arrow-in-right me-2"></i>Đăng Nhập
</button>
<div class="text-center mt-3">
<p class="text-muted small mb-0">Đăng nhập lần cuối: <span id="last-login">2025-03-29 07:28:39</span></p>
<p class="text-muted small">Tài khoản demo: admin / password</p>
</div>
</form>
<div class="login-footer text-center mt-4 pt-3 border-top">
<p class="mb-0 text-muted small">© 2025 - Phần mềm Quản lý Tiệm bánh</p>
<p class="mb-0 text-muted small">Đăng nhập với tư cách: <span class="fw-bold">Phunguy65ok</span></p>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Main Dashboard -->
<div id="dashboard-container" class="d-none">
<div id="sidebar-overlay"></div>
<!-- Sidebar Toggle Button (Mobile) -->
<button id="sidebar-toggle" class="btn btn-light d-md-none position-fixed top-0 start-0 mt-2 ms-2 z-index-1000">
<i class="bi bi-list"></i>
</button>
<!-- Sidebar -->
<nav id="sidebar" class="sidebar">
<div class="sidebar-header">
<h3>Quản Lý Tiệm Bánh</h3>
</div>
<ul class="nav flex-column">
<li class="nav-item">
<a class="nav-link active" href="#" data-page="dashboard">
<i class="bi bi-graph-up"></i> Tổng Quan
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#" data-page="products">
<!-- svg for cake icon because class bi bi-cake2 is not working -->
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-cake" viewBox="0 0 16 16">
<path d="m7.994.013-.595.79a.747.747 0 0 0 .101 1.01V4H5a2 2 0 0 0-2 2v3H2a2 2 0 0 0-2 2v4a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-4a2 2 0 0 0-2-2h-1V6a2 2 0 0 0-2-2H8.5V1.806A.747.747 0 0 0 8.592.802zM4 6a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v.414a.9.9 0 0 1-.646-.268 1.914 1.914 0 0 0-2.708 0 .914.914 0 0 1-1.292 0 1.914 1.914 0 0 0-2.708 0A.9.9 0 0 1 4 6.414zm0 1.414c.49 0 .98-.187 1.354-.56a.914.914 0 0 1 1.292 0c.748.747 1.96.747 2.708 0a.914.914 0 0 1 1.292 0c.374.373.864.56 1.354.56V9H4zM1 11a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v.793l-.354.354a.914.914 0 0 1-1.293 0 1.914 1.914 0 0 0-2.707 0 .914.914 0 0 1-1.292 0 1.914 1.914 0 0 0-2.708 0 .914.914 0 0 1-1.292 0 1.914 1.914 0 0 0-2.708 0 .914.914 0 0 1-1.292 0L1 11.793zm11.646 1.854a1.915 1.915 0 0 0 2.354.279V15H1v-1.867c.737.452 1.715.36 2.354-.28a.914.914 0 0 1 1.292 0c.748.748 1.96.748 2.708 0a.914.914 0 0 1 1.292 0c.748.748 1.96.748 2.707 0a.914.914 0 0 1 1.293 0Z"/>
</svg> Sản Phẩm
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#" data-page="orders">
<i class="bi bi-bag"></i> Đơn Hàng
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#" data-page="staff">
<i class="bi bi-people"></i> Nhân Viên
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#" data-page="customers">
<i class="bi bi-person"></i> Khách Hàng
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#" data-page="reports">
<i class="bi bi-file-earmark-text"></i> Báo Cáo
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#" data-page="settings">
<i class="bi bi-gear"></i> Cài Đặt
</a>
</li>
</ul>
<div class="sidebar-footer">
<button id="logout-btn" class="btn btn-outline-danger w-100">
<i class="bi bi-box-arrow-right"></i> Đăng Xuất
</button>
</div>
</nav>
<!-- Main Content -->
<main id="content">
<!-- Header -->
<header class="content-header">
<h1 id="page-title">Tổng Quan</h1>
<div class="user-menu">
<div class="notifications">
<div class="dropdown">
<button class="btn position-relative" type="button" data-bs-toggle="dropdown">
<i class="bi bi-bell"></i>
<span class="badge bg-danger position-absolute top-0 start-100 translate-middle">3</span>
</button>
<div class="dropdown-menu dropdown-menu-end notifications-menu p-0" style="width: 320px;">
<div class="notifications-header d-flex justify-content-between align-items-center p-3 border-bottom">
<h6 class="mb-0">Thông Báo (3)</h6>
<a href="#" class="text-decoration-none small">Đánh dấu tất cả đã đọc</a>
</div>
<div class="notifications-list">
<a href="#" class="dropdown-item p-3 border-bottom unread">
<div class="d-flex">
<div class="notification-icon me-3 bg-primary text-white rounded-circle">
<i class="bi bi-bag"></i>
</div>
<div class="flex-grow-1">
<p class="mb-1 fw-bold">Đơn hàng mới #ĐH-042</p>
<p class="mb-1 small">Khách hàng: Nguyễn Văn A - Tổng: 245.000₫</p>
<p class="mb-0 text-muted x-small">15 phút trước</p>
</div>
</div>
</a>
<a href="#" class="dropdown-item p-3 border-bottom unread">
<div class="d-flex">
<div class="notification-icon me-3 bg-warning text-white rounded-circle">
<i class="bi bi-exclamation-triangle"></i>
</div>
<div class="flex-grow-1">
<p class="mb-1 fw-bold">Cảnh báo hết hàng</p>
<p class="mb-1 small">Bánh Kem Socola sắp hết hàng (còn 3)</p>
<p class="mb-0 text-muted x-small">45 phút trước</p>
</div>
</div>
</a>
<a href="#" class="dropdown-item p-3 border-bottom unread">
<div class="d-flex">
<div class="notification-icon me-3 bg-success text-white rounded-circle">
<i class="bi bi-graph-up"></i>
</div>
<div class="flex-grow-1">
<p class="mb-1 fw-bold">Báo cáo doanh thu</p>
<p class="mb-1 small">Báo cáo doanh thu ngày 22/03/2025 đã sẵn sàng</p>
<p class="mb-0 text-muted x-small">2 giờ trước</p>
</div>
</div>
</a>
</div>
<div class="notifications-footer p-2 text-center border-top">
<a href="#" class="text-decoration-none small">Xem tất cả thông báo</a>
</div>
</div>
</div>
</div>
<div class="user-info">
<div class="user-avatar">QT</div>
<span>Quản Trị Viên</span>
</div>
</div>
</header>
<!-- Page Content -->
<div id="page-content">
<!-- Dashboard Page -->
<div id="dashboard-page" class="page-content">
<div class="row mb-4">
<div class="col-md-3 col-sm-6 mb-3">
<div class="stat-card">
<div class="stat-card-body">
<p class="stat-card-title">Tổng Doanh Thu</p>
<h2 class="stat-card-value">8.459.000₫</h2>
<p class="stat-card-change positive">+12.5% so với tuần trước</p>
</div>
</div>
</div>
<div class="col-md-3 col-sm-6 mb-3">
<div class="stat-card">
<div class="stat-card-body">
<p class="stat-card-title">Đơn Hàng</p>
<h2 class="stat-card-value">245</h2>
<p class="stat-card-change positive">+18.2% so với tuần trước</p>
</div>
</div>
</div>
<div class="col-md-3 col-sm-6 mb-3">
<div class="stat-card">
<div class="stat-card-body">
<p class="stat-card-title">Khách Hàng</p>
<h2 class="stat-card-value">1.250</h2>
<p class="stat-card-change positive">+5.1% so với tuần trước</p>
</div>
</div>
</div>
<div class="col-md-3 col-sm-6 mb-3">
<div class="stat-card">
<div class="stat-card-body">
<p class="stat-card-title">Đơn Hàng TB</p>
<h2 class="stat-card-value">34.500₫</h2>
<p class="stat-card-change negative">-2.4% so với tuần trước</p>
</div>
</div>
</div>
</div>
<div class="row mb-4">
<div class="col-lg-6 mb-4">
<div class="card">
<div class="card-header">
<h5 class="card-title">Tổng Quan Doanh Thu</h5>
</div>
<div class="card-body">
<div class="revenue-chart">
<div class="revenue-item">
<div class="d-flex justify-content-between mb-2">
<span>Thứ Hai</span>
<span>1.245.000₫</span>
</div>
<div class="progress">
<div class="progress-bar bg-primary" role="progressbar" style="width: 70%"></div>
</div>
</div>
<div class="revenue-item mt-3">
<div class="d-flex justify-content-between mb-2">
<span>Thứ Ba</span>
<span>1.400.000₫</span>
</div>
<div class="progress">
<div class="progress-bar bg-primary" role="progressbar" style="width: 80%"></div>
</div>
</div>
<div class="revenue-item mt-3">
<div class="d-flex justify-content-between mb-2">
<span>Thứ Tư</span>
<span>1.150.000₫</span>
</div>
<div class="progress">
<div class="progress-bar bg-primary" role="progressbar" style="width: 65%"></div>
</div>
</div>
<div class="revenue-item mt-3">
<div class="d-flex justify-content-between mb-2">
<span>Thứ Năm</span>
<span>1.500.000₫</span>
</div>
<div class="progress">
<div class="progress-bar bg-primary" role="progressbar" style="width: 85%"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-6 mb-4">
<div class="card">
<div class="card-header">
<h5 class="card-title">Sản Phẩm Phổ Biến</h5>
</div>
<div class="card-body">
<div class="popular-products">
<div class="product-item d-flex align-items-center mb-3">
<div class="product-icon">
<img src="images/kemsocola.jpg" alt="Bánh Kem Socola" class="product-image" style="width: 40px; height: 40px; object-fit: cover; border-radius: 5px;">
</div>
<div class="product-info flex-grow-1">
<h6 class="mb-0">Bánh Kem Socola</h6>
<small class="text-muted">245 đơn hàng</small>
</div>
<div class="product-price text-primary">45.000₫</div>
</div>
<div class="product-item d-flex align-items-center mb-3">
<div class="product-icon">
<img src="images/kemsocola.jpg" alt="Bánh Kem Socola" class="product-image" style="width: 40px; height: 40px; object-fit: cover; border-radius: 5px;">
</div>
<div class="product-info flex-grow-1">
<h6 class="mb-0">Bánh Cupcake Vanilla</h6>
<small class="text-muted">198 đơn hàng</small>
</div>
<div class="product-price text-primary">42.000₫</div>
</div>
<div class="product-item d-flex align-items-center mb-3">
<div class="product-icon">
<img src="images/kemsocola.jpg" alt="Bánh Kem Socola" class="product-image" style="width: 40px; height: 40px; object-fit: cover; border-radius: 5px;">
</div>
<div class="product-info flex-grow-1">
<h6 class="mb-0">Bánh Tiramisu</h6>
<small class="text-muted">154 đơn hàng</small>
</div>
<div class="product-price text-primary">35.000₫</div>
</div>
<div class="product-item d-flex align-items-center">
<div class="product-icon">
<img src="images/kemsocola.jpg" alt="Bánh Kem Socola" class="product-image" style="width: 40px; height: 40px; object-fit: cover; border-radius: 5px;">
</div>
<div class="product-info flex-grow-1">
<h6 class="mb-0">Bánh Croissant</h6>
<small class="text-muted">132 đơn hàng</small>
</div>
<div class="product-price text-primary">47.000₫</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-header d-flex justify-content-between align-items-center">
<h5 class="card-title">Đơn Hàng Gần Đây</h5>
<a href="#" class="btn btn-sm btn-link">Xem tất cả</a>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-hover">
<thead>
<tr>
<th>Mã Đơn</th>
<th>Khách Hàng</th>
<th>Ngày</th>
<th>Số Tiền</th>
<th>Trạng Thái</th>
<th>Thao Tác</th>
</tr>
</thead>
<tbody>
<tr>
<td>#ĐH-001</td>
<td>Nguyễn Văn A</td>
<td>22/03/2025</td>
<td>245.000₫</td>
<td><span class="badge bg-success">Hoàn Thành</span></td>
<td><button class="btn btn-sm btn-primary">Chi tiết</button></td>
</tr>
<tr>
<td>#ĐH-002</td>
<td>Trần Thị B</td>
<td>22/03/2025</td>
<td>187.000₫</td>
<td><span class="badge bg-warning text-dark">Đang Xử Lý</span></td>
<td><button class="btn btn-sm btn-primary">Chi tiết</button></td>
</tr>
<tr>
<td>#ĐH-003</td>
<td>Lê Văn C</td>
<td>21/03/2025</td>
<td>320.000₫</td>
<td><span class="badge bg-success">Hoàn Thành</span></td>
<td><button class="btn btn-sm btn-primary">Chi tiết</button></td>
</tr>
<tr>
<td>#ĐH-004</td>
<td>Phạm Thị D</td>
<td>21/03/2025</td>
<td>122.000₫</td>
<td><span class="badge bg-danger">Đã Hủy</span></td>
<td><button class="btn btn-sm btn-primary">Chi tiết</button></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- Products Page -->
<div id="products-page" class="page-content d-none">
<div class="d-flex justify-content-between align-items-center mb-4">
<h2>Quản Lý Sản Phẩm</h2>
<button id="add-product-btn" class="btn btn-primary">
<i class="bi bi-plus-lg"></i> Thêm Sản Phẩm Mới
</button>
</div>
<!-- Product Form (Add/Edit) -->
<div id="product-form-container" class="card mb-4 d-none">
<div class="card-header d-flex justify-content-between align-items-center">
<h5 id="product-form-title">Thêm Sản Phẩm Mới</h5>
<button id="close-product-form" class="btn-close"></button>
</div>
<div class="card-body">
<form id="product-form">
<input type="hidden" id="product-id">
<div class="row">
<div class="col-md-6 mb-3">
<label for="product-name" class="form-label">Tên Sản Phẩm</label>
<input type="text" class="form-control" id="product-name" required>
</div>
<div class="col-md-6 mb-3">
<label for="product-category" class="form-label">Danh Mục</label>
<select class="form-select" id="product-category">
<option>Bánh Kem</option>
<option>Bánh Ngọt</option>
<option>Bánh Mì</option>
<option>Cookies</option>
</select>
</div>
<div class="col-md-6 mb-3">
<label for="product-price" class="form-label">Giá (VNĐ)</label>
<input type="text" class="form-control" id="product-price" placeholder="VD: 45.000₫" required>
</div>
<div class="col-md-6 mb-3">
<label for="product-stock" class="form-label">Số Lượng Tồn Kho</label>
<input type="number" class="form-control" id="product-stock" min="0" required>
</div>
</div>
<div class="d-flex justify-content-end gap-2">
<button type="button" id="cancel-product-form" class="btn btn-secondary">Hủy Bỏ</button>
<button type="submit" class="btn btn-primary">Lưu Sản Phẩm</button>
</div>
</form>
</div>
</div>
<div class="card">
<div class="card-header bg-white p-3">
<div class="row g-3">
<div class="col-md-4">
<div class="input-group">
<span class="input-group-text"><i class="bi bi-search"></i></span>
<input type="text" class="form-control" placeholder="Tìm kiếm sản phẩm...">
</div>
</div>
<div class="col-md-8 d-flex justify-content-md-end">
<select id="category-filter-dropdown" class="form-select me-2" style="max-width: 200px;" title="Lọc theo danh mục">
<option value="all">Tất Cả Danh Mục</option>
<option value="Bánh Kem">Bánh Kem</option>
<option value="Bánh Ngọt">Bánh Ngọt</option>
<option value="Bánh Mì">Bánh Mì</option>
<option value="Cookies">Cookies</option>
</select>
<select id="products-sort-dropdown" class="form-select" style="max-width: 200px;" title="Sắp xếp sản phẩm">
<option value="name-asc">Sắp xếp: Tên (A-Z)</option>
<option value="name-desc">Sắp xếp: Tên (Z-A)</option>
<option value="price-asc">Sắp xếp: Giá (Thấp đến Cao)</option>
<option value="price-desc">Sắp xếp: Giá (Cao đến Thấp)</option>
<option value="stock-asc">Sắp xếp: Tồn Kho (Thấp đến Cao)</option>
<option value="stock-desc">Sắp xếp: Tồn Kho (Cao đến Thấp)</option>
</select>
</div>
</div>
</div>
<div class="card-body p-0">
<div class="table-responsive">
<table class="table table-hover product-table">
<thead>
<tr>
<th class="sortable" data-sort="name">Sản Phẩm</th>
<th class="sortable" data-sort="category">Danh Mục</th>
<th class="sortable" data-sort="price">Giá</th>
<th class="sortable" data-sort="stock">Tồn Kho</th>
<th class="sortable" data-sort="status">Trạng Thái</th>
<th>Thao Tác</th>
</tr>
</thead>
<tbody id="products-table-body">
<!-- Products will be loaded here by JavaScript -->
</tbody>
</table>
</div>
</div>
<div class="card-footer">
<div class="d-flex justify-content-between align-items-center">
<div>Hiển thị <span class="fw-bold" id="start-index">1</span> đến <span class="fw-bold" id="end-index">10</span> của <span class="fw-bold" id="total-products">0</span> kết quả</div>
<nav>
<ul class="pagination mb-0">
<li class="page-item" id="prev-page"><a class="page-link" href="#">Trước</a></li>
<li class="page-item"><a class="page-link" id="current-page"></a></li>
<li class="page-item" id="next-page"><a class="page-link" href="#">Sau</a></li>
</ul>
</nav>
</div>
</div>
</div>
</div>
<!-- Orders Page -->
<div id="orders-page" class="page-content d-none">
<div class="d-flex justify-content-between align-items-center mb-4">
<h2>Quản Lý Đơn Hàng</h2>
<div>
<button class="btn btn-outline-primary me-2">
<i class="bi bi-file-earmark-arrow-down"></i> Xuất Đơn Hàng
</button>
<button id="create-order-btn" class="btn btn-primary">
<i class="bi bi-plus-lg"></i> Tạo Đơn Hàng
</button>
</div>
</div>
<div class="row mb-4">
<div class="col-md-3 col-sm-6 mb-3">
<div class="card border-start border-primary border-4">
<div class="card-body">
<div class="text-muted">Tổng Đơn Hàng</div>
<div class="fs-4 fw-bold">245</div>
</div>
</div>
</div>
<div class="col-md-3 col-sm-6 mb-3">
<div class="card border-start border-success border-4">
<div class="card-body">
<div class="text-muted">Hoàn Thành</div>
<div class="fs-4 fw-bold">189</div>
</div>
</div>
</div>
<div class="col-md-3 col-sm-6 mb-3">
<div class="card border-start border-warning border-4">
<div class="card-body">
<div class="text-muted">Đang Xử Lý</div>
<div class="fs-4 fw-bold">42</div>
</div>
</div>
</div>
<div class="col-md-3 col-sm-6 mb-3">
<div class="card border-start border-danger border-4">
<div class="card-body">
<div class="text-muted">Đã Hủy</div>
<div class="fs-4 fw-bold">14</div>
</div>
</div>
</div>
</div>
<!-- Create Order Modal -->
<div class="modal fade" id="createOrderModal" tabindex="-1" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Tạo Đơn Hàng Mới</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form id="create-order-form" class="create-order-form">
<div class="row">
<div class="col-md-8">
<div class="mb-3">
<label for="order-customer" class="form-label">Khách Hàng</label>
<select class="form-select" id="order-customer" required>
<option value="">Chọn khách hàng...</option>
<!-- Customers will be loaded here by JavaScript -->
</select>
</div>
<div class="mb-3">
<label class="form-label">Sản Phẩm</label>
<div class="product-list">
<!-- Products will be loaded here by JavaScript -->
</div>
</div>
<div class="mb-3">
<label for="order-note" class="form-label">Ghi Chú</label>
<textarea class="form-control" id="order-note" rows="3" placeholder="Ghi chú về đơn hàng..."></textarea>
</div>
</div>
<div class="col-md-4">
<div class="order-summary">
<h6 class="mb-3">Tổng Quan Đơn Hàng</h6>
<div class="order-summary-item">
<span>Tổng sản phẩm:</span>
<span id="order-total-items">0</span>
</div>
<div class="order-summary-item">
<span>Tạm tính:</span>
<span id="order-subtotal">0₫</span>
</div>
<div class="order-summary-item">
<span>Thuế (10%):</span>
<span id="order-tax">0₫</span>
</div>
<div class="order-summary-item order-total">
<span>Tổng cộng:</span>
<span id="order-total">0₫</span>
</div>
<div class="mt-3">
<label for="order-payment" class="form-label">Phương Thức Thanh Toán</label>
<select class="form-select" id="order-payment" required>
<option value="Tiền Mặt">Tiền Mặt</option>
<option value="Thẻ Tín Dụng/Ghi Nợ">Thẻ Tín Dụng/Ghi Nợ</option>
<option value="Ví MoMo">Ví MoMo</option>
<option value="ZaloPay">ZaloPay</option>
</select>
</div>
<div class="mt-3">
<label for="order-status" class="form-label">Trạng Thái</label>
<select class="form-select" id="order-status" required>
<option value="Đang Xử Lý">Đang Xử Lý</option>
<option value="Hoàn Thành">Hoàn Thành</option>
</select>
</div>
</div>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Hủy Bỏ</button>
<button type="button" class="btn btn-primary" id="save-order-btn">Tạo Đơn Hàng</button>
</div>
</div>
</div>
</div>
<!-- Order Detail Modal -->
<div class="modal fade" id="orderDetailModal" tabindex="-1" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Chi Tiết Đơn Hàng #<span id="order-detail-id"></span></h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="row mb-4">
<div class="col-md-6">
<h6 class="mb-2">Thông Tin Đơn Hàng</h6>
<div class="bg-light p-3 rounded">
<div class="row mb-2">
<div class="col-5 text-muted">Mã Đơn Hàng:</div>
<div class="col-7" id="order-detail-code"></div>
</div>
<div class="row mb-2">
<div class="col-5 text-muted">Ngày Đặt:</div>
<div class="col-7" id="order-detail-date"></div>
</div>
<div class="row mb-2">
<div class="col-5 text-muted">Trạng Thái:</div>
<div class="col-7">
<select id="order-detail-status" class="form-select form-select-sm">
<option value="Đang Xử Lý">Đang Xử Lý</option>
<option value="Hoàn Thành">Hoàn Thành</option>
<option value="Đã Hủy">Đã Hủy</option>
</select>
</div>
</div>
<div class="row">
<div class="col-5 text-muted">Tổng Tiền:</div>
<div class="col-7 fw-bold" id="order-detail-amount"></div>
</div>
</div>
</div>
<div class="col-md-6">
<h6 class="mb-2">Thông Tin Khách Hàng</h6>
<div class="bg-light p-3 rounded">
<div class="row mb-2">
<div class="col-5 text-muted">Tên Khách Hàng:</div>
<div class="col-7" id="order-detail-customer"></div>
</div>
<div class="row mb-2">
<div class="col-5 text-muted">Số Điện Thoại:</div>
<div class="col-7">0987654321</div>
</div>
<div class="row mb-2">
<div class="col-5 text-muted">Email:</div>
<div class="col-7">khachhang@example.com</div>
</div>
<div class="row">
<div class="col-5 text-muted">Địa Chỉ:</div>
<div class="col-7">123 Đường ABC, Quận XYZ, TP. Hồ Chí Minh</div>
</div>
</div>
</div>
</div>
<h6 class="mb-2">Sản Phẩm Đã Đặt</h6>
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th>Sản Phẩm</th>
<th>Đơn Giá</th>
<th>Số Lượng</th>
<th>Thành Tiền</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<div class="d-flex align-items-center">
<div class="product-icon me-2">
<i class="bi bi-cake2"></i>
</div>
<div>Bánh Kem Socola</div>
</div>
</td>
<td>45.000₫</td>
<td>2</td>
<td>90.000₫</td>
</tr>
<tr>
<td>
<div class="d-flex align-items-center">
<div class="product-icon me-2">
<i class="bi bi-cake2"></i>
</div>
<div>Bánh Croissant</div>
</div>
</td>
<td>32.000₫</td>
<td>1</td>
<td>32.000₫</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="3" class="text-end fw-bold">Tổng cộng:</td>
<td class="fw-bold" id="order-detail-total">122.000₫</td>
</tr>
</tfoot>
</table>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-outline-primary me-2">
<i class="bi bi-printer"></i> In Hóa Đơn
</button>
<button type="button" class="btn btn-primary" id="update-order-btn">
<i class="bi bi-check-lg"></i> Cập Nhật
</button>
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-header bg-white p-3">
<div class="row g-3">
<div class="col-md-4">
<div class="input-group">
<span class="input-group-text"><i class="bi bi-search"></i></span>
<input type="text" class="form-control" placeholder="Tìm kiếm đơn hàng...">
</div>
</div>
<div class="col-md-8 d-flex flex-wrap justify-content-md-end gap-2">
<select class="form-select" style="max-width: 200px;">
<option>Tất Cả Trạng Thái</option>
<option>Hoàn Thành</option>
<option>Đang Xử Lý</option>
<option>Đã Hủy</option>
</select>
<select class="form-select" style="max-width: 200px;">
<option>Hôm Nay</option>
<option>Hôm Qua</option>
<option>7 Ngày Qua</option>
<option>30 Ngày Qua</option>
<option>Tùy Chỉnh</option>
</select>
<select class="form-select" style="max-width: 200px;">
<option>Sắp xếp: Mới Nhất</option>
<option>Sắp xếp: Cũ Nhất</option>
<option>Sắp xếp: Giá Trị (Cao-Thấp)</option>
<option>Sắp xếp: Giá Trị (Thấp-Cao)</option>
</select>
</div>
</div>
</div>
<div class="card-body p-0">
<div class="table-responsive">
<table class="table table-hover">
<thead>
<tr>
<th>Mã Đơn</th>
<th>Khách Hàng</th>
<th>Ngày</th>
<th>Sản Phẩm</th>
<th>Số Tiền</th>
<th>Trạng Thái</th>
<th class="text-end">Thao Tác</th>
</tr>
</thead>
<tbody id="orders-table-body">
<tr>
<td data-label="Mã Đơn">#ĐH-001</td>
<td data-label="Khách Hàng">Nguyễn Văn A</td>
<td data-label="Ngày">22/03/2025</td>
<td data-label="Số Tiền">245.000₫</td>
<td data-label="Trạng Thái"><span class="badge bg-success">Hoàn Thành</span></td>
<td data-label="Thao Tác"><button class="btn btn-sm btn-primary">Chi tiết</button></td>
</tr>
<!-- Orders will be loaded here by JavaScript -->
</tbody>
</table>
</div>
</div>
<div class="card-footer">
<div class="d-flex justify-content-between align-items-center">
<div>Hiển thị <span class="fw-bold">1</span> đến <span class="fw-bold">8</span> của <span class="fw-bold">245</span> kết quả</div>
<nav>
<ul class="pagination mb-0">
<li class="page-item disabled"><a class="page-link" href="#">Trước</a></li>
<li class="page-item active"><a class="page-link" href="#">1</a></li>
<li class="page-item"><a class="page-link" href="#">2</a></li>
<li class="page-item"><a class="page-link" href="#">3</a></li>
<li class="page-item"><a class="page-link" href="#">Sau</a></li>
</ul>
</nav>
</div>
</div>
</div>
</div>
<!-- Staff Page -->
<div id="staff-page" class="page-content d-none">
<div class="d-flex justify-content-between align-items-center mb-4">
<h2>Quản Lý Nhân Viên</h2>
<button id="add-employee-btn" class="btn btn-primary">
<i class="bi bi-plus-lg"></i> Thêm Nhân Viên Mới
</button>
</div>
<!-- Employee Form (Add/Edit) -->
<div id="employee-form-container" class="card mb-4 d-none">
<div class="card-header d-flex justify-content-between align-items-center">
<h5 id="employee-form-title">Thêm Nhân Viên Mới</h5>
<button id="close-employee-form" class="btn-close"></button>
</div>
<div class="card-body">
<form id="employee-form">
<input type="hidden" id="employee-id">
<div class="row">
<div class="col-md-6 mb-3">
<label for="employee-name" class="form-label">Tên Nhân Viên</label>
<input type="text" class="form-control" id="employee-name" required>
</div>
<div class="col-md-6 mb-3">
<label for="employee-role" class="form-label">Vị Trí</label>
<select class="form-select" id="employee-role">
<option>Quản Lý</option>
<option>Nhân Viên Bán Hàng</option>
<option>Nhân Viên Làm Bánh</option>
<option>Thu Ngân</option>
</select>
</div>
<div class="col-md-6 mb-3">
<label for="employee-email" class="form-label">Email</label>
<input type="email" class="form-control" id="employee-email" required>
</div>
<div class="col-md-6 mb-3">
<label for="employee-phone" class="form-label">Số Điện Thoại</label>
<input type="text" class="form-control" id="employee-phone" required>
</div>
<div class="col-md-6 mb-3">
<label for="employee-joined" class="form-label">Ngày Vào Làm</label>
<input type="text" class="form-control" id="employee-joined" placeholder="DD/MM/YYYY" required>
</div>
<div class="col-md-6 mb-3">
<label for="employee-status" class="form-label">Trạng Thái</label>
<select class="form-select" id="employee-status">
<option>Đang Làm</option>
<option>Nghỉ Phép</option>
</select>
</div>
</div>
<div class="d-flex justify-content-end gap-2">
<button type="button" id="cancel-employee-form" class="btn btn-secondary">Hủy Bỏ</button>
<button type="submit" class="btn btn-primary">Lưu Nhân Viên</button>
</div>
</form>
</div>
</div>
<div class="row mb-4">
<div class="col-md-4 col-sm-6 mb-3">
<div class="card border-start border-primary border-4">
<div class="card-body">
<div class="text-muted">Tổng Nhân Viên</div>
<div class="fs-4 fw-bold" id="total-employees">12</div>
</div>
</div>
</div>
<div class="col-md-4 col-sm-6 mb-3">
<div class="card border-start border-success border-4">
<div class="card-body">
<div class="text-muted">Đang Làm</div>
<div class="fs-4 fw-bold" id="active-employees">10</div>
</div>
</div>
</div>
<div class="col-md-4 col-sm-6 mb-3">
<div class="card border-start border-danger border-4">
<div class="card-body">
<div class="text-muted">Nghỉ Phép</div>
<div class="fs-4 fw-bold" id="on-leave-employees">2</div>
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-header bg-white p-3">
<div class="row g-3">
<div class="col-md-4">
<div class="input-group">
<span class="input-group-text"><i class="bi bi-search"></i></span>
<input type="text" class="form-control" placeholder="Tìm kiếm nhân viên...">
</div>
</div>
<div class="col-md-8 d-flex justify-content-md-end gap-2">
<select class="form-select" style="max-width: 200px;">
<option>Tất Cả Vị Trí</option>
<option>Quản Lý</option>
<option>Nhân Viên Bán Hàng</option>
<option>Nhân Viên Làm Bánh</option>
<option>Thu Ngân</option>
</select>
<select class="form-select" style="max-width: 200px;">
<option>Tất Cả Trạng Thái</option>
<option>Đang Làm</option>
<option>Nghỉ Phép</option>
</select>
</div>
</div>
</div>
<div class="card-body p-0">
<div class="table-responsive">
<table class="table table-hover">
<thead>
<tr>
<th>Nhân Viên</th>
<th>Vị Trí</th>
<th>Liên Hệ</th>
<th>Ngày Vào Làm</th>
<th>Trạng Thái</th>
<th class="text-end">Thao Tác</th>
</tr>
</thead>
<tbody id="employees-table-body">
<!-- Employees will be loaded here by JavaScript -->
</tbody>
</table>
</div>
</div>
<div class="card-footer">
<div class="d-flex justify-content-between align-items-center">
<div>Hiển thị <span class="fw-bold">1</span> đến <span class="fw-bold">8</span> của <span class="fw-bold">12</span> kết quả</div>
<nav>
<ul class="pagination mb-0">
<li class="page-item disabled"><a class="page-link" href="#">Trước</a></li>
<li class="page-item active"><a class="page-link" href="#">1</a></li>
<li class="page-item"><a class="page-link" href="#">2</a></li>
<li class="page-item"><a class="page-link" href="#">Sau</a></li>