fix(fe): derive the title figure from the live selection

figureName read slab.figureTermIds (the stored prop) while regenerateCopy()
runs against the local figIds edit state, so a freshly picked figure never
reached the title - drafts published as 'Black Walnut Slab' instead of
'Quilted Black Walnut Slab'. Read the local selection instead.
This commit is contained in:
2026-09-25 20:55:44 -07:00
parent 104f29f5e3
commit 350a849ab6
+1 -1
View File
@@ -48,7 +48,7 @@
$: figTags = (taxonomy?.tags ?? []).filter((t) => t.slug.startsWith('fig-') || t.name.startsWith('fig-'));
$: featTags = (taxonomy?.tags ?? []).filter((t) => t.slug.startsWith('feat-') || t.name.startsWith('feat-'));
$: speciesName = (id: number | null) => categories.find((c) => c.id === id)?.name ?? '';
$: figureName = figureTerms.find((t) => t.id === (slab.figureTermIds?.[0] ?? null))?.name ?? null;
$: figureName = figureTerms.find((t) => t.id === (figIds[0] ?? null))?.name ?? null;
// ── Draft fields ──
let sku = slab.sku || '';