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 {
display: flex;
flex-direction: column;
gap: 2rem;
gap: 1rem;
}
.logs {

View File

@ -88,7 +88,12 @@ export const AuditLogs = ({}) => {
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]);
useEffect(() => {
@ -110,7 +115,7 @@ export const AuditLogs = ({}) => {
setSearchParams(urlparams);
}, [filter.data, types]);
if (!data || !filter.data) {
if (!data || !filter.data || !types.length) {
return <></>;
}

View File

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