turnero: mostrar Topaz desconectado en rojo cuando SigWeb no responde

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lizandro Guarnizo
2026-07-21 11:34:45 -05:00
co-authored by Claude Sonnet 4.6
parent e2f663c6ed
commit c0a2389a77
+10 -3
View File
@@ -508,8 +508,8 @@ document.addEventListener('DOMContentLoaded', function() {
</span>
</div>
<div class="d-flex align-items-center gap-2">
<span id="sigweb-badge" style="display:none;font-size:.75rem;color:#16a34a;font-weight:600;white-space:nowrap">
<span style="display:inline-block;width:7px;height:7px;border-radius:50%;background:#22c55e;margin-right:4px;vertical-align:middle;box-shadow:0 0 4px #22c55e"></span>Topaz en línea
<span id="sigweb-badge" style="font-size:.75rem;color:#dc2626;font-weight:600;white-space:nowrap">
<span id="sigweb-dot" style="display:inline-block;width:7px;height:7px;border-radius:50%;background:#dc2626;margin-right:4px;vertical-align:middle"></span><span id="sigweb-lbl">Topaz desconectado</span>
</span>
<span class="text-muted small"><?= htmlspecialchars($adminNombre) ?></span>
<button class="btn btn-primary btn-sm" id="btn-llamar" onclick="llamarSiguiente()">
@@ -3035,7 +3035,14 @@ function mostrarToast(msg, type = 'info', duration = 2500) {
(function() {
var s = document.createElement('script');
s.src = 'http://localhost:47289/SigWeb/SigWebTablet.js';
s.onload = function() { var b = document.getElementById('sigweb-badge'); if (b) b.style.display = ''; };
s.onload = function() {
var b = document.getElementById('sigweb-badge');
var d = document.getElementById('sigweb-dot');
var l = document.getElementById('sigweb-lbl');
if (b) b.style.color = '#16a34a';
if (d) { d.style.background = '#22c55e'; d.style.boxShadow = '0 0 4px #22c55e'; }
if (l) l.textContent = 'Topaz en línea';
};
document.head.appendChild(s);
})();
</script>