fix: 대시보드 버튼을 역할별 공통 대시보드로 연결
변경사항: - navbar의 대시보드 버튼이 개인 대시보드가 아닌 역할별 공통 대시보드로 이동하도록 수정 - Admin/System → /pages/dashboard/system.html - 그룹장 → /pages/dashboard/group-leader.html - 일반 사용자 → /pages/dashboard/user.html 수정된 파일: - web-ui/components/navbar.html - web-ui/js/load-navbar.js 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
</div>
|
||||
|
||||
<div class="header-right">
|
||||
<a href="/pages/profile/my-dashboard.html" class="dashboard-btn">
|
||||
<a href="#" id="dashboardBtn" class="dashboard-btn">
|
||||
<span class="btn-icon">📊</span>
|
||||
<span class="btn-text">대시보드</span>
|
||||
</a>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user