feat(herramientas): agregar soporte de fotografias y evidencias para herramientas, kits y asignaciones de custodia

This commit is contained in:
2026-11-01 03:11:33 -05:00
parent c07162c375
commit b361e4a9b4
11 changed files with 379 additions and 42 deletions
+31
View File
@@ -67,6 +67,13 @@
<div class="col-md-6 col-xl-4">
<div class="app-card h-100 p-3.5 border shadow-sm rounded-3 d-flex flex-column justify-content-between">
<div>
<% if (a.set_foto_url || a.herramienta_foto_url) { %>
<div class="mb-3 rounded overflow-hidden border shadow-sm" style="height: 130px; background-color: #f8fafc;">
<a href="<%= a.set_foto_url || a.herramienta_foto_url %>" target="_blank" title="Ver foto">
<img src="<%= a.set_foto_url || a.herramienta_foto_url %>" alt="Foto Equipamiento" style="width: 100%; height: 100%; object-fit: cover;">
</a>
</div>
<% } %>
<div class="d-flex align-items-center justify-content-between mb-2">
<span class="badge <%= a.tipo_asignacion === 'dotacion_fija' ? 'bg-info-subtle text-info border border-info-subtle' : 'bg-warning-subtle text-dark border border-warning-subtle' %>" style="font-size: 0.7rem;">
<i class="fas <%= a.tipo_asignacion === 'dotacion_fija' ? 'fa-id-badge' : 'fa-truck-pickup' %> me-1"></i>
@@ -99,6 +106,15 @@
<% } %>
</div>
<% if (a.foto_entrega_url) { %>
<div class="mb-2">
<a href="<%= a.foto_entrega_url %>" target="_blank" class="badge bg-primary-subtle text-primary border border-primary-subtle text-decoration-none d-inline-flex align-items-center gap-1.5 py-1 px-2" style="font-size: 0.72rem;">
<i class="fas fa-camera"></i>
<span>Ver foto de entrega en custodia</span>
</a>
</div>
<% } %>
<% if (a.observaciones_entrega) { %>
<div class="alert alert-light border p-2 small mb-0 text-muted" style="font-size: 0.75rem;">
<i class="fas fa-info-circle me-1 text-info"></i> <%= a.observaciones_entrega %>
@@ -136,6 +152,7 @@
<th>Fecha Entrega</th>
<th>Fecha Devolución</th>
<th>Observaciones</th>
<th>Evidencias</th>
<th class="pe-3">Estado</th>
</tr>
</thead>
@@ -153,6 +170,20 @@
<td><%= new Date(h.fecha_asignacion).toLocaleDateString('es-EC') %></td>
<td><%= h.fecha_devolucion ? new Date(h.fecha_devolucion).toLocaleDateString('es-EC') : '-' %></td>
<td class="text-muted"><%= h.observaciones_devolucion || h.observaciones_entrega || '-' %></td>
<td>
<div class="d-flex flex-column gap-1">
<% if (h.foto_entrega_url) { %>
<a href="<%= h.foto_entrega_url %>" target="_blank" class="badge bg-primary-subtle text-primary border border-primary-subtle text-decoration-none" style="font-size: 0.68rem;">
<i class="fas fa-camera"></i> Entrega
</a>
<% } %>
<% if (h.foto_devolucion_url) { %>
<a href="<%= h.foto_devolucion_url %>" target="_blank" class="badge bg-success-subtle text-success border border-success-subtle text-decoration-none" style="font-size: 0.68rem;">
<i class="fas fa-camera"></i> Devolución
</a>
<% } %>
</div>
</td>
<td class="pe-3">
<span class="badge <%= h.estado === 'devuelto' ? 'bg-secondary' : 'bg-warning text-dark' %>">
<%= h.estado %>