isAdmin ? (auditLogs = await auditLogService.listAllLogs(options)) : (auditLogs = await auditLogService.list(options))} columns={[ { label: m.time(), sortColumn: 'createdAt' }, ...(isAdmin ? [{ label: 'Username' }] : []), { label: m.event(), sortColumn: 'event' }, { label: m.approximate_location(), sortColumn: 'city' }, { label: m.ip_address(), sortColumn: 'ipAddress' }, { label: m.device(), sortColumn: 'device' }, { label: m.client() } ]} withoutSearch > {#snippet rows({ item })} {new Date(item.createdAt).toLocaleString()} {#if isAdmin} {#if item.username} {item.username} {:else} Unknown User {/if} {/if} {translateAuditLogEvent(item.event)} {#if item.city && item.country} {item.city}, {item.country} {:else if item.country} {item.country} {:else} {m.unknown()} {/if} {item.ipAddress} {item.device} {item.data.clientName} {/snippet}