turnero: logging de consola para debug de conexión SigWeb en recepción

Muestra URL, hora de intento, tiempo de respuesta y estado de SigWebTablet.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lizandro Guarnizo
2026-07-21 11:39:36 -05:00
co-authored by Claude Sonnet 4.6
parent c0a2389a77
commit 3c3f3f1ee9
+16 -1
View File
@@ -3033,9 +3033,17 @@ function mostrarToast(msg, type = 'info', duration = 2500) {
<script src="<?= defined('APP_URL') ? rtrim(APP_URL,'/') : '' ?>/assets/js/lab-sidebar.js"></script>
<script>
(function() {
var URL = 'http://localhost:47289/SigWeb/SigWebTablet.js';
var t0 = Date.now();
console.group('[SigWeb] Detección de pad biométrico');
console.log('→ Apuntando a:', URL);
console.log('→ Intento iniciado:', new Date().toLocaleTimeString());
var s = document.createElement('script');
s.src = 'http://localhost:47289/SigWeb/SigWebTablet.js';
s.src = URL;
s.onload = function() {
var ms = Date.now() - t0;
console.log('✅ Conectado en ' + ms + 'ms — SigWebTablet disponible:', typeof SigWebTablet !== 'undefined');
console.groupEnd();
var b = document.getElementById('sigweb-badge');
var d = document.getElementById('sigweb-dot');
var l = document.getElementById('sigweb-lbl');
@@ -3043,6 +3051,13 @@ function mostrarToast(msg, type = 'info', duration = 2500) {
if (d) { d.style.background = '#22c55e'; d.style.boxShadow = '0 0 4px #22c55e'; }
if (l) l.textContent = 'Topaz en línea';
};
s.onerror = function() {
var ms = Date.now() - t0;
console.warn('❌ Sin respuesta después de ' + ms + 'ms');
console.warn(' Verifica que el servicio Topaz SigWeb esté corriendo en este equipo.');
console.warn(' Prueba abriendo en el navegador:', 'http://localhost:47289/SigWeb/');
console.groupEnd();
};
document.head.appendChild(s);
})();
</script>