<%- include('../partials/header') %> <% title = 'Bandeja de Tickets - Panel ' + (user.rol === 'admin' ? 'Administrativo' : 'Operativo'); %> <% const totalCount = tickets.length; const abiertosCount = stats.find(s => s.status === 'abierto') ? stats.find(s => s.status === 'abierto').total : 0; const progresoCount = stats.find(s => s.status === 'en_progreso') ? stats.find(s => s.status === 'en_progreso').total : 0; const cerradosCount = stats.find(s => s.status === 'cerrado') ? stats.find(s => s.status === 'cerrado').total : 0; %> <% if (success_msg && success_msg.length > 0) { %> <% success_msg.forEach(msg => { %> <% }) %> <% } %> <% if (error_msg && error_msg.length > 0) { %> <% error_msg.forEach(msg => { %> <% }) %> <% } %>
Tickets Asignados
<%= totalCount %>
En tu ámbito operativo
Pendientes / Nuevos
<%= abiertosCount %>
Requieren primera respuesta
En Progreso / Terreno
<%= progresoCount %>
Visitas o diagnóstico FSM
Casos Cerrados
<%= cerradosCount %>
Resueltos satisfactoriamente
<% if (tickets.length === 0) { %> <% } %> <% tickets.forEach(t => { %> <% }) %>
ID Cliente / Solicitante Asunto Departamento Prioridad Estado Técnico Asignado Fecha Gestión
Sin tickets
No hay tickets asignados

La bandeja se encuentra al día y libre de incidencias pendientes.

#<%= t.id %>
<%= (t.usuario_nombre || 'C').charAt(0).toUpperCase() %>
<%= t.usuario_nombre %>
<%= t.usuario_email || '' %>
<%= t.asunto %>
<%= t.departamento_nombre || 'General' %> <% if (t.prioridad === 'critica') { %> Crítica <% } else if (t.prioridad === 'alta') { %> Alta <% } else if (t.prioridad === 'media') { %> Media <% } else { %> Baja <% } %> <% if (t.status === 'abierto') { %> Abierto <% } else if (t.status === 'en_progreso') { %> En Progreso <% } else { %> Cerrado <% } %> <% if (t.asignado_nombre) { %> <%= t.asignado_nombre %> <% } else { %> Sin asignar <% } %> <%= new Date(t.created_at).toLocaleDateString('es-ES', { day: '2-digit', month: 'short' }) %> Gestionar
<%- include('../partials/footer') %>