From 5324d5f433b17f9ecc77c454982bbe82c41a9730 Mon Sep 17 00:00:00 2001 From: pablinux Date: Sat, 17 Oct 2026 03:45:37 -0500 Subject: [PATCH] feat(ui): enriquecer mini-timeline con bitacora de timeline_eventos y renderizado de firma digital --- views/agent/view-ticket.ejs | 42 ++++++++++++++++++++++++++++++++----- 1 file changed, 37 insertions(+), 5 deletions(-) diff --git a/views/agent/view-ticket.ejs b/views/agent/view-ticket.ejs index 3f0a51c..33b8308 100644 --- a/views/agent/view-ticket.ejs +++ b/views/agent/view-ticket.ejs @@ -146,9 +146,11 @@
Fotos de campo:
@@ -156,10 +158,19 @@ <% } %> - <% if (visita.historial && visita.historial.firma_cliente && visita.historial.firma_cliente.firmado) { %> -
+ <% if (visita.historial && visita.historial.firma_cliente && visita.historial.firma_cliente.firmado) { + const firmaUrl = visita.historial.firma_cliente.firmaUrl ? (visita.historial.firma_cliente.firmaUrl.startsWith('http') ? visita.historial.firma_cliente.firmaUrl : ('https://tareas.telcotronics.com' + visita.historial.firma_cliente.firmaUrl)) : null; + %> +
Firmado: <%= visita.historial.firma_cliente.nombreFirmante %>
+ <% if (firmaUrl) { %> +
+ + Firma cliente + +
+ <% } %> <% } else { %> Pendiente firma cliente <% } %> @@ -188,6 +199,27 @@
+ + <% if (visita.historial && visita.historial.timeline_eventos && visita.historial.timeline_eventos.length > 0) { %> +
+ +
+
    + <% visita.historial.timeline_eventos.forEach(ev => { %> +
  • +
    <%= ev.titulo %>
    + <% if (ev.descripcion) { %>
    <%= ev.descripcion %>
    <% } %> +
    <%= new Date(ev.fecha).toLocaleString('es-EC') %> - <%= ev.usuarioNombre || 'Sistema' %>
    +
  • + <% }) %> +
+
+
+ <% } %> +
Abrir en tareas.telcotronics.com