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:
@@ -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 || '';
|
||||
|
||||
Reference in New Issue
Block a user