diff --git a/web-ui/components/navbar.html b/web-ui/components/navbar.html index 260061c..1f01636 100644 --- a/web-ui/components/navbar.html +++ b/web-ui/components/navbar.html @@ -20,7 +20,7 @@
- + πŸ“Š λŒ€μ‹œλ³΄λ“œ diff --git a/web-ui/js/load-navbar.js b/web-ui/js/load-navbar.js index d62bd47..dcc0e21 100644 --- a/web-ui/js/load-navbar.js +++ b/web-ui/js/load-navbar.js @@ -66,6 +66,20 @@ function populateUserInfo(doc, user) { const el = doc.getElementById(id); if (el) el.textContent = elements[id]; } + + // 역할별 λŒ€μ‹œλ³΄λ“œ URL μ„€μ • + const dashboardBtn = doc.getElementById('dashboardBtn'); + if (dashboardBtn) { + let dashboardUrl = '/pages/dashboard/user.html'; // κΈ°λ³Έκ°’ + + if (user.role === 'admin' || user.role === 'system') { + dashboardUrl = '/pages/dashboard/system.html'; + } else if (user.role === 'leader' || user.access_level === 'group_leader') { + dashboardUrl = '/pages/dashboard/group-leader.html'; + } + + dashboardBtn.href = dashboardUrl; + } } /**