diff --git a/index.html b/index.html index a345469..db6ad15 100644 --- a/index.html +++ b/index.html @@ -318,7 +318,92 @@ } - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
@@ -697,7 +782,6 @@ gun.get(TABLE).get("heartbeat"), "heartbeat-" + CurrentISOTime() ); - // console.log("Beep") gun.get(TABLE).get("heartbeat").load(console.debug); }, 5000); gun.get(TABLE).on((data) => {var e = true}) @@ -708,6 +792,66 @@ } catch { console.log("ScreenLock Failed") } + function setLayeredImages(comanda, key) { + // Base paths for each layer type (adjust paths as needed) + const basePaths = { + Selección: "static/ico/layered1/", + Café: "static/ico/layered1/", + Endulzante: "static/ico/layered1/", + Cafeina: "static/ico/layered1/", + Leche: "static/ico/layered1/", + }; + + // Map for Selección to filenames + const selectionMap = { + "ColaCao con leche": "Selección-ColaCao.png", + "Infusión": "Selección-Infusion.png", + "Café con leche": "Selección-CaféLeche.png", + "Solo Leche": "Selección-Leche.png", + "Solo café (sin leche)": "Selección-CaféSolo.png", + }; + + // Start div with relative positioning for layering + let html = `
`;
+ }
+
+ // Layer 3: Endulzante
+ if (comanda.Endulzante) {
+ html += `
`;
+ }
+
+ // Layer 4: Cafeina
+ if (comanda.Cafeina) {
+ html += `
`;
+ }
+ // Layer 5: Leche
+ if (comanda.Leche) {
+ html += `
`;
+ }
+ // Layer 6: Temperatura
+ if (comanda.Temperatura) {
+ html += `
`;
+ }
+ // Layer 7: Tamaño
+ if (comanda.Tamaño) {
+ html += `
`;
+ }
+
+ // Close div
+ html += "${SC_parse(JSON.parse(data.Comanda)) +
+
+ ${setLayeredImages(JSON.parse(data.Comanda), data._key)}
+ ${SC_parse(JSON.parse(data.Comanda)) +
"
" +
data.Notas
}
@@ -2349,12 +2494,10 @@
function add_row(data, key) {
if (data != null) {
data["_key"] = key;
- console.log(old[key], data.Estado)
if (old[key] == undefined) {
old[key] = "";
}
if (old[key] != data.Estado) {
- console.log("SC:Updated:", data)
if (tts && document.getElementById(tts_check).checked) {
var msg = `Comanda de ${SC_Personas[data.Persona].Region}. - ${JSON.parse(data.Comanda)["Selección"]}. - ${SC_Personas[data.Persona].Nombre}. - ${data.Estado}`
console.log("TTS: " + msg)
@@ -2367,7 +2510,6 @@
rows2[key] = data;
old[key] = data.Estado;
} else {
- // console.log("delete", key);
delete rows2[key];
delete old[key];
}
diff --git a/sw.js b/sw.js
index be42bcf..1d67954 100644
--- a/sw.js
+++ b/sw.js
@@ -1,4 +1,4 @@
-var cacheName = 'telesec_2025-06-13_3';
+var cacheName = 'telesec_2025-06-13_5';
self.addEventListener('install', event => {
event.waitUntil(