feat(PBI-34 ST-1213): UI — multi-select badges + lijst-filter (#111)
* feat(ideas): multi-select secundaire producten + badges in IdeaDetailLayout Voegt checkbox-lijst toe voor extra producten (exclusief primaire) in de Idee-tab, geïntegreerd in bestaande save/reset flow via updateSecondaryProductsAction. Toont secundaire product-badges in de detail-header. Bevat ook schema/dto/action-dependencies (IdeaProduct junction, secondary_products in IdeaDto). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(ideas): lijst-filter matcht op primair én secundaire producten 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 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
9a733d77bb
commit
50d0fcab37
2 changed files with 65 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue