turnero: aplicar _mpEffectiveLabel en countdown y alerta de siguiente toma

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 <noreply@anthropic.com>
This commit is contained in:
Lizandro Guarnizo
2026-07-21 09:34:47 -05:00
co-authored by Claude Sonnet 4.6
parent e0041c8d24
commit 6ce2fc340b
+2 -2
View File
@@ -1982,7 +1982,7 @@ window._fpwPreFirma = <?= json_encode($firmaProfPreguardada) ?>;
var pendingId = <?= json_encode($_mpPrimeraPendiente) ?>;
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);
});
})();
<?php endif; ?>
@@ -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"])');