From 83d4415e45f530b2d1f092d5338b721bece1d4a9 Mon Sep 17 00:00:00 2001 From: Scrum4Me Agent <30029041+madhura68@users.noreply.github.com> Date: Wed, 6 May 2026 02:29:11 +0200 Subject: [PATCH] =?UTF-8?q?feat(ideas):=20lijst-filter=20matcht=20op=20pri?= =?UTF-8?q?mair=20=C3=A9n=20secundaire=20producten?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Breidt productFilter-logica in IdeaList uit: naast product_id wordt ook idea.secondary_products gecheckt, zodat ideeën zichtbaar blijven bij filteren op een secundair gekoppeld product. Co-Authored-By: Claude Sonnet 4.6 --- components/ideas/idea-list.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/components/ideas/idea-list.tsx b/components/ideas/idea-list.tsx index e457a02..2edac75 100644 --- a/components/ideas/idea-list.tsx +++ b/components/ideas/idea-list.tsx @@ -87,8 +87,14 @@ export function IdeaList({ ideas, products, isDemo }: IdeaListProps) { return ideas.filter((idea) => { if (q && !idea.title.toLowerCase().includes(q)) return false if (productFilter !== 'all') { - if (productFilter === 'none' && idea.product_id !== null) return false - if (productFilter !== 'none' && idea.product_id !== productFilter) return false + if (productFilter === 'none') { + if (idea.product_id !== null) return false + } else { + const matchesPrimary = idea.product_id === productFilter + const matchesSecondary = + idea.secondary_products?.some((sp) => sp.product_id === productFilter) ?? false + if (!matchesPrimary && !matchesSecondary) return false + } } if (statusFilter.size > 0 && !statusFilter.has(idea.status)) return false return true