fix(turnero): no mostrar consentimientos de toma de muestras en recepcion

Agrega origen_lugar_id a turnero_consentimientos para distinguir consents
creados por examen (null) vs por estación (= lugar_id destino).
Recepcion filtra los de origen_lugar_id != null; lugar.php muestra
solo los suyos + los de examen.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lizandro Guarnizo
2026-07-07 23:05:51 -05:00
co-authored by Claude Sonnet 4.6
parent 333e856f38
commit 229977785b
5 changed files with 17 additions and 4 deletions
+2
View File
@@ -1096,6 +1096,8 @@ const CONSENT_LBL = {
};
function renderConsentimientos(lista) {
// Mostrar consentimientos de examen (origen null) + los de esta estación
lista = lista.filter(c => !c.origen_lugar_id || c.origen_lugar_id == lugarId);
tieneConsent = lista.length > 0;
hayPendientes = lista.some(c => !['firmado','rechazado'].includes(c.estado));
const pendCount = lista.filter(c => !['firmado','rechazado'].includes(c.estado)).length;