From 195f1dc9c017344921d41136b135b1dccf6a7a0f Mon Sep 17 00:00:00 2001 From: PxlLoewe <72106766+PxlLoewe@users.noreply.github.com> Date: Sun, 1 Feb 2026 00:41:45 +0100 Subject: [PATCH] Fixed Account Log filter --- .../user/[id]/_components/AccountLog.tsx | 47 ++++++++----------- 1 file changed, 20 insertions(+), 27 deletions(-) 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; }}