feat: 부적합명과 상세 내용 분리 시스템 구현

🎯 부적합 정보 구조화 개선:

📝 수신함 검토 모달 개선:
- '설명' → '부적합명' + '상세 내용'으로 분리
- 부적합명: 간단한 제목 (필수 입력)
- 상세 내용: 자세한 설명 (선택 입력)
- 저장 시 첫 번째 줄에 제목, 나머지는 상세 내용으로 결합

🏢 관리함 진행중 페이지 개선:
- No. 옆에 프로젝트명 표시 (작은 글씨)
- 부적합명을 카드 헤더에 큰 제목으로 표시
- '부적합 내용' → '상세 내용'으로 변경
- getIssueTitle(), getIssueDetail() 헬퍼 함수 추가

📊 현황판 페이지 개선:
- No. 옆에 프로젝트명과 카테고리 태그 표시
- 부적합명을 카드 헤더에 제목으로 표시
- '부적합 내용' → '상세 내용'으로 변경
- 동일한 헬퍼 함수로 일관성 유지

💡 핵심 개선사항:
- 정보 계층 구조 명확화 (제목 vs 상세)
- 시각적 가독성 향상 (헤더에 중요 정보 집중)
- 일관된 표시 방식 (수신함 → 관리함 → 현황판)
- 기존 데이터 호환성 유지

🔧 기술적 구현:
- 첫 번째 줄을 제목으로 추출
- 두 번째 줄부터를 상세 내용으로 분리
- 기존 description 필드 활용 (DB 변경 없음)
- 폴백 처리로 안정성 확보

Expected Result:
 부적합 정보의 체계적 관리
 한눈에 파악 가능한 제목 표시
 상세 내용과 요약 정보 분리
 전체 워크플로우 일관성 향상
This commit is contained in:
Hyungi Ahn
2025-10-26 11:48:47 +09:00
parent 61f5720af3
commit 6654cf62bd
3 changed files with 71 additions and 26 deletions

View File

@@ -377,9 +377,15 @@
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-2"></label>
<label class="block text-sm font-medium text-gray-700 mb-2">부적합</label>
<input type="text" id="reviewTitle" class="w-full px-3 py-2 border border-gray-300 rounded-lg"
placeholder="부적합의 간단한 제목을 입력하세요...">
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-2">상세 내용</label>
<textarea id="reviewDescription" rows="4" class="w-full px-3 py-2 border border-gray-300 rounded-lg"
placeholder="부적합 설명을 입력하세요..."></textarea>
placeholder="부적합에 대한 상세한 설명을 입력하세요..."></textarea>
</div>
<div class="flex justify-end space-x-3">
@@ -1192,7 +1198,10 @@
// 현재 값들로 폼 초기화
document.getElementById('reviewCategory').value = issue.category;
document.getElementById('reviewDescription').value = issue.description;
// 기존 description을 title과 description으로 분리 (첫 번째 줄을 title로 사용)
const lines = issue.description.split('\n');
document.getElementById('reviewTitle').value = lines[0] || '';
document.getElementById('reviewDescription').value = lines.slice(1).join('\n') || issue.description;
document.getElementById('reviewModal').classList.remove('hidden');
}
@@ -1209,13 +1218,17 @@
const projectId = document.getElementById('reviewProjectId').value;
const category = document.getElementById('reviewCategory').value;
const title = document.getElementById('reviewTitle').value.trim();
const description = document.getElementById('reviewDescription').value.trim();
if (!description) {
alert('명을 입력해주세요.');
if (!title) {
alert('부적합명을 입력해주세요.');
return;
}
// 부적합명과 상세 내용을 합쳐서 저장 (첫 번째 줄에 제목, 나머지는 상세 내용)
const combinedDescription = title + (description ? '\n' + description : '');
try {
const response = await fetch(`/api/inbox/${currentIssueId}/review`, {
method: 'POST',
@@ -1226,7 +1239,7 @@
body: JSON.stringify({
project_id: projectId ? parseInt(projectId) : null,
category: category,
description: description
description: combinedDescription
})
});