fix: 관리함 날짜 그룹화 기준 개선 - 상태별 다른 날짜 기준 적용
📅 Date Grouping Logic Improvement: - 진행 중 탭: 업로드한 날짜(report_date) 기준으로 그룹화 - 완료됨 탭: 완료된 날짜(actual_completion_date) 기준으로 그룹화 - 완료일이 없는 경우 업로드일로 폴백 🎨 Visual Indicator Enhancement: - 날짜 헤더에 기준 표시 추가 - 진행 중: '업로드일' 파란색 배지 - 완료됨: '완료일' 초록색 배지 - 사용자가 어떤 기준으로 그룹화되었는지 명확히 인지 가능 🔧 Technical Implementation: - currentTab 상태에 따른 조건부 날짜 선택 - 동적 배지 색상 및 텍스트 적용 - 완료일 없는 경우 안전한 폴백 처리 💡 User Experience: - 진행 중: 언제 업로드되었는지 시간순 확인 - 완료됨: 언제 완료되었는지 완료순 확인 - 각 탭의 목적에 맞는 날짜 기준으로 체계적 관리 Expected Result: ✅ 진행 중 탭에서는 업로드일 기준 그룹화 ✅ 완료됨 탭에서는 완료일 기준 그룹화 ✅ 날짜 헤더에 기준 표시로 명확한 구분 ✅ 상태별 목적에 맞는 시간순 관리
This commit is contained in:
@@ -473,10 +473,19 @@
|
||||
|
||||
emptyState.classList.add('hidden');
|
||||
|
||||
// 날짜별로 그룹화
|
||||
// 날짜별로 그룹화 (상태에 따라 다른 날짜 기준 사용)
|
||||
const groupedByDate = {};
|
||||
filteredIssues.forEach(issue => {
|
||||
const date = new Date(issue.report_date).toLocaleDateString('ko-KR');
|
||||
let date;
|
||||
if (currentTab === 'in_progress') {
|
||||
// 진행 중: 업로드한 날짜 기준
|
||||
date = new Date(issue.report_date).toLocaleDateString('ko-KR');
|
||||
} else {
|
||||
// 완료됨: 완료된 날짜 기준 (없으면 업로드 날짜)
|
||||
const completionDate = issue.actual_completion_date || issue.report_date;
|
||||
date = new Date(completionDate).toLocaleDateString('ko-KR');
|
||||
}
|
||||
|
||||
if (!groupedByDate[date]) {
|
||||
groupedByDate[date] = [];
|
||||
}
|
||||
@@ -496,6 +505,9 @@
|
||||
<i class="fas fa-chevron-down transition-transform duration-200" id="icon-${groupId}"></i>
|
||||
<h3 class="font-semibold text-gray-800">${date}</h3>
|
||||
<span class="text-sm text-gray-500">(${issues.length}건)</span>
|
||||
<span class="text-xs px-2 py-1 rounded-full ${currentTab === 'in_progress' ? 'bg-blue-100 text-blue-600' : 'bg-green-100 text-green-600'}">
|
||||
${currentTab === 'in_progress' ? '업로드일' : '완료일'}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user