Manuelle reports
This commit is contained in:
@@ -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={{
|
||||
|
||||
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user