Files
M-Project/frontend/app.html
hyungi c16fc53f3b feat: 프로젝트 관리 및 비밀번호 변경 기능 개선
주요 변경사항:
- 비활성화된 프로젝트 관리 기능 추가
  * 프로젝트 관리 페이지에 접을 수 있는 비활성 프로젝트 섹션 추가
  * 비활성화된 프로젝트 복구 기능 제공
  * 업로드 시에는 활성 프로젝트만 표시되도록 API 호출 분리

- 헤더 비밀번호 변경 기능 완전 구현
  * CommonHeader.js에 완전한 비밀번호 변경 모달 구현
  * ESC 키 지원, 실시간 유효성 검사, 토스트 메시지 추가
  * 중복 코드 제거 및 통일된 함수 호출 구조

- 수신함 수정 내용 표시 문제 해결
  * description 우선 표시로 최신 수정 내용 반영
  * 관리함에서 final_description/final_category 업데이트 로직 추가

- 현황판 날짜 그룹화 개선
  * 업로드일 기준에서 관리함 진입일(reviewed_at) 기준으로 변경
  * Invalid Date 오류 해결

- 프로젝트 관리 페이지 JavaScript 오류 수정
  * 중복 변수 선언 및 함수 참조 오류 해결
  * 페이지 초기화 로직 개선

기술적 개선:
- API 호출 최적화 (active_only 매개변수 명시적 전달)
- 프론트엔드 표시 우선순위 통일 (description || final_description)
- 백엔드 final_* 필드 업데이트 로직 추가
2025-10-26 15:28:23 +09:00

307 lines
11 KiB
HTML

