diff --git a/backend/__pycache__/main.cpython-311.pyc b/backend/__pycache__/main.cpython-311.pyc index ba44a63..693e096 100644 Binary files a/backend/__pycache__/main.cpython-311.pyc and b/backend/__pycache__/main.cpython-311.pyc differ diff --git a/backend/database/__pycache__/database.cpython-311.pyc b/backend/database/__pycache__/database.cpython-311.pyc index 8e59265..44c2a05 100644 Binary files a/backend/database/__pycache__/database.cpython-311.pyc and b/backend/database/__pycache__/database.cpython-311.pyc differ diff --git a/backend/database/__pycache__/models.cpython-311.pyc b/backend/database/__pycache__/models.cpython-311.pyc index b9ca9e2..dd97620 100644 Binary files a/backend/database/__pycache__/models.cpython-311.pyc and b/backend/database/__pycache__/models.cpython-311.pyc differ diff --git a/backend/database/__pycache__/schemas.cpython-311.pyc b/backend/database/__pycache__/schemas.cpython-311.pyc index b07a5ff..1576070 100644 Binary files a/backend/database/__pycache__/schemas.cpython-311.pyc and b/backend/database/__pycache__/schemas.cpython-311.pyc differ diff --git a/backend/routers/__pycache__/auth.cpython-311.pyc b/backend/routers/__pycache__/auth.cpython-311.pyc index dcd7677..a70b93a 100644 Binary files a/backend/routers/__pycache__/auth.cpython-311.pyc and b/backend/routers/__pycache__/auth.cpython-311.pyc differ diff --git a/backend/routers/__pycache__/daily_work.cpython-311.pyc b/backend/routers/__pycache__/daily_work.cpython-311.pyc index 2b3e23f..1963909 100644 Binary files a/backend/routers/__pycache__/daily_work.cpython-311.pyc and b/backend/routers/__pycache__/daily_work.cpython-311.pyc differ diff --git a/backend/routers/__pycache__/inbox.cpython-311.pyc b/backend/routers/__pycache__/inbox.cpython-311.pyc index 71b14d9..e0b9b15 100644 Binary files a/backend/routers/__pycache__/inbox.cpython-311.pyc and b/backend/routers/__pycache__/inbox.cpython-311.pyc differ diff --git a/backend/routers/__pycache__/issues.cpython-311.pyc b/backend/routers/__pycache__/issues.cpython-311.pyc index 067221c..6440f8a 100644 Binary files a/backend/routers/__pycache__/issues.cpython-311.pyc and b/backend/routers/__pycache__/issues.cpython-311.pyc differ diff --git a/backend/routers/__pycache__/management.cpython-311.pyc b/backend/routers/__pycache__/management.cpython-311.pyc index 97b5d63..0d8402c 100644 Binary files a/backend/routers/__pycache__/management.cpython-311.pyc and b/backend/routers/__pycache__/management.cpython-311.pyc differ diff --git a/backend/routers/__pycache__/page_permissions.cpython-311.pyc b/backend/routers/__pycache__/page_permissions.cpython-311.pyc index 31ea556..179afc9 100644 Binary files a/backend/routers/__pycache__/page_permissions.cpython-311.pyc and b/backend/routers/__pycache__/page_permissions.cpython-311.pyc differ diff --git a/backend/routers/__pycache__/projects.cpython-311.pyc b/backend/routers/__pycache__/projects.cpython-311.pyc index 94c4787..9cdddd0 100644 Binary files a/backend/routers/__pycache__/projects.cpython-311.pyc and b/backend/routers/__pycache__/projects.cpython-311.pyc differ diff --git a/backend/routers/__pycache__/reports.cpython-311.pyc b/backend/routers/__pycache__/reports.cpython-311.pyc index aa0ab6d..030083c 100644 Binary files a/backend/routers/__pycache__/reports.cpython-311.pyc and b/backend/routers/__pycache__/reports.cpython-311.pyc differ diff --git a/backend/routers/management.py b/backend/routers/management.py index 0ee0ac8..021a508 100644 --- a/backend/routers/management.py +++ b/backend/routers/management.py @@ -76,6 +76,18 @@ async def update_issue( import traceback traceback.print_exc() continue + elif field == 'final_description' and value: + # final_description 업데이트 시 description도 함께 업데이트 + issue.final_description = value + issue.description = value + print(f"✅ final_description 및 description 업데이트: {value[:50]}...") + continue + elif field == 'final_category' and value: + # final_category 업데이트 시 category도 함께 업데이트 + issue.final_category = value + issue.category = value + print(f"✅ final_category 및 category 업데이트: {value}") + continue elif field == 'expected_completion_date' and value: # 날짜 필드 처리 if not value.endswith('T00:00:00'): diff --git a/backend/services/__pycache__/auth_service.cpython-311.pyc b/backend/services/__pycache__/auth_service.cpython-311.pyc index 0e0ad90..fa1fa55 100644 Binary files a/backend/services/__pycache__/auth_service.cpython-311.pyc and b/backend/services/__pycache__/auth_service.cpython-311.pyc differ diff --git a/backend/services/__pycache__/file_service.cpython-311.pyc b/backend/services/__pycache__/file_service.cpython-311.pyc index 204bcbc..73dfb69 100644 Binary files a/backend/services/__pycache__/file_service.cpython-311.pyc and b/backend/services/__pycache__/file_service.cpython-311.pyc differ diff --git a/frontend/app.html b/frontend/app.html index 31541bc..3c82d63 100644 --- a/frontend/app.html +++ b/frontend/app.html @@ -183,7 +183,7 @@
- @@ -296,44 +296,6 @@
- - diff --git a/frontend/index.html b/frontend/index.html index cdd5e8a..8f4140c 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -1192,8 +1192,8 @@ console.log('=== 프로젝트 로드 시작 (API) ==='); try { - // API에서 프로젝트 로드 (인증 없이) - const apiProjects = await ProjectsAPI.getAll(false); + // API에서 활성 프로젝트만 로드 (업로드용) + const apiProjects = await ProjectsAPI.getAll(true); // API 데이터를 UI 형식으로 변환 const projects = apiProjects.map(p => ({ diff --git a/frontend/issues-archive.html b/frontend/issues-archive.html index e070e84..a7a2b3b 100644 --- a/frontend/issues-archive.html +++ b/frontend/issues-archive.html @@ -322,9 +322,9 @@ if (response.ok) { const allIssues = await response.json(); - // 완료, 보관, 취소된 부적합만 필터링 + // 폐기된 부적합만 필터링 (폐기함 전용) issues = allIssues.filter(issue => - ['completed', 'archived', 'cancelled'].includes(issue.status) + issue.review_status === 'disposed' ); filterIssues(); @@ -422,8 +422,11 @@ container.innerHTML = filteredIssues.map(issue => { const project = projects.find(p => p.id === issue.project_id); - const completedDate = new Date(issue.updated_at || issue.created_at).toLocaleDateString('ko-KR'); - const cardClass = issue.status === 'completed' ? 'completed-card' : 'archived-card'; + + // 폐기함은 폐기된 것만 표시 + const completedDate = issue.disposed_at ? new Date(issue.disposed_at).toLocaleDateString('ko-KR') : 'Invalid Date'; + const statusText = '폐기'; + const cardClass = 'archived-card'; return `
${issue.reporter?.username || '알 수 없음'} ${issue.category ? `${getCategoryText(issue.category)}` : ''} - 완료: ${completedDate} + ${statusText}: ${completedDate}
diff --git a/frontend/issues-dashboard.html b/frontend/issues-dashboard.html index 0483cbd..db4c719 100644 --- a/frontend/issues-dashboard.html +++ b/frontend/issues-dashboard.html @@ -423,22 +423,29 @@ emptyState.classList.add('hidden'); - // 날짜별로 그룹화 + // 날짜별로 그룹화 (관리함 진입일 기준) const groupedByDate = {}; + const dateObjects = {}; // 정렬용 Date 객체 저장 + filteredIssues.forEach(issue => { - const dateKey = new Date(issue.report_date).toLocaleDateString('ko-KR'); + // reviewed_at이 있으면 관리함 진입일, 없으면 report_date 사용 + const dateToUse = issue.reviewed_at || issue.report_date; + const dateObj = new Date(dateToUse); + const dateKey = dateObj.toLocaleDateString('ko-KR'); + if (!groupedByDate[dateKey]) { groupedByDate[dateKey] = []; + dateObjects[dateKey] = dateObj; } groupedByDate[dateKey].push(issue); }); // 날짜별 그룹 생성 const dateGroups = Object.keys(groupedByDate) - .sort((a, b) => new Date(b) - new Date(a)) // 최신순 + .sort((a, b) => dateObjects[b] - dateObjects[a]) // 최신순 .map(dateKey => { const issues = groupedByDate[dateKey]; - const formattedDate = new Date(dateKey).toLocaleDateString('ko-KR', { + const formattedDate = dateObjects[dateKey].toLocaleDateString('ko-KR', { year: 'numeric', month: '2-digit', day: '2-digit' @@ -451,7 +458,7 @@ ${formattedDate} (${issues.length}건) - 업로드일 + 관리함 진입일
@@ -468,14 +475,14 @@ // 부적합명 추출 (첫 번째 줄) function getIssueTitle(issue) { - const description = issue.final_description || issue.description || ''; + const description = issue.description || issue.final_description || ''; const lines = description.split('\n'); return lines[0] || '부적합명 없음'; } // 상세 내용 추출 (두 번째 줄부터) function getIssueDetail(issue) { - const description = issue.final_description || issue.description || ''; + const description = issue.description || issue.final_description || ''; const lines = description.split('\n'); return lines.slice(1).join('\n') || '상세 내용 없음'; } @@ -605,7 +612,7 @@
- ${getCategoryText(issue.final_category || issue.category)} + ${getCategoryText(issue.category || issue.final_category)}
@@ -838,7 +845,7 @@ if (selectedProject) { filterByProject(); } else { - loadDashboardData(); + initializeDashboard(); } } diff --git a/frontend/issues-inbox.html b/frontend/issues-inbox.html index 87fb7e2..dbc69d3 100644 --- a/frontend/issues-inbox.html +++ b/frontend/issues-inbox.html @@ -812,7 +812,7 @@ -

${issue.description}

+

${issue.final_description || issue.description}

@@ -822,7 +822,7 @@
- ${getCategoryText(issue.category)} + ${getCategoryText(issue.category || issue.final_category)}
@@ -1075,10 +1075,10 @@
- ${issue.description} + ${issue.description || issue.final_description}
- ${getCategoryText(issue.category)} + ${getCategoryText(issue.category || issue.final_category)} 신고자: ${issue.reporter_name} ${issue.duplicate_count > 0 ? `중복 ${issue.duplicate_count}건` : ''}
@@ -1176,8 +1176,8 @@ originalInfo.innerHTML = `
프로젝트: ${project ? project.project_name : '미지정'}
-
카테고리: ${getCategoryText(issue.category)}
-
설명: ${issue.description}
+
카테고리: ${getCategoryText(issue.category || issue.final_category)}
+
설명: ${issue.description || issue.final_description}
등록자: ${issue.reporter?.username || '알 수 없음'}
등록일: ${new Date(issue.report_date).toLocaleDateString('ko-KR')}
@@ -1196,12 +1196,13 @@ reviewProjectSelect.appendChild(option); }); - // 현재 값들로 폼 초기화 - document.getElementById('reviewCategory').value = issue.category; - // 기존 description을 title과 description으로 분리 (첫 번째 줄을 title로 사용) - const lines = issue.description.split('\n'); + // 현재 값들로 폼 초기화 (최신 내용 우선 사용) + document.getElementById('reviewCategory').value = issue.category || issue.final_category; + // 최신 description을 title과 description으로 분리 (첫 번째 줄을 title로 사용) + const currentDescription = issue.description || issue.final_description; + const lines = currentDescription.split('\n'); document.getElementById('reviewTitle').value = lines[0] || ''; - document.getElementById('reviewDescription').value = lines.slice(1).join('\n') || issue.description; + document.getElementById('reviewDescription').value = lines.slice(1).join('\n') || currentDescription; document.getElementById('reviewModal').classList.remove('hidden'); } diff --git a/frontend/issues-management.html b/frontend/issues-management.html index bcda536..1a44b4c 100644 --- a/frontend/issues-management.html +++ b/frontend/issues-management.html @@ -693,14 +693,14 @@ // 부적합명 추출 (첫 번째 줄) function getIssueTitle(issue) { - const description = issue.final_description || issue.description || ''; + const description = issue.description || issue.final_description || ''; const lines = description.split('\n'); return lines[0] || '부적합명 없음'; } // 상세 내용 추출 (두 번째 줄부터) function getIssueDetail(issue) { - const description = issue.final_description || issue.description || ''; + const description = issue.description || issue.final_description || ''; const lines = description.split('\n'); return lines.slice(1).join('\n') || '상세 내용 없음'; } @@ -833,7 +833,7 @@
- ${getCategoryText(issue.final_category || issue.category)} + ${getCategoryText(issue.category || issue.final_category)}
diff --git a/frontend/project-management.html b/frontend/project-management.html index 7820d55..e7c23b2 100644 --- a/frontend/project-management.html +++ b/frontend/project-management.html @@ -142,6 +142,24 @@
+ + +
+
+
+ +

비활성화된 프로젝트

+ 0 +
+
+ 클릭하여 펼치기/접기 +
+
+ +
+ +
+
@@ -170,40 +188,50 @@ console.log('🚀 캐시 버스터:', cacheBuster); - +