diff --git a/apps/hub/app/(app)/admin/user/[id]/_components/AccountLog.tsx b/apps/hub/app/(app)/admin/user/[id]/_components/AccountLog.tsx index d39c4493..a12a4cc5 100644 --- a/apps/hub/app/(app)/admin/user/[id]/_components/AccountLog.tsx +++ b/apps/hub/app/(app)/admin/user/[id]/_components/AccountLog.tsx @@ -12,16 +12,20 @@ export const AccountLog = ({ sameIPLogs, userId }: { sameIPLogs: Log[]; userId: const tableRef = useRef(null); return (
-
-

- Account Log -

-

- Hier werden Logs angezeigt, die dem Nutzer zugeordnet sind oder von der selben IP stammen. -

-
+

+ Account Log +

+

+ Hier werden Logs angezeigt, die dem Nutzer zugeordnet sind oder von der selben IP + stammen. +

+
+ } rightOfPagination={
{ return { AND: [ + onlyImportant + ? { + type: { + in: ["REGISTER", "PROFILE_CHANGE"], + }, + } + : {}, { - OR: [ + AND: [ { ip: { contains: searchTerm } }, { browser: { contains: searchTerm } }, { @@ -58,24 +69,6 @@ export const AccountLog = ({ sameIPLogs, userId }: { sameIPLogs: Log[]; userId: }, ], }, - onlyImportant - ? { - OR: [ - { - id: { - in: sameIPLogs - .filter((log) => log.id.toString().includes(searchTerm)) - .map((log) => log.id), - }, - }, - { - type: { - in: ["REGISTER", "PROFILE_CHANGE"], - }, - }, - ], - } - : {}, ], } as Prisma.LogWhereInput; }}