Manuelle reports

This commit is contained in:
PxlLoewe
2025-07-27 13:45:13 -07:00
parent 453ad28538
commit 89a0eb7135
6 changed files with 163 additions and 12 deletions

View File

@@ -42,6 +42,7 @@ import {
Eye,
LockKeyhole,
PlaneIcon,
Plus,
ShieldUser,
Timer,
Trash2,
@@ -484,9 +485,16 @@ export const UserPenalties = ({ user }: { user: User }) => {
export const UserReports = ({ user }: { user: User }) => {
return (
<div className="card-body">
<h2 className="card-title">
<ExclamationTriangleIcon className="h-5 w-5" /> Nutzer Reports
</h2>
<div className="card-title flex justify-between">
<h2 className="flex items-center gap-2">
<ExclamationTriangleIcon className="h-5 w-5" /> Nutzer Reports
</h2>
<Link href={`/admin/report/new?reportedUserId=${user.id}`}>
<button className={"btn btn-xs btn-square btn-soft cursor-pointer"}>
<Plus />
</button>
</Link>
</div>
<PaginatedTable
prismaModel="report"
filter={{

View File

@@ -3,6 +3,12 @@ import { prisma, Prisma } from "@repo/db";
import bcrypt from "bcryptjs";
import { sendMailByTemplate } from "../../../../helper/mail";
export const getUser = async (where: Prisma.UserWhereInput) => {
return await prisma.user.findMany({
where,
});
};
export const editUser = async (id: string, data: Prisma.UserUpdateInput) => {
return await prisma.user.update({
where: {