From bb742d2f383c0e4c2765028935eb86d2fe4a83da Mon Sep 17 00:00:00 2001 From: Mikhail Chusavitin Date: Fri, 26 Jun 2026 10:29:32 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20DKC/CTL/ENC=20=D0=BF=D0=BE=D0=BF=D0=B0?= =?UTF-8?q?=D0=B4=D0=B0=D0=BB=D0=B8=20=D0=B2=20Other=20=D0=BF=D1=80=D0=B8?= =?UTF-8?q?=20=D1=80=D0=B5=D0=B6=D0=B8=D0=BC=D0=B5=20server?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ASSIGNED_CATEGORIES пересобирался из отфильтрованного tab.categories, поэтому категории скрытые для текущего типа конфигурации переставали считаться «назначенными» и уходили в Other. Теперь используется tab._allCategories (полный статический список) — категория принадлежит вкладке независимо от видимости в текущем режиме. Также убрал лишний .toUpperCase() в updateTabVisibility. Co-Authored-By: Claude Sonnet 4.6 --- web/templates/index.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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);