fix: 로그인 후 리다이렉트 경로를 새 대시보드로 수정

변경사항:
- authController.js: 로그인 후 /pages/dashboard.html로 리다이렉트
- config.js: 모든 대시보드 경로를 /pages/dashboard.html로 통일
- work/report-view.html: 대시보드 버튼 경로 수정

이제 로그인하면 올바른 경로로 이동합니다.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Hyungi Ahn
2026-01-20 10:50:54 +09:00
parent 73e5eff7bd
commit 6b7f9d4627
3 changed files with 9 additions and 9 deletions

View File

@@ -21,9 +21,9 @@ const login = asyncHandler(async (req, res) => {
throw new ApiError(result.error, result.status || 400);
}
// 로그인 성공 후, 모든 권한을 그룹장 대시보드로 통일
// 로그인 성공 후, 메인 대시보드로 리다이렉트
const user = result.data.user;
const redirectUrl = '/pages/dashboard/group-leader.html'; // 모든 사용자를 그룹장 대시보드로 리다이렉트
const redirectUrl = '/pages/dashboard.html'; // 메인 대시보드로 리다이렉트
// 새로운 응답 포맷터 사용
res.auth(user, result.data.token, redirectUrl, '로그인 성공');

View File

@@ -16,12 +16,12 @@ export const config = {
paths: {
// 로그인 페이지 경로
loginPage: '/index.html',
// 로그인 후 기본적으로 이동할 대시보드 경로
defaultDashboard: '/pages/dashboard/user.html',
// 시스템 대시보드 경로
systemDashboard: '/pages/dashboard/system.html',
// 그룹 리더 대시보드 경로
groupLeaderDashboard: '/pages/dashboard/group-leader.html',
// 메인 대시보드 경로 (모든 사용자 공통)
dashboard: '/pages/dashboard.html',
// 하위 호환성을 위한 별칭들
defaultDashboard: '/pages/dashboard.html',
systemDashboard: '/pages/dashboard.html',
groupLeaderDashboard: '/pages/dashboard.html',
},
// 공용 컴포넌트 경로 설정

View File

@@ -31,7 +31,7 @@
<div class="header-right">
<div class="header-actions">
<button class="btn btn-secondary dashboard-btn" onclick="window.location.href='/pages/dashboard/group-leader.html'">
<button class="btn btn-secondary dashboard-btn" onclick="window.location.href='/pages/dashboard.html'">
<span class="btn-icon">🏠</span>
대시보드
</button>