Add isParent boolean to tags

This commit is contained in:
2025-12-21 21:57:16 +01:00
parent d1adb07f40
commit 48114f391a
10 changed files with 46 additions and 8 deletions

View File

@ -14,7 +14,7 @@ export default async function PortfolioTagsEditPage({ params }: { params: { id:
})
const categories = await prisma.artCategory.findMany({ include: { tags: true }, orderBy: { sortIndex: "asc" } });
const tags = await prisma.artTag.findMany({ orderBy: { sortIndex: "asc" } });
const tags = await prisma.artTag.findMany({ where: { isParent: true }, orderBy: { sortIndex: "asc" } });
return (
<div>

View File

@ -3,7 +3,7 @@ import { prisma } from "@/lib/prisma";
export default async function PortfolioTagsNewPage() {
const categories = await prisma.artCategory.findMany({ include: { tags: true }, orderBy: { sortIndex: "asc" } });
const tags = await prisma.artTag.findMany({ orderBy: { sortIndex: "asc" } });
const tags = await prisma.artTag.findMany({ where: { isParent: true }, orderBy: { sortIndex: "asc" } });
return (
<div>