Update: Modifico el código para permitir ver dos estancias en un mismo monitor

This commit is contained in:
2025-07-29 12:56:55 +02:00
parent be25cdd16d
commit 917bef33be
5 changed files with 50 additions and 24 deletions
-2
View File
@@ -8,11 +8,9 @@
}
.animate-scroll {
display: inline-block;
animation: scroll 45s linear infinite;
}
@keyframes blink {
0%, 100% { background-color: #0a6eb2}
50% { background-color: #ffff00; color: black; }
+9 -5
View File
@@ -3,11 +3,11 @@ const estadoAnterior = {};
let ultimoFooter = "";
function cargarTabla() {
fetch("/api/datos")
function cargarTabla(endpoint, tablaId) {
fetch(endpoint)
.then(res => res.json())
.then(filas => {
const tbody = document.getElementById("turnos");
const tbody = document.getElementById(tablaId);
tbody.innerHTML = "";
let sizeClass = "";
@@ -75,7 +75,11 @@ function cargarFooter() {
});
}
function actualizarTablas(){
cargarTabla("/api/datos1","turnos1");
cargarTabla("/api/datos2","turnos2");
}
cargarFooter();
cargarTabla();
setInterval(cargarTabla, 30000);
actualizarTablas();
setInterval(actualizarTablas, 30000);
setInterval(cargarFooter, 45000);