some naiwan na session timeout

This commit is contained in:
ssbg04 committed 2026-04-24 15:47:07 +08:00
1 parent 067399463e
commit f15f7d0e60
2 files changed
+17 -2

No files matched your search

+16 -1
View File
@@ -24,7 +24,16 @@ $(document).ready(function () {
if (!window.currentTab) {
switchTab('inventory');
}
} else {
} else if (res.status === "timeout"){
$("#topNavbar, #dashboardSection").hide();
$("#loginSection").addClass("d-flex").fadeIn();
showAlert("Your session has expired due to inactivity. Please log in again.", "warning");
allInventoryData = [];
allPOData = [];
window.currentTab = null;
}
else {
$("#topNavbar, #dashboardSection").hide();
$("#loginSection").addClass("d-flex").fadeIn();
}
@@ -34,6 +43,12 @@ $(document).ready(function () {
$("#loginSection").addClass("d-flex").fadeIn();
}
});
setInterval(function() {
if ($("#dashboardSection").is(":visible")) {
checkAuth();
}
}, 5 * 60 * 1000);
}
// 2. Handle Login Form & Brute Force Cooldown Timer
+1 -1
View File
@@ -6,7 +6,7 @@ $(document).ready(function () {
let allIssuedData = [];
let filteredIssuedData = [];
let issuedCurrentPage = 1;
const issuedItemsPerPage = 5; // Show 10 rows per page
const issuedItemsPerPage = 10; // Show 10 rows per page
window.loadIssuedItems = function (btn = null) {
let originalText = "";