audit changes

This commit is contained in:
Evert Prants 2022-09-10 09:29:17 +03:00
parent b4838d4d8b
commit a196be8c6f
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
3 changed files with 9 additions and 4 deletions

View File

@ -1,7 +1,7 @@
.wrapper { .wrapper {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 2rem; gap: 1rem;
} }
.logs { .logs {

View File

@ -88,7 +88,12 @@ export const AuditLogs = ({}) => {
return; return;
} }
setTypes(Array.from<boolean>({ length: filter.data.length }).fill(true)); setTypes(
Array.from<never, boolean>(
{ length: filter.data.length },
(_, k) => k > 0
)
);
}, [types, filter.data]); }, [types, filter.data]);
useEffect(() => { useEffect(() => {
@ -110,7 +115,7 @@ export const AuditLogs = ({}) => {
setSearchParams(urlparams); setSearchParams(urlparams);
}, [filter.data, types]); }, [filter.data, types]);
if (!data || !filter.data) { if (!data || !filter.data || !types.length) {
return <></>; return <></>;
} }

View File

@ -343,7 +343,7 @@ const UserCard = ({
<dd>{user.uuid}</dd> <dd>{user.uuid}</dd>
<dt>Email</dt> <dt>Email</dt>
<dd>{user.email}</dd> <dd>{user.email}</dd>
{user.privileges?.length && ( {user.privileges && user.privileges.length > 0 && (
<> <>
<dt>Privileges</dt> <dt>Privileges</dt>
<dd> <dd>