diff --git a/web/templates/index.html b/web/templates/index.html index 6269654..e433d3d 100644 --- a/web/templates/index.html +++ b/web/templates/index.html @@ -1309,9 +1309,10 @@ function applyConfigTypeToTabs() { } }); - // Rebuild assigned categories index + // Rebuild assigned categories index using the full static list (_allCategories), + // not the filtered one — hidden categories still belong to their tab, not to Other. ASSIGNED_CATEGORIES = Object.values(TAB_CONFIG) - .flatMap(t => t.categories) + .flatMap(t => t._allCategories || t.categories) .map(c => ciStr(c)); } @@ -1323,8 +1324,7 @@ function updateTabVisibility() { if (!btn) continue; const hasComponents = getComponentsForTab(tabId).length > 0; const hasCartItems = cart.some(item => { - const cat = (item.category || '').toUpperCase(); - return getTabForCategory(cat) === tabId; + return getTabForCategory(item.category) === tabId; }); const visible = hasComponents || hasCartItems; btn.classList.toggle('hidden', !visible);