fix(tkqc): 데스크톱 인라인 편집 뷰에 프로젝트 셀렉트 추가

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Hyungi Ahn
2026-03-27 08:08:10 +09:00
parent ac2a2e7eed
commit 02e39f1102

View File

@@ -452,6 +452,15 @@ function createInProgressRow(issue, project) {
<!-- 오른쪽: 편집 가능한 정보 -->
<div class="space-y-4">
<div>
<label class="block text-sm font-medium text-gray-700 mb-2">
<i class="fas fa-folder text-purple-500 mr-1"></i>프로젝트
</label>
<select id="project_id_${issue.id}" class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 ${isPendingCompletion ? 'bg-gray-100 cursor-not-allowed' : ''}" ${isPendingCompletion ? 'disabled' : ''}>
<option value="">선택하세요</option>
${(window._cachedProjects || []).map(p => `<option value="${p.id}"${p.id == issue.project_id ? ' selected' : ''}>${p.project_name || p.job_no}</option>`).join('')}
</select>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-2">
<i class="fas fa-lightbulb text-yellow-500 mr-1"></i>해결방안 (확정)
@@ -881,7 +890,24 @@ async function saveIssueChanges(issueId) {
}
});
console.log('Sending updates:', updates);
// 프로젝트 변경 처리
const projectSelect = document.getElementById(`project_id_${issueId}`);
if (projectSelect) {
const newProjectId = parseInt(projectSelect.value);
const issue = issues.find(i => i.id === issueId);
if (newProjectId && issue && newProjectId !== issue.project_id) {
const projResp = await fetch(`/api/issues/${issueId}`, {
method: 'PUT',
headers: { 'Authorization': `Bearer ${TokenManager.getToken()}`, 'Content-Type': 'application/json' },
body: JSON.stringify({ project_id: newProjectId })
});
if (!projResp.ok) {
const err = await projResp.json();
alert(err.detail || '프로젝트 변경 실패');
return;
}
}
}
// API 호출
const response = await fetch(`/api/issues/${issueId}/management`, {