- 부적합 API 호출 형식 수정 (카테고리/아이템 추가 시) - 부적합 저장 시 내부 플래그 제거 후 백엔드 전송 - 기본 부적합 객체 구조 수정 (category_id, item_id 추가) - 날씨 API 시간대 수정 (UTC → KST 변환) - 신고 카테고리 관리 페이지 추가 (/pages/admin/issue-categories.html) - 부적합 입력 UI 개선 (대분류→소분류 캐스케이딩 선택) - 저장된 부적합 분리 표시 및 수정/삭제 기능 - 디버깅 로그 추가 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
411 lines
8.9 KiB
HTML
411 lines
8.9 KiB
HTML
<!-- components/navbar.html -->
|
|
<!-- 최신 대시보드 헤더 -->
|
|
<header class="dashboard-header">
|
|
<div class="header-content">
|
|
<div class="header-left">
|
|
<div class="brand">
|
|
<img src="/img/logo.png" alt="테크니컬코리아" class="brand-logo">
|
|
<div class="brand-text">
|
|
<h1 class="brand-title">테크니컬코리아</h1>
|
|
<p class="brand-subtitle">생산팀 포털</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="header-center">
|
|
<div class="datetime-weather-box">
|
|
<div class="date-time-section">
|
|
<span class="date-value" id="dateValue">--월 --일 (--)</span>
|
|
<span class="time-value" id="timeValue">--:--:--</span>
|
|
</div>
|
|
<div class="weather-section" id="weatherSection">
|
|
<span class="weather-icon" id="weatherIcon">🌤️</span>
|
|
<span class="weather-temp" id="weatherTemp">--°C</span>
|
|
<span class="weather-desc" id="weatherDesc">날씨 로딩중</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="header-right">
|
|
<a href="#" id="dashboardBtn" class="dashboard-btn">
|
|
<span class="btn-icon">📊</span>
|
|
<span class="btn-text">대시보드</span>
|
|
</a>
|
|
|
|
<a href="/pages/safety/report.html" class="report-btn">
|
|
<span class="btn-icon">⚠</span>
|
|
<span class="btn-text">신고</span>
|
|
</a>
|
|
|
|
<div class="user-profile" id="userProfile">
|
|
<div class="user-avatar">
|
|
<span class="avatar-text" id="userInitial">사</span>
|
|
</div>
|
|
<div class="user-info">
|
|
<span class="user-name" id="userName">사용자</span>
|
|
<span class="user-role" id="userRole">작업자</span>
|
|
</div>
|
|
<div class="profile-menu" id="profileMenu">
|
|
<a href="/pages/profile/info.html" class="menu-item">
|
|
<span class="menu-icon">👤</span>
|
|
내 프로필
|
|
</a>
|
|
<a href="/pages/profile/password.html" class="menu-item">
|
|
<span class="menu-icon">🔐</span>
|
|
비밀번호 변경
|
|
</a>
|
|
<a href="/pages/admin/accounts.html" class="menu-item admin-only">
|
|
<span class="menu-icon">⚙️</span>
|
|
관리자 설정
|
|
</a>
|
|
<button class="menu-item logout-btn" id="logoutBtn">
|
|
<span class="menu-icon">🚪</span>
|
|
로그아웃
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
|
|
<style>
|
|
/* 최신 대시보드 헤더 스타일 */
|
|
.dashboard-header {
|
|
background: var(--header-gradient);
|
|
color: var(--text-inverse);
|
|
padding: var(--space-4) var(--space-6);
|
|
box-shadow: var(--shadow-lg);
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
z-index: 200;
|
|
height: 80px;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
/* 헤더 높이만큼 본문 여백 추가 */
|
|
body {
|
|
padding-top: 80px;
|
|
}
|
|
|
|
.header-content {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
width: 100%;
|
|
padding: 0 var(--space-4);
|
|
}
|
|
|
|
.header-left .brand {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-3);
|
|
}
|
|
|
|
.header-right {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-4);
|
|
}
|
|
|
|
.brand-logo {
|
|
width: 48px;
|
|
height: 48px;
|
|
border-radius: var(--radius-lg);
|
|
box-shadow: var(--shadow-md);
|
|
}
|
|
|
|
.brand-title {
|
|
font-size: var(--text-2xl);
|
|
font-weight: var(--font-bold);
|
|
margin: 0;
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.brand-subtitle {
|
|
font-size: var(--text-sm);
|
|
opacity: 0.9;
|
|
margin: 0;
|
|
font-weight: var(--font-normal);
|
|
}
|
|
|
|
/* 날짜/시간/날씨 박스 */
|
|
.datetime-weather-box {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-4);
|
|
background: rgba(255, 255, 255, 0.1);
|
|
backdrop-filter: blur(10px);
|
|
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
border-radius: var(--radius-xl);
|
|
padding: var(--space-2) var(--space-5);
|
|
}
|
|
|
|
.date-time-section {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
padding-right: var(--space-4);
|
|
border-right: 1px solid rgba(255, 255, 255, 0.2);
|
|
}
|
|
|
|
.date-value {
|
|
font-size: var(--text-sm);
|
|
opacity: 0.9;
|
|
margin-bottom: 2px;
|
|
}
|
|
|
|
.time-value {
|
|
font-size: var(--text-xl);
|
|
font-weight: var(--font-bold);
|
|
font-family: 'Courier New', monospace;
|
|
}
|
|
|
|
.weather-section {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-2);
|
|
}
|
|
|
|
.weather-icon {
|
|
font-size: 1.75rem;
|
|
}
|
|
|
|
.weather-temp {
|
|
font-size: var(--text-lg);
|
|
font-weight: var(--font-bold);
|
|
}
|
|
|
|
.weather-desc {
|
|
font-size: var(--text-sm);
|
|
opacity: 0.9;
|
|
}
|
|
|
|
.header-right .user-profile {
|
|
position: relative;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-3);
|
|
background: rgba(255, 255, 255, 0.1);
|
|
backdrop-filter: blur(10px);
|
|
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
border-radius: var(--radius-full);
|
|
padding: var(--space-2) var(--space-4);
|
|
cursor: pointer;
|
|
transition: var(--transition-normal);
|
|
}
|
|
|
|
.user-profile:hover {
|
|
background: rgba(255, 255, 255, 0.2);
|
|
}
|
|
|
|
.user-avatar {
|
|
width: 40px;
|
|
height: 40px;
|
|
border-radius: var(--radius-full);
|
|
background: var(--primary-200);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-weight: var(--font-bold);
|
|
color: var(--primary-900);
|
|
}
|
|
|
|
.user-info {
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.user-name {
|
|
font-size: var(--text-sm);
|
|
font-weight: var(--font-semibold);
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.user-role {
|
|
font-size: var(--text-xs);
|
|
opacity: 0.8;
|
|
}
|
|
|
|
.profile-menu {
|
|
position: absolute;
|
|
top: 100%;
|
|
right: 0;
|
|
margin-top: var(--space-2);
|
|
background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
|
|
border-radius: var(--radius-lg);
|
|
box-shadow: var(--shadow-xl);
|
|
border: 2px solid rgba(14, 165, 233, 0.2);
|
|
min-width: 220px;
|
|
opacity: 0;
|
|
visibility: hidden;
|
|
transform: translateY(-10px);
|
|
transition: var(--transition-slow);
|
|
z-index: 1000;
|
|
backdrop-filter: blur(20px);
|
|
}
|
|
|
|
.user-profile:hover .profile-menu,
|
|
.profile-menu:hover {
|
|
opacity: 1;
|
|
visibility: visible;
|
|
transform: translateY(0);
|
|
}
|
|
|
|
.menu-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-3);
|
|
padding: var(--space-3) var(--space-5);
|
|
color: var(--text-secondary);
|
|
text-decoration: none;
|
|
border: none;
|
|
background: transparent;
|
|
width: 100%;
|
|
text-align: left;
|
|
font-size: var(--text-sm);
|
|
font-weight: var(--font-medium);
|
|
cursor: pointer;
|
|
transition: var(--transition-slow);
|
|
border-radius: var(--radius-md);
|
|
margin: var(--space-1);
|
|
font-family: inherit;
|
|
}
|
|
|
|
.menu-item:hover {
|
|
background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
|
|
color: var(--text-primary);
|
|
transform: translateX(2px);
|
|
}
|
|
|
|
.menu-item:first-child {
|
|
border-radius: var(--radius-md);
|
|
margin-top: var(--space-2);
|
|
}
|
|
|
|
.menu-item:last-child {
|
|
border-radius: var(--radius-md);
|
|
margin-bottom: var(--space-2);
|
|
}
|
|
|
|
.menu-icon {
|
|
font-size: var(--text-lg);
|
|
width: 1.5rem;
|
|
text-align: center;
|
|
opacity: 0.8;
|
|
}
|
|
|
|
.menu-item:hover .menu-icon {
|
|
opacity: 1;
|
|
}
|
|
|
|
.logout-btn {
|
|
color: var(--error-500) !important;
|
|
border-top: 1px solid var(--border-light);
|
|
margin-top: var(--space-2);
|
|
padding-top: var(--space-3);
|
|
font-weight: var(--font-semibold);
|
|
}
|
|
|
|
.logout-btn:hover {
|
|
background: linear-gradient(135deg, var(--error-50), #fee2e2) !important;
|
|
color: var(--error-700) !important;
|
|
}
|
|
|
|
/* 대시보드 버튼 */
|
|
.dashboard-btn {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-2);
|
|
padding: var(--space-2) var(--space-5);
|
|
background: rgba(255, 255, 255, 0.2);
|
|
color: white;
|
|
text-decoration: none;
|
|
border-radius: var(--radius-lg);
|
|
font-weight: var(--font-semibold);
|
|
font-size: var(--text-sm);
|
|
transition: var(--transition-slow);
|
|
border: 1px solid rgba(255, 255, 255, 0.3);
|
|
backdrop-filter: blur(10px);
|
|
}
|
|
|
|
.dashboard-btn:hover {
|
|
background: rgba(255, 255, 255, 0.3);
|
|
transform: translateY(-2px);
|
|
box-shadow: var(--shadow-md);
|
|
}
|
|
|
|
.dashboard-btn .btn-icon {
|
|
font-size: var(--text-lg);
|
|
}
|
|
|
|
.dashboard-btn .btn-text {
|
|
font-family: inherit;
|
|
}
|
|
|
|
/* 신고 버튼 */
|
|
.report-btn {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-2);
|
|
padding: var(--space-2) var(--space-5);
|
|
background: rgba(239, 68, 68, 0.9);
|
|
color: white;
|
|
text-decoration: none;
|
|
border-radius: var(--radius-lg);
|
|
font-weight: var(--font-semibold);
|
|
font-size: var(--text-sm);
|
|
transition: var(--transition-slow);
|
|
border: 1px solid rgba(255, 255, 255, 0.3);
|
|
backdrop-filter: blur(10px);
|
|
}
|
|
|
|
.report-btn:hover {
|
|
background: rgba(220, 38, 38, 1);
|
|
transform: translateY(-2px);
|
|
box-shadow: var(--shadow-md);
|
|
}
|
|
|
|
.report-btn .btn-icon {
|
|
font-size: var(--text-lg);
|
|
}
|
|
|
|
.report-btn .btn-text {
|
|
font-family: inherit;
|
|
}
|
|
|
|
/* 반응형 디자인 */
|
|
@media (max-width: 768px) {
|
|
.dashboard-header {
|
|
padding: var(--space-3) var(--space-4);
|
|
}
|
|
|
|
.brand-title {
|
|
font-size: var(--text-lg);
|
|
}
|
|
|
|
.brand-subtitle {
|
|
font-size: var(--text-xs);
|
|
}
|
|
|
|
.header-center {
|
|
display: none;
|
|
}
|
|
|
|
.user-info {
|
|
display: none;
|
|
}
|
|
|
|
.dashboard-btn .btn-text,
|
|
.report-btn .btn-text {
|
|
display: none;
|
|
}
|
|
|
|
.dashboard-btn,
|
|
.report-btn {
|
|
padding: var(--space-2) var(--space-3);
|
|
}
|
|
}
|
|
</style> |