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:
@@ -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());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user