mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-02-15 23:16:11 +00:00
feat: add various improvements to the table component (#961)
Co-authored-by: Kyle Mendell <kmendell@ofkm.us>
This commit is contained in:
@@ -6,15 +6,11 @@
|
||||
import { m } from '$lib/paraglide/messages';
|
||||
import AuditLogService from '$lib/services/audit-log-service';
|
||||
import type { AuditLogFilter } from '$lib/types/audit-log.type';
|
||||
import { eventTypes as eventTranslations } from '$lib/utils/audit-log-translator';
|
||||
import AuditLogSwitcher from '../audit-log-switcher.svelte';
|
||||
import {eventTypes as eventTranslations} from "$lib/utils/audit-log-translator";
|
||||
|
||||
let { data } = $props();
|
||||
|
||||
const auditLogService = new AuditLogService();
|
||||
|
||||
let auditLogs = $state(data.auditLogs);
|
||||
let requestOptions = $state(data.requestOptions);
|
||||
let auditLogListRef: AuditLogList;
|
||||
|
||||
let filters: AuditLogFilter = $state({
|
||||
userId: '',
|
||||
@@ -29,10 +25,6 @@
|
||||
});
|
||||
|
||||
const eventTypes = $state(eventTranslations);
|
||||
|
||||
$effect(() => {
|
||||
auditLogService.listAllLogs(requestOptions, filters).then((response) => (auditLogs = response));
|
||||
});
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
@@ -124,7 +116,6 @@
|
||||
{/await}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<AuditLogList isAdmin={true} {auditLogs} {requestOptions} />
|
||||
<AuditLogList bind:this={auditLogListRef} isAdmin {filters} />
|
||||
</Card.Content>
|
||||
</Card.Root>
|
||||
|
||||
Reference in New Issue
Block a user