correjida parte de logs por ahora

This commit is contained in:
fede committed 2026-11-10 17:24:11 -03:00
1 parent 770aa7d6ed
commit fe1411437b
6 files changed
+86 -24

No files matched your search

+11 -11
View File
@@ -3,10 +3,10 @@
import type { LogDetalle, LogEntry } from '../../types';
const headers = [
{ key: 'id', value: '#' },
{ key: 'created_at', value: 'Fecha' },
{ key: 'usuario', value: 'Usuario' },
{ key: 'accion', value: 'Acción' }
{ key: 'id', value: '#', empty: false },
{ key: 'created_at', value: 'Fecha', empty: false },
{ key: 'usuario', value: 'Usuario', empty: false },
{ key: 'accion', value: 'Acción', empty: false }
];
let { logs }: { logs?: LogEntry[] } = $props();
@@ -26,7 +26,7 @@
<p>No hay logs para mostrar</p>
{/if}
<DataTable {headers} rows={logs ?? []} expandable>
<DataTable headers={headers as any} rows={logs ?? []} expandable>
<svelte:fragment slot="cell" let:row let:cell>
{#if cell.key === 'created_at'}
{formatFecha(row.created_at)}
@@ -43,15 +43,15 @@
{#if row.detalles && row.detalles.length > 0}
{@const detallesConId = row.detalles.map((d: LogDetalle, i: number) => ({
...d,
id: d.id || i + 1
id: i + 1
}))}
<DataTable
headers={[
{ key: 'nombreTabla', value: 'Tabla' },
{ key: 'columna', value: 'Columna' },
{ key: 'valorAnterior', value: 'Valor anterior' },
{ key: 'valorNuevo', value: 'Valor nuevo' }
]}
{ key: 'nombreTabla', value: 'Tabla', empty: false },
{ key: 'columna', value: 'Columna', empty: false },
{ key: 'valorAnterior', value: 'Valor anterior', empty: false },
{ key: 'valorNuevo', value: 'Valor nuevo', empty: false }
] as any}
rows={detallesConId}
size="compact"
>