fix: getting reports on reload of the page for user

This commit is contained in:
Angie 2025-08-03 22:21:42 +02:00
parent 9e68a8aa4a
commit e429ee806c

View File

@ -110,6 +110,7 @@ document.addEventListener("DOMContentLoaded", async () => {
if (response.ok) {
const data = await response.json();
appState.currentUser = data.user;
appState.todaysReports = data.todaysReports || [];
document.getElementById("loginScreen").classList.add("hidden");
if (appState.currentUser.role === "admin") {
showAdminInterface();