From ee3158b7d516d3902742c4ebbe07ba114259c9f2 Mon Sep 17 00:00:00 2001 From: Scott Pouliot Date: Mon, 4 May 2026 22:13:19 -0400 Subject: [PATCH] Hide Scan Label button on page load until coating category is selected --- .../Views/Inventory/_InventoryColorFamilyScripts.cshtml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/PowderCoating.Web/Views/Inventory/_InventoryColorFamilyScripts.cshtml b/src/PowderCoating.Web/Views/Inventory/_InventoryColorFamilyScripts.cshtml index 4dba788..8ae5547 100644 --- a/src/PowderCoating.Web/Views/Inventory/_InventoryColorFamilyScripts.cshtml +++ b/src/PowderCoating.Web/Views/Inventory/_InventoryColorFamilyScripts.cshtml @@ -37,6 +37,7 @@ const categorySelect = document.getElementById('field-category'); const coatingSection = document.getElementById('coating-specs-section'); const smartLookupBtn = document.getElementById('smart-lookup-btn'); + const scanLabelBtn = document.getElementById('scan-label-btn'); let coatingMap = {}; if (categorySelect && categorySelect.dataset.coatingMap) { @@ -54,6 +55,7 @@ const show = isCoatingCategory(catId); if (coatingSection) coatingSection.style.display = show ? '' : 'none'; if (smartLookupBtn) smartLookupBtn.style.display = show ? '' : 'none'; + if (scanLabelBtn) scanLabelBtn.style.display = show ? '' : 'none'; const samplePanelSection = document.getElementById('sample-panel-section'); if (samplePanelSection) samplePanelSection.style.display = show ? '' : 'none'; coatingOnlyFields.forEach(id => {