diff --git a/app.vue b/app/app.vue
similarity index 100%
rename from app.vue
rename to app/app.vue
diff --git a/app/components/Modal.vue b/app/components/Modal.vue
index 00f7b3e..8c44150 100644
--- a/app/components/Modal.vue
+++ b/app/components/Modal.vue
@@ -5,7 +5,7 @@
>
{
});
const id = useId();
-let count = 0;
function closeModal() {
const modals = document.getElementById("modals");
@@ -121,18 +120,19 @@ const modalEvent = function (ev) {
}
};
+function closeOnEsc(e) {
+ if (e.key === "Escape") closeModal();
+}
+
onMounted(() => {
+ window.addEventListener("keydown", closeOnEsc);
document.documentElement.classList.add("is-clipped");
- window.addEventListener("keydown", (e) => {
- if (e.key === "Escape") closeModal();
- });
- const collection = document.getElementsByClassName("modal-background");
- count = collection.length;
});
onUnmounted(() => {
- count--;
- if (count === 0) document.documentElement.classList.remove("is-clipped");
+ window.removeEventListener("keydown", closeOnEsc);
+ const remaining = document.getElementsByClassName("modal-background").length;
+ if (remaining === 0) document.documentElement.classList.remove("is-clipped");
});
diff --git a/app/components/modal/DealerProductSetting.vue b/app/components/modal/DealerProductSetting.vue
deleted file mode 100644
index efa8616..0000000
--- a/app/components/modal/DealerProductSetting.vue
+++ /dev/null
@@ -1,106 +0,0 @@
-
-
-
- Bạn có chắc chắn muốn chuyển sản phẩm này sang trạng thái
-
- {{ newStatus === 2 ? "ĐANG BÁN" : "KHÓA" }}
-
- không?
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/components/modal/InternalEntry.vue b/app/components/modal/InternalEntry.vue
deleted file mode 100644
index e4b36b2..0000000
--- a/app/components/modal/InternalEntry.vue
+++ /dev/null
@@ -1,354 +0,0 @@
-
-
-
-
{{ isVietnamese ? "Đang tải dữ liệu..." : "Loading..." }}
-
-
-
-
{{ isVietnamese ? "Không có dữ liệu" : "No data" }}
-
-
-
-
-
{{ isVietnamese ? "Bút toán" : "Entry" }} #{{ index + 1 }}
-
-
-
-
-
-
-
- {{ entry.code }}
-
-
-
-
-
-
-
-
-
- {{ entry.date ? $dayjs(entry.date).format("L") : "/" }}
-
-
-
-
-
-
-
-
-
-
- {{ $numtoString(entry.amount) }}
-
-
-
-
-
-
-
-
-
-
-
- {{ entry.account__code || "/" }}
-
-
-
-
-
-
-
-
-
-
- {{ entry.account__type__name || "/" }}
-
-
-
-
-
-
-
-
-
- {{ entry.category__name || "/" }}
-
-
-
-
-
-
-
-
-
- {{ entry.account__currency__code || "/" }}
-
-
-
-
-
-
-
-
-
-
- {{ $numtoString(entry.balance_before) }}
-
-
-
-
-
-
-
-
-
-
-
- {{ $numtoString(entry.amount) }}
-
-
-
-
-
-
-
-
-
-
-
- {{ $numtoString(entry.amount) }}
-
-
-
-
-
-
-
-
-
-
-
- {{ $numtoString(entry.balance_after) }}
-
-
-
-
-
-
-
-
-
-
- {{ entry.type__name || "/" }}
-
-
-
-
-
-
-
-
-
-
- {{ entry.inputer__fullname || "/" }}
-
-
-
-
-
-
-
-
-
-
-
- {{ entry.approver__fullname || "/" }}
-
-
-
-
-
-
-
-
-
-
- {{ entry.ref || "/" }}
-
-
-
-
-
-
-
-
-
- {{ entry.create_time ? $dayjs(entry.create_time).format("L HH:mm") : "/" }}
-
-
-
-
-
-
-
-
-
- {{ entry.content || "/" }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/components/modal/PaymentScheduleList.vue b/app/components/modal/PaymentScheduleList.vue
deleted file mode 100644
index c78a727..0000000
--- a/app/components/modal/PaymentScheduleList.vue
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
-
diff --git a/app/components/modal/Reservation.vue b/app/components/modal/Reservation.vue
deleted file mode 100644
index 3b04be4..0000000
--- a/app/components/modal/Reservation.vue
+++ /dev/null
@@ -1,245 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/components/modal/UserMainTab.vue b/app/components/modal/UserMainTab.vue
deleted file mode 100644
index 10fe432..0000000
--- a/app/components/modal/UserMainTab.vue
+++ /dev/null
@@ -1,198 +0,0 @@
-
-
-
-
-
- {{ isVietnamese ? v.name : v.en }}
-
-
-
-
-
-
-
-
-
diff --git a/app/error.vue b/app/error.vue
new file mode 100644
index 0000000..c80f526
--- /dev/null
+++ b/app/error.vue
@@ -0,0 +1,63 @@
+
+
+
+
+
+
Đã xảy ra sự cố
+
+ {{ description }}
+
+
+
+
+
+
+
diff --git a/app/layouts/default.vue b/app/layouts/default.vue
index 371de15..4c9bf06 100644
--- a/app/layouts/default.vue
+++ b/app/layouts/default.vue
@@ -1,35 +1,30 @@
+
+
+
+
-