From d2bcdd0dc976d1b19c3c14148de918959469cff9 Mon Sep 17 00:00:00 2001 From: KWON Date: Fri, 20 Feb 2026 15:52:36 +0900 Subject: [PATCH] =?UTF-8?q?Fix:=20VIP=20=EC=B9=B4=ED=85=8C=EA=B3=A0?= =?UTF-8?q?=EB=A6=AC=20=EB=AA=A8=EB=91=90=EB=B3=B4=EA=B8=B0=20=ED=86=A0?= =?UTF-8?q?=EA=B8=80=20-=20display=20=EC=86=8D=EC=84=B1=EC=9C=BC=EB=A1=9C?= =?UTF-8?q?=20=EC=A6=89=EC=8B=9C=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - PHP에서 비활성 카테고리도 항상 렌더링하도록 continue 제거 - input과 label 모두에 inactive-cat 클래스 추가 - JavaScript에서 .inactive-cat 요소의 display를 토글하여 즉시 반영 --- manager/vip/vip_list.php | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/manager/vip/vip_list.php b/manager/vip/vip_list.php index 96c5e6e5e..1dc7f991c 100644 --- a/manager/vip/vip_list.php +++ b/manager/vip/vip_list.php @@ -37,14 +37,12 @@ $table = "{$fg['vip_list_table']} AS a LEFT JOIN {$fg['vip_category_table']} AS $group_name = getVipCatName(); $show_all = isset($_REQUEST['show_all_cat']) ? true : false; foreach ($group_name as $row) { // VIP구분 가지고 와서 뿌려주기 - // 비활성 카테고리 숨김 - if ($row['gr_used'] == 0 && !$show_all) continue; $inactive_class = ($row['gr_used'] == 0) ? ' inactive-cat' : ''; - $display_style = ($row['gr_used'] == 0 && !$show_all) ? 'display: none;' : ''; + $display_style = ($row['gr_used'] == 0) ? 'display: none;' : ''; ?> - > + style=""> - + @@ -376,12 +374,10 @@ $table = "{$fg['vip_list_table']} AS a LEFT JOIN {$fg['vip_category_table']} AS const btn = event.target; const showAll = !btn.getAttribute('data-show-all') || btn.getAttribute('data-show-all') === 'false'; - // UI 즉시 업데이트 - const categoryLabels = document.querySelectorAll('.category-label'); - categoryLabels.forEach(label => { - if (label.classList.contains('inactive-cat')) { - label.style.display = showAll ? 'inline-block' : 'none'; - } + // 비활성 카테고리 input과 label 토글 + const inactiveElements = document.querySelectorAll('.inactive-cat'); + inactiveElements.forEach(elem => { + elem.style.display = showAll ? 'inline-block' : 'none'; }); // 버튼 텍스트 업데이트