Update static/script.js
Browse files- static/script.js +8 -8
static/script.js
CHANGED
|
@@ -269,26 +269,25 @@ function chonMuc(muc) {
|
|
| 269 |
if (muc === "tongquan") {
|
| 270 |
tongQuan.style.display = "flex";
|
| 271 |
bang.style.display = "none";
|
| 272 |
-
noiDung.
|
| 273 |
hienThiTongQuan();
|
| 274 |
} else if (muc === "pyc") {
|
| 275 |
tongQuan.style.display = "none";
|
| 276 |
bang.style.display = "block";
|
| 277 |
-
noiDung.style.display = "block";
|
| 278 |
tieuDe.textContent = "Phiếu yêu cầu chưa hoàn thành";
|
| 279 |
hienThiBangTuAPI("/pyc_chua_hoan_thanh", noiDung);
|
| 280 |
-
} else if (muc === "
|
| 281 |
-
//
|
| 282 |
tongQuan.style.display = "none";
|
| 283 |
bang.style.display = "none";
|
| 284 |
-
noiDung.
|
| 285 |
-
|
| 286 |
-
|
|
|
|
| 287 |
veBieuDoDoanhThuThang();
|
| 288 |
} else {
|
| 289 |
tongQuan.style.display = "none";
|
| 290 |
bang.style.display = "block";
|
| 291 |
-
noiDung.style.display = "block";
|
| 292 |
tieuDe.textContent = "🚧 Tính năng đang phát triển";
|
| 293 |
noiDung.innerHTML = "Vui lòng quay lại sau.";
|
| 294 |
}
|
|
@@ -297,6 +296,7 @@ function chonMuc(muc) {
|
|
| 297 |
|
| 298 |
|
| 299 |
|
|
|
|
| 300 |
// Hàm render bảng động
|
| 301 |
async function hienThiBangTuAPI(api, noiDung) {
|
| 302 |
noiDung.innerHTML = "Đang tải dữ liệu...";
|
|
|
|
| 269 |
if (muc === "tongquan") {
|
| 270 |
tongQuan.style.display = "flex";
|
| 271 |
bang.style.display = "none";
|
| 272 |
+
noiDung.innerHTML = "";
|
| 273 |
hienThiTongQuan();
|
| 274 |
} else if (muc === "pyc") {
|
| 275 |
tongQuan.style.display = "none";
|
| 276 |
bang.style.display = "block";
|
|
|
|
| 277 |
tieuDe.textContent = "Phiếu yêu cầu chưa hoàn thành";
|
| 278 |
hienThiBangTuAPI("/pyc_chua_hoan_thanh", noiDung);
|
| 279 |
+
} else if (muc === "dt_thang") {
|
| 280 |
+
// Hiển thị riêng biểu đồ doanh thu tháng
|
| 281 |
tongQuan.style.display = "none";
|
| 282 |
bang.style.display = "none";
|
| 283 |
+
noiDung.innerHTML = `
|
| 284 |
+
<h3 style="text-align:center;">Biểu đồ Doanh thu theo Tháng</h3>
|
| 285 |
+
<canvas id="doanhThuThangChart" style="max-width: 100%; height: 400px;"></canvas>
|
| 286 |
+
`;
|
| 287 |
veBieuDoDoanhThuThang();
|
| 288 |
} else {
|
| 289 |
tongQuan.style.display = "none";
|
| 290 |
bang.style.display = "block";
|
|
|
|
| 291 |
tieuDe.textContent = "🚧 Tính năng đang phát triển";
|
| 292 |
noiDung.innerHTML = "Vui lòng quay lại sau.";
|
| 293 |
}
|
|
|
|
| 296 |
|
| 297 |
|
| 298 |
|
| 299 |
+
|
| 300 |
// Hàm render bảng động
|
| 301 |
async function hienThiBangTuAPI(api, noiDung) {
|
| 302 |
noiDung.innerHTML = "Đang tải dữ liệu...";
|