From b5e56f22385f67fb1343312a63015db7d79905a8 Mon Sep 17 00:00:00 2001 From: Lizandro Guarnizo <77708265+lizandrogd@users.noreply.github.com> Date: Fri, 26 Jun 2026 19:19:06 -0500 Subject: [PATCH] Fix error display in test-rda, remove PO from default article filter Co-Authored-By: Claude Sonnet 4.6 --- app/routes/test_rda.py | 2 +- app/templates/test_rda.html | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/app/routes/test_rda.py b/app/routes/test_rda.py index d853584..28c90d3 100644 --- a/app/routes/test_rda.py +++ b/app/routes/test_rda.py @@ -82,7 +82,7 @@ async def get_candidatos(request: Request, user: dict = Depends(get_current_user return JSONResponse({"error": f"Error Firebird: {fb_msg}"}) # Artículos configurados con especialidad en TNS - arts_default = "CH4,CREA,TGP,VSG,PCR,AU,FER,TPO,TSH,TGO,GLI,BUN,COL,TRI,HDL,LDL,HBA1,VB12,VITD,PO,FER,K,NA,MG,URO,PRL,TSH,T4L,T3,T4,T3L,HIV,VDRL,PSA,AFP,CEA,CA125,CA199,FV,TP,TPT" + arts_default = "CH4,CREA,TGP,VSG,PCR,AU,FER,TPO,TSH,TGO,GLI,BUN,COL,TRI,HDL,LDL,HBA1,VB12,VITD,FER,K,NA,MG,URO,PRL,T4L,T3,T4,T3L,HIV,VDRL,PSA,AFP,CEA,CA125,CA199,FV,TP,TPT" arts_str = articulos.strip() if articulos.strip() else arts_default arts_list = [a.strip().upper() for a in arts_str.split(",") if a.strip()] arts_in = ", ".join(f"'{a}'" for a in arts_list) diff --git a/app/templates/test_rda.html b/app/templates/test_rda.html index 0f5a1f4..ad71424 100644 --- a/app/templates/test_rda.html +++ b/app/templates/test_rda.html @@ -192,20 +192,23 @@ async function enviarRDA() { html += `
- ${icon} -
+ ${icon} +

IDRECEPCION ${p.idrecepcion} · Factura ${p.factura} · Contrato ${p.contrato}

Exámenes: ${(p.examenes || []).join(', ')}

-

${p.mensaje}

+
+ ${p.ok ? '✅' : '❌'} ${p.mensaje || '(sin mensaje)'} +
+ ${!p.ok ? `

HTTP ${p.status || '?'}

` : ''}
+ class="px-2 py-1 text-xs bg-gray-100 hover:bg-gray-200 text-gray-600 rounded shrink-0">Ver JSON
-
`; } });