diff --git a/frontend/issues-management.html b/frontend/issues-management.html index b76104b..73452de 100644 --- a/frontend/issues-management.html +++ b/frontend/issues-management.html @@ -708,6 +708,44 @@ // 진행 중 카드 생성 function createInProgressRow(issue, project) { + // 상태 판별 + const isPendingCompletion = issue.completion_requested_at; + const isOverdue = issue.expected_completion_date && new Date(issue.expected_completion_date) < new Date(); + const isUrgent = issue.expected_completion_date && + (new Date(issue.expected_completion_date) - new Date()) / (1000 * 60 * 60 * 24) <= 3 && + !isOverdue; + + // 상태 설정 + let statusConfig = { + text: '진행 중', + bgColor: 'bg-gradient-to-r from-blue-500 to-blue-600', + icon: 'fas fa-cog fa-spin', + dotColor: 'bg-white' + }; + + if (isPendingCompletion) { + statusConfig = { + text: '완료 대기', + bgColor: 'bg-gradient-to-r from-purple-500 to-purple-600', + icon: 'fas fa-hourglass-half', + dotColor: 'bg-white' + }; + } else if (isOverdue) { + statusConfig = { + text: '지연됨', + bgColor: 'bg-gradient-to-r from-red-500 to-red-600', + icon: 'fas fa-clock', + dotColor: 'bg-white' + }; + } else if (isUrgent) { + statusConfig = { + text: '긴급', + bgColor: 'bg-gradient-to-r from-orange-500 to-orange-600', + icon: 'fas fa-exclamation-triangle', + dotColor: 'bg-white' + }; + } + return `
완료 사진 없음
'} +${issue.completion_comment || '코멘트 없음'}
+${new Date(issue.completion_requested_at).toLocaleString('ko-KR')}
+완료 사진 없음
'} +${issue.completion_comment || '코멘트 없음'}
+${new Date(issue.completion_requested_at).toLocaleString('ko-KR')}
+