fix: getting reports on reload of the page for user
This commit is contained in:
parent
9e68a8aa4a
commit
e429ee806c
@ -110,6 +110,7 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|||||||
if (response.ok) {
|
if (response.ok) {
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
appState.currentUser = data.user;
|
appState.currentUser = data.user;
|
||||||
|
appState.todaysReports = data.todaysReports || [];
|
||||||
document.getElementById("loginScreen").classList.add("hidden");
|
document.getElementById("loginScreen").classList.add("hidden");
|
||||||
if (appState.currentUser.role === "admin") {
|
if (appState.currentUser.role === "admin") {
|
||||||
showAdminInterface();
|
showAdminInterface();
|
||||||
|
Loading…
Reference in New Issue
Block a user