From 6ce2fc340b79cfc653d104d91bed3bf98a309913 Mon Sep 17 00:00:00 2001 From: Lizandro Guarnizo <77708265+lizandrogd@users.noreply.github.com> Date: Tue, 21 Jul 2026 09:34:47 -0500 Subject: [PATCH] turnero: aplicar _mpEffectiveLabel en countdown y alerta de siguiente toma MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit La alerta y el countdown mostraban "Toma · Otro" sin el minuto. Ahora usan _mpEffectiveLabel para mostrar ej: "Toma · Otro - 2". Co-Authored-By: Claude Sonnet 4.6 --- ver_formulario_enviado.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ver_formulario_enviado.php b/ver_formulario_enviado.php index 92b4337..bb5204a 100644 --- a/ver_formulario_enviado.php +++ b/ver_formulario_enviado.php @@ -1982,7 +1982,7 @@ window._fpwPreFirma = ; var pendingId = ; var entry = window._muestrasMap && window._muestrasMap[pendingId]; document.addEventListener('DOMContentLoaded', function() { - _mpIniciarCountdown(targetMs, entry ? (entry.label || null) : null, pendingId); + _mpIniciarCountdown(targetMs, entry ? _mpEffectiveLabel(entry.label || '') : null, pendingId); }); })(); @@ -2112,7 +2112,7 @@ function _guardarFirmaMP(widget, svg, msgEl, entry, campoId) { } else if (data.siguiente_toma_at) { // Fix 2: pasar timestamp exacto; evita el redondeo de Math.round var targetMs = new Date(data.siguiente_toma_at.replace(' ', 'T')).getTime(); - _mpIniciarCountdown(targetMs, entry.next_label, entry.next_firma_id); + _mpIniciarCountdown(targetMs, _mpEffectiveLabel(entry.next_label || ''), entry.next_firma_id); } else if (!entry.is_last) { var nw = entry.next_firma_id ? document.getElementById('fpw-' + entry.next_firma_id) : null; if (!nw) nw = document.querySelector('.firma-pro-widget:not([style*="display:none"])');