1
0
mirror of https://github.com/pocket-id/pocket-id.git synced 2026-02-04 15:04:43 +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 { AuditLog, AuditLogFilter } from '$lib/types/audit-log.type';
import { translateAuditLogEvent } from '$lib/utils/audit-log-translator';
import { untrack } from 'svelte';
let {
isAdmin = false,
@@ -61,7 +62,11 @@
$effect(() => {
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 = {
userId: string;
userID: string;
event: string;
location: string;
clientName: string;

View File

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