feat: 데이터베이스 및 웹 UI 대규모 리팩토링

- 삭제된 DB 테이블들과 관련 코드 정리:
  * 12개 사용하지 않는 테이블 삭제 (activity_logs, CuttingPlan, DailyIssueReports 등)
  * 관련 모델, 컨트롤러, 라우트 파일들 삭제
  * index.js에서 삭제된 라우트들 제거

- 웹 UI 페이지 정리:
  * 21개 사용하지 않는 페이지 삭제
  * issue-reports 폴더 전체 삭제
  * 모든 사용자 권한을 그룹장 대시보드로 통일

- 데이터베이스 스키마 정리:
  * v1 스키마로 통일 (daily_work_reports 테이블)
  * JSON 데이터 임포트 스크립트 구현
  * 외래키 관계 정리 및 데이터 일관성 확보

- 통합 Docker Compose 설정:
  * 모든 서비스를 단일 docker-compose.yml로 통합
  * 20000번대 포트 유지
  * JWT 시크릿 및 환경변수 설정

- 문서화:
  * DATABASE_SCHEMA.md: 현재 DB 스키마 문서화
  * DELETED_TABLES.md: 삭제된 테이블 목록
  * DELETED_PAGES.md: 삭제된 페이지 목록
This commit is contained in:
Hyungi Ahn
2025-11-03 09:26:50 +09:00
parent 2a3feca45b
commit 94ecc7333d
71 changed files with 15664 additions and 4385 deletions

View File

@@ -55,6 +55,18 @@ function populateUserInfo(doc, user) {
// 드롭다운 메뉴 사용자 아이디
const dropdownIdEl = doc.getElementById('dropdown-user-id');
if (dropdownIdEl) dropdownIdEl.textContent = `@${user.username}`;
// Admin 버튼 표시 여부 결정 (admin 권한만)
const adminBtn = doc.getElementById('adminBtn');
if (adminBtn && user.role === 'admin') {
adminBtn.style.display = 'flex';
}
// System 버튼 표시 여부 결정 (system 권한만)
const systemBtn = doc.getElementById('systemBtn');
if (systemBtn && user.role === 'system') {
systemBtn.style.display = 'flex';
}
}
/**
@@ -83,6 +95,22 @@ function setupNavbarEvents() {
}
});
}
// Admin 버튼 클릭 이벤트
const adminButton = document.getElementById('adminBtn');
if (adminButton) {
adminButton.addEventListener('click', () => {
window.location.href = '/pages/dashboard/admin.html';
});
}
// System 버튼 클릭 이벤트
const systemButton = document.getElementById('systemBtn');
if (systemButton) {
systemButton.addEventListener('click', () => {
window.location.href = '/pages/dashboard/system.html';
});
}
// 외부 클릭 시 드롭다운 닫기
document.addEventListener('click', (e) => {