This commit is contained in:
Naiel
2025-06-05 11:55:36 +02:00
committed by GitHub
parent 013a2060b0
commit bebeb1a113

View File

@@ -2098,12 +2098,15 @@
}, },
index: function () { index: function () {
var tts = false; var tts = false;
setTimeout(() => {tts = true}, 7500) setTimeout(() => {tts = true}, 12500)
const tablebody = safeuuid(); const tablebody = safeuuid();
var btn_new = safeuuid(); var btn_new = safeuuid();
var tts_check = safeuuid();
container.innerHTML = ` container.innerHTML = `
<h1>SuperCafé</h1> <h1>SuperCafé</h1>
<button id="${btn_new}">Nueva comanda</button> <button id="${btn_new}">Nueva comanda</button>
<label><b>Habilitar avisos:</b> <input type="checkbox" id="${tts_check}" checked></label>
<div id="scrolltable"><table> <div id="scrolltable"><table>
<thead> <thead>
<tr> <tr>
@@ -2314,7 +2317,7 @@
if (old[key] == undefined) { if (old[key] == undefined) {
old[key] = ""; old[key] = "";
} }
if (old[key] != data.Estado) { if (old[key] != data.Estado && document.getElementById(tts_check).checked) {
console.log("SC:Updated:", data) console.log("SC:Updated:", data)
if (tts) { if (tts) {
var msg = `Comanda de ${SC_Personas[data.Persona].Region}. ${SC_Personas[data.Persona].Nombre}. ${data.Estado}` var msg = `Comanda de ${SC_Personas[data.Persona].Region}. ${SC_Personas[data.Persona].Nombre}. ${data.Estado}`