diff --git a/frontend/issues-management.html b/frontend/issues-management.html index 68c67db..e784b14 100644 --- a/frontend/issues-management.html +++ b/frontend/issues-management.html @@ -167,6 +167,8 @@ font-size: 0.75rem; border-radius: 4px; margin: 2px; + white-space: nowrap; + min-width: fit-content; } .collapse-content { @@ -289,6 +291,38 @@ + +
| No. | -프로젝트 | -내용 | -원인 | -해결방안 | -담당부서 | -담당자 | -조치예상일 | -${currentTab === 'in_progress' ? '완료 확인' : '완료확인일'} | -확인자 | -원인부서 | -의견 | -조치결과 | -업로드 사진 | -완료 사진 | -작업 | + ${createTableHeader()}
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ${issue.project_sequence_no || '-'} | @@ -633,19 +661,8 @@ ${createEditableField('expected_completion_date', issue.expected_completion_date ? issue.expected_completion_date.split('T')[0] : '', 'date', issue.id, true)}- ${isInProgress ? - `` : - (issue.actual_completion_date ? new Date(issue.actual_completion_date).toLocaleDateString('ko-KR') : '-') - } + | -${getReporterNames(issue)} | -- ${createEditableField('cause_department', issue.cause_department || '', 'select', issue.id, true, getDepartmentOptions())} - | -- ${createEditableField('management_comment', issue.management_comment || '', 'textarea', issue.id, true)} - | -${statusText} |
${issue.photo_path ? `
|
-
- ${issue.completion_photo_path ? ` |
@@ -663,6 +677,83 @@ `; } + // 완료됨 행 생성 (입력 여부 표시) + function createCompletedRow(issue, project) { + return ` + | |||||||
| ${issue.project_sequence_no || '-'} | +${project ? project.project_name : '-'} | +${getStatusIcon(issue.final_description || issue.description)} | +${getStatusIcon(getCategoryText(issue.final_category || issue.category))} | +${getStatusIcon(issue.solution)} | +${getStatusIcon(issue.responsible_department)} | +${getStatusIcon(issue.responsible_person)} | +${getStatusIcon(issue.expected_completion_date)} | +${getReporterNames(issue)} | +${getStatusIcon(issue.cause_department)} | +${getStatusIcon(issue.management_comment)} | +${getPhotoStatusIcon(issue.photo_path, issue.photo_path2)} | +${getStatusIcon(issue.completion_photo_path)} | +No. | +프로젝트 | +내용 | +원인 | +해결방안 | +담당부서 | +담당자 | +조치예상일 | +완료 확인 | +업로드 사진 | +작업 | + `; + } else { + // 완료됨 탭 헤더 + return ` +No. | +프로젝트 | +내용 | +원인 | +해결방안 | +담당부서 | +담당자 | +조치예상일 | +확인자 | +원인부서 | +의견 | +업로드 사진 | +완료 사진 | + `; + } + } + // 편집 가능한 필드 생성 함수 function createEditableField(fieldName, value, type, issueId, editable, options = null) { if (!editable) { @@ -888,6 +979,189 @@ } } + // 완료된 이슈 상세보기 모달 함수들 + let currentModalIssueId = null; + + async function openIssueDetailModal(issueId) { + currentModalIssueId = issueId; + const issue = issues.find(i => i.id === issueId); + if (!issue) return; + + const project = projects.find(p => p.id === issue.project_id); + + // 모달 제목 설정 + document.getElementById('modalTitle').textContent = `부적합 No.${issue.project_sequence_no} 상세 정보`; + + // 모달 내용 생성 + const modalContent = document.getElementById('modalContent'); + modalContent.innerHTML = createModalContent(issue, project); + + // 모달 표시 + document.getElementById('issueDetailModal').classList.remove('hidden'); + } + + function closeIssueDetailModal() { + document.getElementById('issueDetailModal').classList.add('hidden'); + currentModalIssueId = null; + } + + function createModalContent(issue, project) { + return ` +