fix: ensure turnoActivo.estado is en_recepcion after guardarSolicitud
Guarantees that the turno state is correct in memory before pasarALugar() attempts the transition to en_espera_lugar, preventing 'espera' → 'en_espera_lugar' errors. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Haiku 4.5
parent
9872f50104
commit
8a5b4eef1e
@@ -825,6 +825,9 @@ async function guardarSolicitud() {
|
||||
solicitudActiva = json.solicitud ?? json.data?.solicitud;
|
||||
consentimientos = json.consentimientos_requeridos ?? json.data?.consentimientos_requeridos ?? [];
|
||||
|
||||
// Asegurar que turnoActivo tiene el estado correcto (en_recepcion)
|
||||
if (turnoActivo) turnoActivo.estado = 'en_recepcion';
|
||||
|
||||
btn.innerHTML = '<i class="fas fa-check me-1"></i>Guardado';
|
||||
|
||||
// Detener polling de consentimientos (ya se guardó)
|
||||
|
||||
Reference in New Issue
Block a user