From 68bfe79db877f4b45f172450a124a7cca143ad13 Mon Sep 17 00:00:00 2001 From: chris Date: Wed, 29 Apr 2026 13:11:59 -0400 Subject: [PATCH] Expose vinylEnabled toggle in admin panel item-overrides.json is gitignored (runtime data), so vinylEnabled must be settable from the admin UI rather than committed directly. Adds the "Enable vinyl configurator" checkbox alongside the existing vinyl promo toggle so production overrides can be managed without touching files. Co-Authored-By: Claude Sonnet 4.6 --- src/app/shop/admin/page.tsx | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/app/shop/admin/page.tsx b/src/app/shop/admin/page.tsx index 713b4ee..fcbcc99 100644 --- a/src/app/shop/admin/page.tsx +++ b/src/app/shop/admin/page.tsx @@ -595,6 +595,7 @@ function ItemEditor({ const ov = item._override const [hidden, setHidden] = useState(ov.hidden ?? false) + const [vinylEnabled, setVinylEnabled] = useState(ov.vinylEnabled ?? false) const [vinylPromo, setVinylPromo] = useState(ov.vinylPromo ?? false) const [catOverride, setCatOverride] = useState(ov.categoryOverride ?? '') const [catLabel, setCatLabel] = useState(ov.categoryLabelOverride ?? '') @@ -643,7 +644,8 @@ function ItemEditor({ const patch: Partial = { hidden, hiddenModifierIds: hiddenMods, - vinylPromo: vinylPromo || undefined, + vinylEnabled: vinylEnabled || undefined, + vinylPromo: vinylPromo || undefined, } if (catOverride) patch.categoryOverride = catOverride if (catLabel) patch.categoryLabelOverride = catLabel @@ -677,6 +679,7 @@ function ItemEditor({ const res = await fetch(`/api/admin/items/${item.id}`, { method: 'DELETE' }) if (res.ok) { setHidden(false) + setVinylEnabled(false) setVinylPromo(false) setCatOverride('') setCatLabel('') @@ -739,7 +742,19 @@ function ItemEditor({ - {/* Vinyl promo */} + {/* Vinyl options */} +
+ +

Shows the shape picker, text input, and font selector on this item (use for the Custom Vinyl product).

+