This commit is contained in:
Lizandro Guarnizo
2026-04-21 16:09:17 -05:00
parent 4bf9d99f8b
commit 10b995f9b8
3 changed files with 9 additions and 4 deletions
+1 -1
View File
@@ -1 +1 @@
<?php return ['slug'=>'lab_reportes','name'=>'Reportes','icon'=>'fas fa-chart-bar','category'=>'reportes','route'=>'/lab_reportes.php','is_active'=>true,'sort_order'=>50,'oleada'=>0,'description'=>'Reportes de ingresos, rendimiento y pagos','links'=>[['name'=>'Reportes','icon'=>'fas fa-chart-bar','route'=>'/lab_reportes.php'],['name'=>'Actividad','icon'=>'fas fa-history','route'=>'/lab_actividad.php']]]; <?php return ['slug'=>'lab_reportes','name'=>'Reportes','icon'=>'fas fa-chart-bar','category'=>'lab','route'=>'/lab_reportes.php','is_active'=>true,'sort_order'=>50,'oleada'=>0,'description'=>'Reportes de ingresos, rendimiento y pagos','links'=>[['name'=>'Reportes','icon'=>'fas fa-chart-bar','route'=>'/lab_reportes.php'],['name'=>'Actividad','icon'=>'fas fa-history','route'=>'/lab_actividad.php']]];
+1 -1
View File
@@ -48,7 +48,7 @@ try {
try { try {
$formulariosCons = $pdo->query( $formulariosCons = $pdo->query(
"SELECT id, nombre FROM lab_formularios WHERE tipo='consentimiento' AND is_active=1 ORDER BY nombre ASC" "SELECT id, nombre FROM lab_formularios WHERE is_active=1 ORDER BY nombre ASC"
)->fetchAll(PDO::FETCH_ASSOC); )->fetchAll(PDO::FETCH_ASSOC);
} catch (\Throwable $e) { $_loadErrors[] = 'lab_formularios: ' . $e->getMessage(); } } catch (\Throwable $e) { $_loadErrors[] = 'lab_formularios: ' . $e->getMessage(); }
+7 -2
View File
@@ -404,7 +404,7 @@ function renderCola(snap) {
<div class="cod">${escHtml(t.codigo)}</div> <div class="cod">${escHtml(t.codigo)}</div>
<div class="pac">${escHtml(t.paciente_nombre || 'Sin nombre')}</div> <div class="pac">${escHtml(t.paciente_nombre || 'Sin nombre')}</div>
</div> </div>
<button onclick="llamarTurnoEspecifico(${t.id})" <button onclick="llamarTurnoEspecifico(${t.id}, '${t.estado}')"
title="Llamar este turno ahora" title="Llamar este turno ahora"
style="flex-shrink:0;background:#2563eb;border:none;color:#fff; style="flex-shrink:0;background:#2563eb;border:none;color:#fff;
border-radius:7px;padding:5px 9px;font-size:.78rem;cursor:pointer"> border-radius:7px;padding:5px 9px;font-size:.78rem;cursor:pointer">
@@ -453,7 +453,12 @@ async function seleccionarTurno(turnoId) {
} }
// ── Llamar turno específico (cambia estado → en_recepcion) ───────── // ── Llamar turno específico (cambia estado → en_recepcion) ─────────
async function llamarTurnoEspecifico(turnoId) { async function llamarTurnoEspecifico(turnoId, estadoActual) {
// Si ya está en recepción, solo abrir ficha sin intentar re-transicionar
if (estadoActual === 'en_recepcion') {
seleccionarTurno(turnoId);
return;
}
try { try {
const res = await fetch(API + 'cambiar_estado.php', { const res = await fetch(API + 'cambiar_estado.php', {
method: 'POST', method: 'POST',