From 7ab8a5065e66e3c65396e4974f0009d61a17e272 Mon Sep 17 00:00:00 2001 From: byun Date: Sun, 31 May 2026 19:05:49 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B3=84=EC=A0=95=20=EA=B4=80=EB=A6=AC=20?= =?UTF-8?q?=EC=82=AD=EC=A0=9C=20=EA=B8=B0=EB=8A=A5=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 삭제(비활성화) 후 목록에서 즉시 숨겨지도록 수정 (기본값: 활성 계정만 표시) - "비활성 계정 포함" 체크박스 추가 — 필요 시 비활성 계정도 확인 가능 - delUser 에러 처리 추가 (try/catch + alert) - 삭제 확인 메시지 개선 Co-Authored-By: Claude Sonnet 4.6 --- frontend/static/pages/admin/accounts.html | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/frontend/static/pages/admin/accounts.html b/frontend/static/pages/admin/accounts.html index 9be1b26..5b5e812 100644 --- a/frontend/static/pages/admin/accounts.html +++ b/frontend/static/pages/admin/accounts.html @@ -52,11 +52,15 @@
-
+
+
@@ -169,10 +173,12 @@ async function rejectUser(id, name) { async function load() { const role = document.getElementById('fRole').value; + const showInactive = document.getElementById('chkInactive').checked; const users = await API.get('/accounts'+(role?'?role='+role:'')); document.getElementById('chkAll').checked = false; updateDeleteBtn(); - document.getElementById('tbody').innerHTML = users.filter(u => !u.is_pending).map(u=>` + const filtered = users.filter(u => !u.is_pending && (showInactive || u.is_active)); + document.getElementById('tbody').innerHTML = filtered.map(u=>` + ${u.is_active ? `` : ''}`).join(''); } function openModal() { document.getElementById('modal').classList.remove('hidden'); document.getElementById('eId').value=''; document.getElementById('eUsername').disabled=false; document.getElementById('pwReq').style.display='inline'; } @@ -221,7 +227,11 @@ async function save() { closeModal(); load(); } catch(e) { const el=document.getElementById('modalErr'); el.textContent=e.message; el.style.display='block'; } } -async function delUser(id) { if(!confirm('비활성 처리하시겠습니까?')) return; await API.delete('/accounts/'+id); load(); } +async function delUser(id) { + if (!confirm('계정을 삭제하시겠습니까?\n(처리 이력이 있는 계정은 비활성 처리됩니다.)')) return; + try { await API.delete('/accounts/'+id); load(); } + catch(e) { alert('오류: ' + e.message); } +} loadPending(); load();
${u.name}${u.company||'-'}${u.phone||'-'} ${u.is_active?'활성':'비활성'} -