diff --git a/ver_formulario_enviado.php b/ver_formulario_enviado.php
index 369798e..92b4337 100644
--- a/ver_formulario_enviado.php
+++ b/ver_formulario_enviado.php
@@ -1815,6 +1815,10 @@ function _mpBuildSepFirmaMap() {
return m;
}
+function _mpEffectiveLabel(label) {
+ return (/otro/i.test(label) && _mpOtroHora) ? label + ' - ' + _mpOtroHora : label;
+}
+
function _mpCardHdrHtml(fid, num, label, state) {
var badge = state === 'signed'
? 'Firmado'
@@ -1886,7 +1890,7 @@ function _mpRenderCards() {
var hdr = document.createElement('div');
hdr.className = 'toma-card-hdr';
- hdr.innerHTML = _mpCardHdrHtml(fid, idx + 1, entry.label || '', state);
+ hdr.innerHTML = _mpCardHdrHtml(fid, idx + 1, _mpEffectiveLabel(entry.label || ''), state);
if (isSigned) {
// Fill hora in header
var horaEl = null;
@@ -1916,7 +1920,7 @@ function _mpUpdateProgress(signedCount, firmaIds) {
|| (function(){ var c=document.getElementById('tc-'+fid); return c&&c.classList.contains('toma-card--signed'); }());
var isActive = fid === window._mpPrimeraPendiente && !isSigned;
var cls = isSigned ? 'done' : isActive ? 'act' : 'wait';
- var lbl = ((window._muestrasMap || {})[fid] || {}).label || '';
+ var lbl = _mpEffectiveLabel(((window._muestrasMap || {})[fid] || {}).label || '');
return '';
}).join('');
wrap.innerHTML = '
Toma ' + signedCount + ' de ' + total + '' + steps + '
'
@@ -1932,7 +1936,7 @@ function _mpRefreshCards(signedFid, nextFid) {
var shdr = sc.querySelector('.toma-card-hdr');
if (shdr) {
var se = window._muestrasMap[signedFid] || {}, snum = (sc.querySelector('.toma-card-num') || {}).textContent || '1';
- shdr.innerHTML = _mpCardHdrHtml(signedFid, parseInt(snum), se.label || '', 'signed');
+ shdr.innerHTML = _mpCardHdrHtml(signedFid, parseInt(snum), _mpEffectiveLabel(se.label || ''), 'signed');
if (se.hora_campo) { var horaEl = sc.querySelector('[name="' + se.hora_campo + '"]'); if (horaEl && horaEl.value) { var hs = shdr.querySelector('.toma-card-hora'); if (hs) hs.textContent = horaEl.value; } }
shdr.addEventListener('click', function() { sc.classList.toggle('tc-expanded'); });
}
@@ -1943,7 +1947,7 @@ function _mpRefreshCards(signedFid, nextFid) {
if (nc) {
nc.classList.remove('toma-card--locked'); nc.classList.add('toma-card--active');
var nhdr = nc.querySelector('.toma-card-hdr');
- if (nhdr) { var ne = window._muestrasMap[nextFid] || {}, nnum = (nc.querySelector('.toma-card-num') || {}).textContent || '1'; nhdr.innerHTML = _mpCardHdrHtml(nextFid, parseInt(nnum), ne.label || '', 'active'); }
+ if (nhdr) { var ne = window._muestrasMap[nextFid] || {}, nnum = (nc.querySelector('.toma-card-num') || {}).textContent || '1'; nhdr.innerHTML = _mpCardHdrHtml(nextFid, parseInt(nnum), _mpEffectiveLabel(ne.label || ''), 'active'); }
setTimeout(function() { nc.scrollIntoView({ behavior:'smooth', block:'center' }); }, 150);
}
}