diff --git a/frontend-internal/src/routes/audit/+page.svelte b/frontend-internal/src/routes/audit/+page.svelte index 6760c52..ac5fc65 100644 --- a/frontend-internal/src/routes/audit/+page.svelte +++ b/frontend-internal/src/routes/audit/+page.svelte @@ -523,8 +523,8 @@ -
-
+
+

Registros de Auditoría @@ -534,145 +534,248 @@

{#if isLoading} -
-
+
+
+
+

Cargando registros...

+
{:else if logs.length === 0} -
- - - -

No hay registros

-

- {periodFilter === 'today' ? 'No hay actividad registrada hoy.' : 'No se encontraron registros para el período seleccionado.'} -

+
+
+ + + +

No hay registros

+

+ {periodFilter === 'today' ? 'No hay actividad registrada hoy.' : 'No se encontraron registros para el período seleccionado.'} +

+
{:else} -
- - - - - - - - - - - - {#each logs as log (log.id)} - - - - - - - - {/each} - -
- Hora - - Usuario - - Acción - - Recurso - - Acciones -
- {formatDateShort(log.created_at)} - + +
+ + + + +
+ {#each logs as log (log.id)} +
viewDetail(log)} + > +
+
+ {#if log.user_email} -
-
{log.user_name || 'N/A'}
-
{getRoleText(log.user_role)}
+
+ + {(log.user_name || '?').charAt(0).toUpperCase()} +
{:else} - Sistema +
+ + + +
{/if} -
- - {formatActionText(log.action)} - - -
{log.resource_type}
- {#if log.ip_address} -
{log.ip_address}
- {/if} -
- -
+ + +
+
+ {formatDateShort(log.created_at)} + + {formatActionText(log.action)} + +
+
+ {log.user_name || 'Sistema'} + • {getRoleText(log.user_role)} +
+
+ {log.resource_type} + {#if log.ip_address} + • {log.ip_address} + {/if} +
+
+
+ + + +
+
+ {/each} +
- + {#if totalPages > 1} -
-
+
+ +
+ + Página {currentPage} de {totalPages} +
-