Add custom commission types

This commit is contained in:
2026-02-01 16:21:20 +01:00
parent e869f19142
commit 2015ea6f2e
19 changed files with 1180 additions and 1 deletions

View File

@ -0,0 +1,34 @@
import ListCustomCards from "@/components/commissions/customCards/ListCustomCards";
import { prisma } from "@/lib/prisma";
import { PlusCircleIcon } from "lucide-react";
import Link from "next/link";
export default async function CommissionCustomCardsPage() {
const cards = await prisma.commissionCustomCard.findMany({
include: {
options: { include: { option: true }, orderBy: { sortIndex: "asc" } },
extras: { include: { extra: true }, orderBy: { sortIndex: "asc" } },
},
orderBy: [{ sortIndex: "asc" }, { name: "asc" }],
});
return (
<div>
<div className="flex gap-4 justify-between pb-8">
<h1 className="text-2xl font-bold mb-4">Custom Commission Cards</h1>
<Link
href="/commissions/custom-cards/new"
className="flex gap-2 items-center cursor-pointer bg-primary hover:bg-primary/90 text-primary-foreground px-4 py-2 rounded"
>
<PlusCircleIcon className="h-[1.2rem] w-[1.2rem] scale-100 rotate-0 transition-all text-primary-foreground" />
Add new Card
</Link>
</div>
{cards && cards.length > 0 ? (
<ListCustomCards cards={cards} />
) : (
<p className="text-muted-foreground italic">No custom cards found.</p>
)}
</div>
);
}