Added Discord message for reports, Fixed type on docs

This commit is contained in:
PxlLoewe
2025-06-13 23:50:19 -07:00
parent 999daf17ad
commit 98cc1d6089
9 changed files with 114 additions and 11 deletions

View File

@@ -25,7 +25,8 @@ export const ReportSenderInfo = ({
return (
<div className="card-body">
<Link href={`/admin/user/${Reported?.id}`} className="card-title link link-hover">
{Reported?.firstname} {Reported?.lastname} ({Reported?.publicId})
{Reported?.firstname} {Reported?.lastname} ({Reported?.publicId}) als{" "}
<span className="text-primary">{report.reportedUserRole}</span>
</Link>
<div className="textarea w-full text-left">{report.text}</div>
<Link

View File

@@ -1,9 +1,10 @@
"use client";
import { Check, Eye, X } from "lucide-react";
import { Check, Eye, ShieldQuestion, X } from "lucide-react";
import Link from "next/link";
import { PaginatedTable } from "_components/PaginatedTable";
import { Report, User } from "@repo/db";
import { ColumnDef } from "@tanstack/react-table";
import { Workflow, Plane } from "lucide-react";
export default function ReportPage() {
return (
@@ -40,6 +41,20 @@ export default function ReportPage() {
return `${user.firstname} ${user.lastname} (${user.publicId})`;
},
},
{
accessorKey: "reportedUserRole",
header: "Rolle des gemeldeten Nutzers",
cell: ({ row }) => {
const role = row.getValue("reportedUserRole") as string | undefined;
const Icon = role ? (role.startsWith("LST") ? Workflow : Plane) : ShieldQuestion;
return (
<span className="flex items-center gap-2">
<Icon className="w-4 h-4" />
{role || "Unbekannt"}
</span>
);
},
},
{
accessorKey: "Reported",
header: "Reported",

View File

@@ -74,8 +74,8 @@ export const PasswortReset = () => {
: ""}
</p>
<span className="text-sm font-medium flex justify-end">
<Link href="/passwort-reset" className="link link-accent link-hover ">
neues Passwort anfordern
<Link href="/login" className="link link-accent link-hover ">
zum Login
</Link>
</span>
<div className="card-actions mt-6">