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

@@ -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",