feat: 프로젝트 관리 및 비밀번호 변경 기능 개선
주요 변경사항: - 비활성화된 프로젝트 관리 기능 추가 * 프로젝트 관리 페이지에 접을 수 있는 비활성 프로젝트 섹션 추가 * 비활성화된 프로젝트 복구 기능 제공 * 업로드 시에는 활성 프로젝트만 표시되도록 API 호출 분리 - 헤더 비밀번호 변경 기능 완전 구현 * CommonHeader.js에 완전한 비밀번호 변경 모달 구현 * ESC 키 지원, 실시간 유효성 검사, 토스트 메시지 추가 * 중복 코드 제거 및 통일된 함수 호출 구조 - 수신함 수정 내용 표시 문제 해결 * description 우선 표시로 최신 수정 내용 반영 * 관리함에서 final_description/final_category 업데이트 로직 추가 - 현황판 날짜 그룹화 개선 * 업로드일 기준에서 관리함 진입일(reviewed_at) 기준으로 변경 * Invalid Date 오류 해결 - 프로젝트 관리 페이지 JavaScript 오류 수정 * 중복 변수 선언 및 함수 참조 오류 해결 * 페이지 초기화 로직 개선 기술적 개선: - API 호출 최적화 (active_only 매개변수 명시적 전달) - 프론트엔드 표시 우선순위 통일 (description || final_description) - 백엔드 final_* 필드 업데이트 로직 추가
This commit is contained in:
@@ -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 @@
|
||||
<i class="fas fa-chevron-down transition-transform duration-200" id="chevron-${dateKey}"></i>
|
||||
<span class="font-semibold text-gray-800">${formattedDate}</span>
|
||||
<span class="text-sm text-gray-500">(${issues.length}건)</span>
|
||||
<span class="bg-blue-100 text-blue-800 text-xs px-2 py-1 rounded">업로드일</span>
|
||||
<span class="bg-green-100 text-green-800 text-xs px-2 py-1 rounded">관리함 진입일</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="collapse-content mt-4" id="content-${dateKey}">
|
||||
@@ -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 @@
|
||||
<div class="flex items-center space-x-2">
|
||||
<span class="inline-flex items-center bg-gradient-to-r from-yellow-400 to-orange-400 text-white px-2 py-1 rounded-full text-xs font-medium shadow-sm">
|
||||
<i class="fas fa-tag mr-1"></i>
|
||||
${getCategoryText(issue.final_category || issue.category)}
|
||||
${getCategoryText(issue.category || issue.final_category)}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -838,7 +845,7 @@
|
||||
if (selectedProject) {
|
||||
filterByProject();
|
||||
} else {
|
||||
loadDashboardData();
|
||||
initializeDashboard();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user