1
0
mirror of https://github.com/pocket-id/pocket-id.git synced 2026-02-14 18:12:31 +00:00

fix: global audit log user filter not working

This commit is contained in:
Elias Schneider
2025-11-29 23:15:50 +01:00
parent 4fe56a8d5c
commit d98c0a391a
3 changed files with 10 additions and 5 deletions

View File

@@ -6,6 +6,7 @@
import type { AdvancedTableColumn } from '$lib/types/advanced-table.type'; import type { AdvancedTableColumn } from '$lib/types/advanced-table.type';
import type { AuditLog, AuditLogFilter } from '$lib/types/audit-log.type'; import type { AuditLog, AuditLogFilter } from '$lib/types/audit-log.type';
import { translateAuditLogEvent } from '$lib/utils/audit-log-translator'; import { translateAuditLogEvent } from '$lib/utils/audit-log-translator';
import { untrack } from 'svelte';
let { let {
isAdmin = false, isAdmin = false,
@@ -61,7 +62,11 @@
$effect(() => { $effect(() => {
if (filters) { if (filters) {
tableRef?.refresh(); filters.userID;
filters.event;
filters.location;
filters.clientName;
untrack(() => tableRef?.refresh());
} }
}); });

View File

@@ -12,7 +12,7 @@ export type AuditLog = {
}; };
export type AuditLogFilter = { export type AuditLogFilter = {
userId: string; userID: string;
event: string; event: string;
location: string; location: string;
clientName: string; clientName: string;

View File

@@ -13,7 +13,7 @@
let auditLogListRef: AuditLogList; let auditLogListRef: AuditLogList;
let filters: AuditLogFilter = $state({ let filters: AuditLogFilter = $state({
userId: '', userID: '',
event: '', event: '',
location: '', location: '',
clientName: '' clientName: ''
@@ -59,7 +59,7 @@
label: username label: username
})) }))
]} ]}
bind:value={filters.userId} bind:value={filters.userID}
/> />
{/await} {/await}
</div> </div>
@@ -72,7 +72,7 @@
value, value,
label label
})) }))
]} ]}
bind:value={filters.event} bind:value={filters.event}
/> />
</div> </div>