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?'활성':'비활성'} -