update revisi

This commit is contained in:
Jagad R R
2025-03-05 13:44:58 +07:00
parent 278fc3741d
commit ee3de88659
18 changed files with 673 additions and 121 deletions
+25
View File
@@ -281,3 +281,28 @@
periode.textContent = `${month} (12 ${month} - 10 ${nextMonth} ${year})`;
</script>
<script>
let logoutTimer;
function resetLogoutTimer() {
clearTimeout(logoutTimer);
logoutTimer = setTimeout(() => {
fetch("{{ route('admin.logout.submit') }}", {
method: "POST",
headers: {
"X-CSRF-TOKEN": "{{ csrf_token() }}",
"Content-Type": "application/json"
},
body: JSON.stringify({})
}).then(() => {
window.location.href = "{{ url('/login') }}";
});
}, 30 * 60 * 1000); // 30 minutes
}
document.addEventListener('mousemove', resetLogoutTimer);
document.addEventListener('keydown', resetLogoutTimer);
resetLogoutTimer();
</script>