Files
TK-FB-Project/web-ui/components/navbar.html
Hyungi Ahn 94ecc7333d 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: 삭제된 페이지 목록
2025-11-03 09:26:50 +09:00

383 lines
7.5 KiB
HTML

<!-- components/navbar.html -->
<!-- 프로필 드롭다운이 추가된 개선된 네비게이션바 -->
<nav class="navbar">
<div class="navbar-brand">
<img src="/img/logo.png" alt="로고" class="logo-small">
<div class="brand-content">
<span class="brand-text">테크니컬코리아</span>
<span class="brand-subtitle">생산팀 포털</span>
</div>
</div>
<div class="navbar-center">
<div class="current-time" id="current-time"></div>
</div>
<div class="navbar-menu">
<!-- 프로필 드롭다운 추가 -->
<div class="profile-dropdown">
<div class="user-info" id="user-info-dropdown">
<div class="user-avatar">👤</div>
<div class="user-details">
<span class="user-name" id="user-name">사용자</span>
<span class="user-role" id="user-role">작업자</span>
</div>
<span class="dropdown-arrow"></span>
</div>
<!-- 드롭다운 메뉴 -->
<div class="dropdown-menu" id="profile-dropdown-menu">
<div class="dropdown-header">
<div class="dropdown-user-name" id="dropdown-user-fullname">사용자</div>
<div class="dropdown-user-id" id="dropdown-user-id">@username</div>
</div>
<div class="dropdown-divider"></div>
<a href="/pages/profile/my-profile.html" class="dropdown-item">
<span class="dropdown-icon">👤</span>
내 프로필
</a>
<a href="/pages/profile/change-password.html" class="dropdown-item">
<span class="dropdown-icon">🔐</span>
비밀번호 변경
</a>
<a href="/pages/profile/settings.html" class="dropdown-item">
<span class="dropdown-icon">⚙️</span>
설정
</a>
<div class="dropdown-divider"></div>
<button class="dropdown-item logout-item" id="dropdown-logout">
<span class="dropdown-icon">🚪</span>
로그아웃
</button>
</div>
</div>
<div class="navbar-buttons">
<button class="nav-btn dashboard-btn" title="대시보드">
🏠 대시보드
</button>
<button class="nav-btn admin-btn" title="관리자 페이지" id="adminBtn" style="display: none;">
⚙️ 관리자
</button>
<button class="nav-btn system-btn" title="시스템 관리자" id="systemBtn" style="display: none;">
🔧 시스템
</button>
</div>
</div>
</nav>
<style>
.navbar {
background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
padding: 12px 24px;
color: white;
display: flex;
justify-content: space-between;
align-items: center;
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
font-family: 'Malgun Gothic', sans-serif;
position: relative;
z-index: 1000;
}
.navbar-brand {
display: flex;
align-items: center;
gap: 12px;
}
.logo-small {
height: 40px;
width: auto;
border-radius: 6px;
}
.brand-content {
display: flex;
flex-direction: column;
}
.brand-text {
font-size: 1.2rem;
font-weight: 700;
line-height: 1.2;
}
.brand-subtitle {
font-size: 0.8rem;
opacity: 0.9;
font-weight: 400;
}
.navbar-center {
display: flex;
align-items: center;
}
.current-time {
font-size: 0.9rem;
font-weight: 500;
padding: 8px 16px;
background: rgba(255,255,255,0.1);
border-radius: 20px;
backdrop-filter: blur(10px);
border: 1px solid rgba(255,255,255,0.2);
}
.navbar-menu {
display: flex;
align-items: center;
gap: 20px;
}
/* 프로필 드롭다운 스타일 */
.profile-dropdown {
position: relative;
}
.user-info {
display: flex;
align-items: center;
gap: 12px;
padding: 8px 16px;
background: rgba(255,255,255,0.1);
border-radius: 25px;
backdrop-filter: blur(10px);
border: 1px solid rgba(255,255,255,0.2);
cursor: pointer;
transition: all 0.3s ease;
}
.user-info:hover {
background: rgba(255,255,255,0.2);
}
.user-info.active {
background: rgba(255,255,255,0.25);
box-shadow: 0 0 0 3px rgba(255,255,255,0.2);
}
.dropdown-arrow {
font-size: 0.7rem;
margin-left: 4px;
transition: transform 0.3s ease;
}
.user-info.active .dropdown-arrow {
transform: rotate(180deg);
}
.user-avatar {
width: 36px;
height: 36px;
background: rgba(255,255,255,0.2);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.2rem;
}
.user-details {
display: flex;
flex-direction: column;
align-items: flex-start;
}
.user-name {
font-weight: 600;
font-size: 0.9rem;
line-height: 1.2;
}
.user-role {
font-size: 0.7rem;
opacity: 0.8;
font-weight: 400;
}
/* 드롭다운 메뉴 */
.dropdown-menu {
position: absolute;
top: calc(100% + 8px);
right: 0;
background: white;
border-radius: 12px;
box-shadow: 0 8px 24px rgba(0,0,0,0.15);
min-width: 240px;
opacity: 0;
visibility: hidden;
transform: translateY(-10px);
transition: all 0.3s ease;
overflow: hidden;
}
.dropdown-menu.show {
opacity: 1;
visibility: visible;
transform: translateY(0);
}
.dropdown-header {
padding: 16px 20px;
background: #f5f5f5;
border-bottom: 1px solid #e0e0e0;
}
.dropdown-user-name {
font-weight: 600;
color: #333;
font-size: 1rem;
margin-bottom: 4px;
}
.dropdown-user-id {
font-size: 0.85rem;
color: #666;
}
.dropdown-divider {
height: 1px;
background: #e0e0e0;
margin: 0;
}
.dropdown-item {
display: flex;
align-items: center;
gap: 12px;
padding: 12px 20px;
color: #333;
text-decoration: none;
transition: background 0.2s ease;
border: none;
background: none;
width: 100%;
text-align: left;
font-size: 0.9rem;
cursor: pointer;
font-family: inherit;
}
.dropdown-item:hover {
background: #f5f5f5;
}
.dropdown-item:active {
background: #e0e0e0;
}
.dropdown-icon {
font-size: 1.1rem;
width: 24px;
text-align: center;
}
.logout-item {
color: #f44336;
}
.logout-item:hover {
background: #ffebee;
}
/* 기존 버튼 스타일 */
.navbar-buttons {
display: flex;
gap: 12px;
}
.nav-btn {
padding: 8px 16px;
border: none;
border-radius: 20px;
font-size: 0.85rem;
font-weight: 500;
cursor: pointer;
transition: all 0.3s ease;
display: flex;
align-items: center;
gap: 6px;
font-family: inherit;
}
.dashboard-btn {
background: rgba(255,255,255,0.15);
color: white;
border: 1px solid rgba(255,255,255,0.3);
}
.dashboard-btn:hover {
background: rgba(255,255,255,0.25);
transform: translateY(-1px);
}
.admin-btn {
background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
color: white;
border: 1px solid rgba(255,255,255,0.3);
box-shadow: 0 2px 8px rgba(255,107,53,0.3);
}
.admin-btn:hover {
background: linear-gradient(135deg, #ff5722 0%, #ff9800 100%);
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(255,107,53,0.4);
}
.system-btn {
background: linear-gradient(135deg, #9c27b0 0%, #673ab7 100%);
color: white;
border: 1px solid rgba(255,255,255,0.3);
box-shadow: 0 2px 8px rgba(156,39,176,0.3);
}
.system-btn:hover {
background: linear-gradient(135deg, #8e24aa 0%, #5e35b1 100%);
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(156,39,176,0.4);
}
/* 반응형 */
@media (max-width: 1024px) {
.navbar {
padding: 12px 20px;
}
.navbar-center {
display: none;
}
}
@media (max-width: 768px) {
.navbar {
padding: 12px 16px;
}
.brand-content {
display: none;
}
.navbar-menu {
gap: 12px;
}
.dropdown-menu {
right: -16px;
}
}
@media (max-width: 480px) {
.dashboard-btn, .admin-btn, .system-btn {
display: none;
}
.user-details {
display: none;
}
.dropdown-arrow {
display: none;
}
}
</style>