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:
@@ -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());
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ export type AuditLog = {
|
||||
};
|
||||
|
||||
export type AuditLogFilter = {
|
||||
userId: string;
|
||||
userID: string;
|
||||
event: string;
|
||||
location: string;
|
||||
clientName: string;
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user