From 0a06b1dc746f8161453cf1a47ecfada96774c09e Mon Sep 17 00:00:00 2001 From: Scrum4Me Agent <30029041+madhura68@users.noreply.github.com> Date: Fri, 15 May 2026 04:33:47 +0200 Subject: [PATCH] feat(ideas): resolve active_product_id en geef door aan IdeaList Haalt active_product_id op via prisma.user.findUnique en resolveert het tegen de al opgehaalde toegankelijke productenlijst (AC4). Geeft het resultaat als prop door aan IdeaList in plaats van hardcoded null. Co-Authored-By: Claude Sonnet 4.6 --- app/(app)/ideas/page.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app/(app)/ideas/page.tsx b/app/(app)/ideas/page.tsx index 679a349..1c4fd5e 100644 --- a/app/(app)/ideas/page.tsx +++ b/app/(app)/ideas/page.tsx @@ -32,6 +32,16 @@ export default async function IdeasPage() { select: { id: true, name: true, repo_url: true }, }) + const user = await prisma.user.findUnique({ + where: { id: session.userId }, + select: { active_product_id: true }, + }) + + const activeProductId = + user?.active_product_id && products.some((p) => p.id === user.active_product_id) + ? user.active_product_id + : null + return (
@@ -45,7 +55,7 @@ export default async function IdeasPage() { ideas={ideas.map((i) => ideaToDto(i))} products={products} isDemo={session.isDemo ?? false} - activeProductId={null} + activeProductId={activeProductId} />
)