Hide Scan Label button on page load until coating category is selected

This commit is contained in:
2026-05-04 22:13:19 -04:00
parent e447cdc803
commit ee3158b7d5
@@ -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 => {