From beab1b5bb73a1ba89f0ca7d119312846d62ec8b2 Mon Sep 17 00:00:00 2001 From: Ty Balascio Date: Fri, 25 Sep 2026 11:38:04 -0700 Subject: [PATCH] fix(fe): case-insensitive attribute-name match in review form attributeByName lowercased the store attribute name but compared it to the raw lookup string, so 'figure' !== 'Figure' and Edge/Figure/Grade/Thickness/ Moisture all matched nothing - the Figure chip group (and the other attribute pickers) rendered empty, so 'Mark Ready' could never enable against the live store. Lowercase both sides so the synced attributes resolve. --- frontend/src/review/ReviewForm.svelte | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/review/ReviewForm.svelte b/frontend/src/review/ReviewForm.svelte index fe256dc..cb6224e 100644 --- a/frontend/src/review/ReviewForm.svelte +++ b/frontend/src/review/ReviewForm.svelte @@ -34,8 +34,10 @@ $: categories = taxonomy?.categories ?? []; $: speciesLeaves = leafChildren(categories, 'species', 'Species'); $: woodCatLeaves = leafChildren(categories, 'wcat', 'Wood category'); - $: attributeByName = (name: string) => - (taxonomy?.attributes ?? []).find((a) => a.name.toLowerCase() === name || a.slug.toLowerCase() === name); + $: attributeByName = (name: string) => { + const n = name.toLowerCase(); + return (taxonomy?.attributes ?? []).find((a) => a.name.toLowerCase() === n || a.slug.toLowerCase() === n); + }; $: edgeTerms = attributeByName('Edge Type')?.terms ?? []; $: figureTerms = attributeByName('Figure')?.terms ?? []; $: gradeTerms = attributeByName('Grade')?.terms ?? [];