<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>작업보고서 시스템</title>
<!-- Tailwind CSS -->
<script src="https://cdn.tailwindcss.com"></script>
<!-- Font Awesome -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<!-- Custom Styles -->
<style>
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
body {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #f0f9ff 100%);
min-height: 100vh;
}
.sidebar {
transition: transform 0.3s ease-in-out;
}
.sidebar.collapsed {
transform: translateX(-100%);
}
.main-content {
transition: margin-left 0.3s ease-in-out;
}
.main-content.expanded {
margin-left: 0;
}
.nav-item {
transition: all 0.2s ease;
}
.nav-item:hover {
background-color: rgba(59, 130, 246, 0.1);
transform: translateX(4px);
}
.nav-item.active {
background-color: #3b82f6;
color: white;
}
.loading-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
display: none;
align-items: center;
justify-content: center;
z-index: 9999;
}
.loading-overlay.active {
display: flex;
}
.card {
background: white;
border-radius: 12px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
transition: all 0.2s ease;
}
.card:hover {
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.btn-primary {
background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
color: white;
transition: all 0.2s ease;
}
.btn-primary:hover {
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}
.input-field {
border: 1px solid #d1d5db;
background: white;
transition: all 0.2s ease;
}
.input-field:focus {
border-color: #3b82f6;
outline: none;
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
/* 모바일 반응형 */
@media (max-width: 768px) {
.sidebar {
position: fixed;
z-index: 1000;
height: 100vh;
}
.main-content {
margin-left: 0 !important;
}
.mobile-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 999;
display: none;
}
.mobile-overlay.active {
display: block;
}
}
</style>
</head>
<body>
<!-- 로딩 오버레이 -->
<div id="loadingOverlay" class="loading-overlay">
<div class="bg-white rounded-xl p-8 text-center">
<div class="mb-4">
<i class="fas fa-spinner fa-spin text-5xl text-blue-500"></i>
</div>
<p class="text-gray-700 font-medium text-lg">처리 중입니다...</p>
<p class="text-gray-500 text-sm mt-2">잠시만 기다려주세요</p>
</div>
</div>
<!-- 모바일 오버레이 -->
<div id="mobileOverlay" class="mobile-overlay" onclick="toggleSidebar()"></div>
<!-- 사이드바 -->
<aside id="sidebar" class="sidebar fixed left-0 top-0 h-full w-64 bg-white shadow-lg z-50">
<!-- 헤더 -->
<div class="p-6 border-b">
<div class="flex items-center justify-between">
<div class="flex items-center">
<i class="fas fa-clipboard-check text-2xl text-blue-500 mr-3"></i>
<h1 class="text-xl font-bold text-gray-800">작업보고서</h1>
</div>
<button onclick="toggleSidebar()" class="md:hidden text-gray-500 hover:text-gray-700">
<i class="fas fa-times"></i>
</button>
</div>
</div>
<!-- 사용자 정보 -->
<div class="p-4 border-b bg-gray-50">
<div class="flex items-center">
<div class="w-10 h-10 bg-blue-500 rounded-full flex items-center justify-center text-white font-semibold">
<span id="userInitial">U</span>
</div>
<div class="ml-3">
<p class="font-medium text-gray-800" id="userDisplayName">사용자</p>
<p class="text-sm text-gray-500" id="userRole">user</p>
</div>
</div>
</div>
<!-- 네비게이션 메뉴 -->
<nav class="p-4">
<ul id="navigationMenu" class="space-y-2">
<!-- 메뉴 항목들이 동적으로 생성됩니다 -->
</ul>
</nav>
<!-- 하단 메뉴 -->
<div class="absolute bottom-0 left-0 right-0 p-4 border-t bg-gray-50">
<button onclick="CommonHeader.showPasswordModal()" class="w-full text-left p-2 rounded-lg hover:bg-gray-100 transition-colors">
<i class="fas fa-key mr-3 text-gray-500"></i>
<span class="text-gray-700">비밀번호 변경</span>
</button>
<button onclick="logout()" class="w-full text-left p-2 rounded-lg hover:bg-red-50 text-red-600 transition-colors mt-2">
<i class="fas fa-sign-out-alt mr-3"></i>
<span>로그아웃</span>
</button>
</div>
</aside>
<!-- 메인 콘텐츠 -->
<main id="mainContent" class="main-content ml-64 min-h-screen">
<!-- 상단 바 -->
<header class="bg-white shadow-sm border-b p-4">
<div class="flex items-center justify-between">
<div class="flex items-center">
<button onclick="toggleSidebar()" class="md:hidden mr-4 text-gray-500 hover:text-gray-700">
<i class="fas fa-bars"></i>
</button>
<h2 id="pageTitle" class="text-xl font-semibold text-gray-800">대시보드</h2>
</div>
<div class="flex items-center space-x-4">
<button class="p-2 text-gray-500 hover:text-gray-700 rounded-lg hover:bg-gray-100">
<i class="fas fa-bell"></i>
</button>
<button class="p-2 text-gray-500 hover:text-gray-700 rounded-lg hover:bg-gray-100">
<i class="fas fa-cog"></i>
</button>
</div>
</div>
</header>
<!-- 페이지 콘텐츠 -->
<div id="pageContent" class="p-6">
<!-- 기본 대시보드 -->
<div id="dashboard" class="space-y-6">
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6">
<!-- 통계 카드들 -->
<div class="card p-6">
<div class="flex items-center justify-between">
<div>
<p class="text-sm text-gray-600">총 부적합 사항</p>
<p class="text-2xl font-bold text-gray-800" id="totalIssues">0</p>
</div>
<div class="w-12 h-12 bg-red-100 rounded-lg flex items-center justify-center">
<i class="fas fa-exclamation-triangle text-red-500"></i>
</div>
</div>
</div>
<div class="card p-6">
<div class="flex items-center justify-between">
<div>
<p class="text-sm text-gray-600">진행 중인 프로젝트</p>
<p class="text-2xl font-bold text-gray-800" id="activeProjects">0</p>
</div>
<div class="w-12 h-12 bg-blue-100 rounded-lg flex items-center justify-center">
<i class="fas fa-folder-open text-blue-500"></i>
</div>
</div>
</div>
<div class="card p-6">
<div class="flex items-center justify-between">
<div>
<p class="text-sm text-gray-600">이번 달 공수</p>
<p class="text-2xl font-bold text-gray-800" id="monthlyHours">0</p>
</div>
<div class="w-12 h-12 bg-green-100 rounded-lg flex items-center justify-center">
<i class="fas fa-clock text-green-500"></i>
</div>
</div>
</div>
<div class="card p-6">
<div class="flex items-center justify-between">
<div>
<p class="text-sm text-gray-600">완료율</p>
<p class="text-2xl font-bold text-gray-800" id="completionRate">0%</p>
</div>
<div class="w-12 h-12 bg-purple-100 rounded-lg flex items-center justify-center">
<i class="fas fa-chart-pie text-purple-500"></i>
</div>
</div>
</div>
</div>
<!-- 최근 활동 -->
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
<div class="card p-6">
<h3 class="text-lg font-semibold text-gray-800 mb-4">최근 부적합 사항</h3>
<div id="recentIssues" class="space-y-3">
<!-- 최근 부적합 사항 목록 -->
</div>
</div>
<div class="card p-6">
<h3 class="text-lg font-semibold text-gray-800 mb-4">프로젝트 현황</h3>
<div id="projectStatus" class="space-y-3">
<!-- 프로젝트 현황 -->
</div>
</div>
</div>
</div>
<!-- 동적 콘텐츠 영역 -->
<div id="dynamicContent" class="hidden">
<!-- 각 모듈의 콘텐츠가 여기에 로드됩니다 -->
</div>
</div>
</main>
<!-- Scripts -->
<script src="/static/js/utils/date-utils.js"></script>
<script src="/static/js/utils/image-utils.js"></script>
<script src="/static/js/core/permissions.js"></script>
<script src="/static/js/app.js"></script>
</body>
</html>