From 498a144c186181b6f2d262415b3e898e6b0499ec Mon Sep 17 00:00:00 2001 From: Lizandro Guarnizo <77708265+lizandrogd@users.noreply.github.com> Date: Thu, 30 Jul 2026 19:49:25 -0500 Subject: [PATCH] feat(historial): mostrar nombre kiosko y datos BD (nombre+doc) en paciente MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - API: agrega tipo_documento y numero_documento al SELECT - Vista: línea 1 = nombre BD + CC/doc, línea 2 gris = Kiosko: nombre Co-Authored-By: Claude Sonnet 4.6 --- modules/turnero/api/get_historial.php | 2 ++ modules/turnero/views/historial.php | 7 +++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/turnero/api/get_historial.php b/modules/turnero/api/get_historial.php index 3e7d06e..6290d75 100644 --- a/modules/turnero/api/get_historial.php +++ b/modules/turnero/api/get_historial.php @@ -107,6 +107,8 @@ $sqlTurnos = " p.color AS prioridad_color, l.nombre AS lugar_nombre, s2.nombre_completo AS paciente_bd, + s2.tipo_documento AS paciente_tipo_doc, + s2.numero_documento AS paciente_doc, rd.nombre AS recepcion_desk_nombre, ur.full_name AS atendido_recepcion_nombre, ul.full_name AS atendido_lugar_nombre, diff --git a/modules/turnero/views/historial.php b/modules/turnero/views/historial.php index 6a6f5b6..42e3086 100644 --- a/modules/turnero/views/historial.php +++ b/modules/turnero/views/historial.php @@ -418,6 +418,7 @@ function renderTabla(turnos) { const nombreBd = esc(t.paciente_bd || ''); const nombreKiosko = esc(t.paciente_nombre || ''); const nombre = nombreBd || nombreKiosko || '—'; + const docBd = t.paciente_doc ? esc((t.paciente_tipo_doc || 'CC') + ' ' + t.paciente_doc) : ''; const lugar = esc(t.lugar_nombre || '—'); const fecha = t.fecha_sesion || '—'; const horaEnt = t.creado_at @@ -452,10 +453,8 @@ function renderTabla(turnos) { - ${nombre} - ${nombreBd && nombreKiosko && nombreBd !== nombreKiosko - ? `
Kiosko: ${nombreKiosko}
` - : ''} +
${nombre}${docBd ? `${docBd}` : ''}
+ ${nombreKiosko ? `
Kiosko: ${nombreKiosko}
` : ''}
${desk}