From f29097e5cd42c68049bb8004b3e6c573cb044516 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorem=20Ju=C3=A1rez?= Date: Tue, 6 Oct 2026 19:06:29 -0600 Subject: [PATCH] =?UTF-8?q?feat(riesgo):=20la=20ficha=20muestra=20c=C3=B3m?= =?UTF-8?q?o=20se=20calcul=C3=B3=20cada=20indicador?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit La nota del cálculo (crédito más reciente para T2, edad a la fecha de corte para C1) aparece bajo el indicador en el detalle de la evaluación. --- app/templates/riesgo/cliente.html | 1 + tests/test_laboratorio.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/app/templates/riesgo/cliente.html b/app/templates/riesgo/cliente.html index 631dcc6..d6f0ebe 100644 --- a/app/templates/riesgo/cliente.html +++ b/app/templates/riesgo/cliente.html @@ -60,6 +60,7 @@ ] %} {% call(fila, col) tabla(columnas, detalle.indicadores) %} {%- if col.clave == "clave" -%}{{ fila.clave }} {{ fila.nombre }} + {%- if fila.nota %}
{{ fila.nota }}{% endif -%} {%- elif col.clave == "valor" -%}{{ valor(fila.valor) }} {%- elif col.clave == "nivel" -%}{{ badge_nivel(fila.nivel) if fila.nivel else "—" }} {%- elif col.clave == "ponderacion" -%}{{ "%.2f" | format(fila.ponderacion) }} diff --git a/tests/test_laboratorio.py b/tests/test_laboratorio.py index 4d26093..35e5de0 100644 --- a/tests/test_laboratorio.py +++ b/tests/test_laboratorio.py @@ -109,6 +109,8 @@ def test_riesgo_de_un_cliente_muestra_detalle_e_historial( for texto in ("Evaluación vigente", "Detalle por indicador", "Historial", "Preponderancia"): assert texto in html assert "pendiente de validación de CHM" in html + assert "crédito más reciente" in html # cómo se calculó T2, en el detalle del indicador + assert "a la fecha de corte" in html # C1 assert "Reevaluar" not in html # el auditor no reevalúa