Actualizar calendario.html
This commit is contained in:
@@ -281,7 +281,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
document.addEventListener("DOMContentLoaded", async () => {
|
document.addEventListener("DOMContentLoaded", async () => {
|
||||||
if (!localStorage.getItem("token") || localStorage.getItem("role") !== 'operario') {
|
const currentRole = localStorage.getItem("role");
|
||||||
|
if (!localStorage.getItem("token") || (currentRole !== 'operario' && currentRole !== 'operario_cerrado')) {
|
||||||
window.location.href = "index.html"; return;
|
window.location.href = "index.html"; return;
|
||||||
}
|
}
|
||||||
await applyTheme();
|
await applyTheme();
|
||||||
|
|||||||
Reference in New Issue
Block a user