feat(carga): las descargas del historial y del lote llevan el ícono de descarga y la columna del historial se titula «Descargar»

This commit is contained in:
Jorem Juárez committed 2026-11-14 22:01:59 -06:00
1 parent dbbe86e389
commit 8d9d5c7719
3 files changed
+8 -7

No files matched your search

+2 -1
View File
@@ -6,7 +6,7 @@
{{ icono("chevron", "icono--14 icono--tenue") }} clases extra (tamaño, opacidad)
Disponibles: home, cartera, expediente, beneficiario, screening, riesgo, creditos, alertas,
evidencia, laboratorio, excel, csv, check, chevron, chevron-left, lock, logout, plus, search, menu.
evidencia, laboratorio, descarga, excel, csv, check, chevron, chevron-left, lock, logout, plus, search, menu.
Son decorativos (aria-hidden): el texto del enlace o un aria-label nombran la acción.
{{ icono_ruta("/riesgo") }} ícono del paso de la navegación con esa ruta
@@ -42,6 +42,7 @@
<symbol id="i-alertas" viewBox="0 0 24 24"><path d="M6 16v-5a6 6 0 0 1 12 0v5l1.5 2h-15z"/><path d="M10 21a2 2 0 0 0 4 0"/></symbol>
<symbol id="i-evidencia" viewBox="0 0 24 24"><rect x="3" y="4" width="18" height="4" rx="1"/><path d="M5 8v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8"/><path d="M10 13h4"/></symbol>
<symbol id="i-laboratorio" viewBox="0 0 24 24"><path d="M9.5 3h5"/><path d="M10 3v6l-5.5 9.5A1.5 1.5 0 0 0 5.8 21h12.4a1.5 1.5 0 0 0 1.3-2.5L14 9V3"/><path d="M7.5 15h9"/></symbol>
<symbol id="i-descarga" viewBox="0 0 24 24"><path d="M12 4v11"/><path d="M7.5 10.5L12 15l4.5-4.5"/><path d="M4 15v4a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-4"/></symbol>
<symbol id="i-excel" viewBox="0 0 24 24"><path d="M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z"/><path d="M14 3v5h5"/><rect x="8" y="11" width="8" height="7" rx="0.5"/><path d="M8 14.5h8"/><path d="M12 11v7"/></symbol>
<symbol id="i-csv" viewBox="0 0 24 24"><path d="M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z"/><path d="M14 3v5h5"/><path d="M8.5 12.5h2.5"/><path d="M13 12.5h2.5"/><path d="M8.5 16h2.5"/><path d="M13 16h2.5"/></symbol>
<symbol id="i-check" viewBox="0 0 24 24"><path d="M5 12.5l4.5 4.5L19 7.5"/></symbol>
+4 -4
View File
@@ -60,20 +60,20 @@
{% call tarjeta("Historial de cargas", subtitulo=historial | length ~ " lotes, el más reciente primero", plano=True) %}
<div class="tabla-contenedor">
<table class="tabla tabla--densa ancho-min-960">
<thead><tr><th scope="col">Lote</th><th scope="col">Fecha</th><th scope="col">Usuario</th><th scope="col">Archivo</th><th scope="col">Estado</th><th scope="col" class="es-der">Aceptadas</th><th scope="col" class="es-der">Rechazadas</th><th scope="col"><span class="visualmente-oculto">Archivo original y rechazos</span></th></tr></thead>
<thead><tr><th scope="col">Lote</th><th scope="col">Fecha</th><th scope="col">Usuario</th><th scope="col">Archivo</th><th scope="col">Estado</th><th scope="col" class="es-der">Aceptadas</th><th scope="col" class="es-der">Rechazadas</th><th scope="col" class="es-der">Descargar</th></tr></thead>
<tbody>
{%- for lote in historial %}{% set d = lote.filas or {} %}
<tr class="fila-enlace">
<td class="sin-salto"><a class="id-enlace" href="/carga/lotes/{{ lote.id }}">#{{ lote.id }}</a></td>
<td class="celda-fecha">{{ lote.created_at | mx("%d/%m/%Y %H:%M") }}</td>
<td class="t-135">{{ lote.usuario }}</td>
<td class="t-125 mono">{{ lote.nombre_archivo or d.get("archivo", "—") }}</td>
<td class="t-125 mono sin-salto">{{ lote.nombre_archivo or d.get("archivo", "—") }}</td>
<td>{{ estado_lote(lote, estados.get(lote.id)) }}</td>
<td class="es-der celda-num">{{ d.get("aceptadas", d.get("transacciones_cargadas", "—")) }}</td>
<td class="es-der celda-num">{{ d.get("rechazadas", (lote.errores or []) | length) }}</td>
<td class="es-der"><span class="fila gap-8" style="justify-content: flex-end; flex-wrap: nowrap">
{%- if d.get("rechazadas") %}<a class="boton boton--discreto boton--chico" href="/carga/lotes/{{ lote.id }}/rechazos">Rechazos</a>{% endif %}
{%- if puede_descargar_original and lote.ruta_archivo %}<a class="boton boton--discreto boton--chico" href="/carga/lotes/{{ lote.id }}/original" title="Se entrega solo si su huella SHA-256 coincide con la registrada" data-original-lote="{{ lote.id }}">Original</a>{% endif -%}
{%- if d.get("rechazadas") %}<a class="boton boton--discreto boton--chico" href="/carga/lotes/{{ lote.id }}/rechazos" aria-label="Descargar el reporte de rechazos del lote {{ lote.id }}">{{ icono("descarga", "icono--14") }}<span>Rechazos</span></a>{% endif %}
{%- if puede_descargar_original and lote.ruta_archivo %}<a class="boton boton--discreto boton--chico" href="/carga/lotes/{{ lote.id }}/original" title="Descarga el archivo tal cual se subió; se entrega solo si su huella SHA-256 coincide con la registrada" aria-label="Descargar el archivo original del lote {{ lote.id }}" data-original-lote="{{ lote.id }}">{{ icono("descarga", "icono--14") }}<span>Original</span></a>{% endif -%}
</span></td>
</tr>
{%- else %}
+2 -2
View File
@@ -26,8 +26,8 @@
</div>
{% if puede_descargar_original or rechazos %}
<div class="pagina__acciones" style="align-items: center">
{% if puede_descargar_original %}<span class="t-13 texto-suave" data-huella-estado role="status" aria-live="polite"></span><a class="boton boton--discreto" href="/carga/lotes/{{ lote.id }}/original" data-descargar-original>{{ icono("csv" if lote.formato == "csv" else "excel", "icono--14") }}<span>Descargar archivo original</span></a>{% endif %}
{% if rechazos %}<a class="boton boton--discreto" href="/carga/lotes/{{ lote.id }}/rechazos">Descargar el reporte de rechazos</a>{% endif %}
{% if puede_descargar_original %}<span class="t-13 texto-suave" data-huella-estado role="status" aria-live="polite"></span><a class="boton boton--discreto" href="/carga/lotes/{{ lote.id }}/original" data-descargar-original>{{ icono("descarga", "icono--14") }}<span>Descargar archivo original</span></a>{% endif %}
{% if rechazos %}<a class="boton boton--discreto" href="/carga/lotes/{{ lote.id }}/rechazos">{{ icono("descarga", "icono--14") }}<span>Descargar el reporte de rechazos</span></a>{% endif %}
</div>
{% endif %}
</header>