diff --git a/modules/turnero/views/bandeja.php b/modules/turnero/views/bandeja.php index 5b35bc2..277cd39 100644 --- a/modules/turnero/views/bandeja.php +++ b/modules/turnero/views/bandeja.php @@ -423,10 +423,23 @@ const VISTO_API= 'modules/turnero/api/marcar_visto.php'; let _bndTurnoId = null; let _bndAllData = { pendientes: [], vistos: [] }; +const _hoy = new Date().toISOString().slice(0,10); +const _ayer = new Date(Date.now()-86400000).toISOString().slice(0,10); + +document.getElementById('bnd-desde').value = _hoy; +document.getElementById('bnd-hasta').value = _hoy; + function _hora(dt) { if (!dt) return ''; return new Date(dt.replace(' ','T')).toLocaleTimeString('es-CO',{hour:'2-digit',minute:'2-digit'}); } +function _fechaLabel(dt) { + if (!dt) return ''; + const d = dt.slice(0,10); + if (d === _hoy) return 'Hoy'; + if (d === _ayer) return 'Ayer'; + return new Date(dt.replace(' ','T')).toLocaleDateString('es-CO',{day:'2-digit',month:'2-digit'}); +} function _toast(msg, ms = 2200) { const t = document.getElementById('bnd-toast'); t.textContent = msg; @@ -516,7 +529,7 @@ function _renderLista(pendientes, vistos) {