feat(admin): P1 — clearer tickets labels, pagination, min_staff_rank, analytics errors
Deploy / release (push) Skipped
Deploy / deploy (push) Successful in 1m37s

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
SimoandCursor committed 2026-07-22 19:04:45 +02:00
1 parent 75cdfdebe4
commit f150aea8b9
13 files changed
+311 -101

No files matched your search

+4 -2
View File
@@ -1,4 +1,5 @@
import { notFound, redirect } from "next/navigation";
import { getMinStaffRank } from "@/lib/admin/min-staff-rank";
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
import { prisma } from "@/lib/prisma";
import { AdminTicketDetail } from "./admin-ticket-detail";
@@ -45,9 +46,10 @@ export default async function AdminTicketDetailPage({
if (!ticket) notFound();
// Get staff members for assignment
// Staff assignees: min_staff_rank and above
const minStaffRank = await getMinStaffRank();
const staffMembers = await prisma.user.findMany({
where: { rank: { gte: 4 } },
where: { rank: { gte: minStaffRank } },
select: { id: true, username: true },
orderBy: { username: "asc" },
});