-
부적합 목록
+
신고 목록
정렬:
@@ -550,6 +521,7 @@
// 프로젝트 로드
async function loadProjects() {
+ console.log('🔄 프로젝트 로드 시작');
try {
const response = await fetch('/api/projects/', {
headers: {
@@ -558,12 +530,18 @@
}
});
+ console.log('📡 프로젝트 API 응답 상태:', response.status);
+
if (response.ok) {
projects = await response.json();
+ console.log('✅ 프로젝트 로드 성공:', projects.length, '개');
+ console.log('📋 프로젝트 목록:', projects);
updateProjectFilter();
+ } else {
+ console.error('❌ 프로젝트 API 응답 실패:', response.status, response.statusText);
}
} catch (error) {
- console.error('프로젝트 로드 실패:', error);
+ console.error('❌ 프로젝트 로드 실패:', error);
}
}
@@ -575,7 +553,7 @@
projects.forEach(project => {
const option = document.createElement('option');
option.value = project.id;
- option.textContent = project.name;
+ option.textContent = project.project_name;
projectFilter.appendChild(option);
});
}
@@ -621,30 +599,14 @@
}
}
- // 부적합 필터링
+ // 신고 필터링
function filterIssues() {
const projectFilter = document.getElementById('projectFilter').value;
- const statusFilter = document.getElementById('statusFilter').value;
- const readStatusFilter = document.getElementById('readStatusFilter').value;
- const searchInput = document.getElementById('searchInput').value.toLowerCase();
filteredIssues = issues.filter(issue => {
// 프로젝트 필터
if (projectFilter && issue.project_id != projectFilter) return false;
- // 상태 필터
- if (statusFilter && issue.status !== statusFilter) return false;
-
- // 읽음 상태 필터
- if (readStatusFilter === 'read' && !readStatus.has(issue.id)) return false;
- if (readStatusFilter === 'unread' && readStatus.has(issue.id)) return false;
-
- // 검색 필터
- if (searchInput) {
- const searchText = `${issue.description} ${issue.reporter?.username || ''}`.toLowerCase();
- if (!searchText.includes(searchInput)) return false;
- }
-
return true;
});
@@ -652,7 +614,7 @@
displayIssues();
}
- // 부적합 정렬
+ // 신고 정렬
function sortIssues() {
const sortOrder = document.getElementById('sortOrder').value;
@@ -702,7 +664,7 @@
${isUnread ? '
' : '
'}
검토 대기
- ${project ? `
${project.name}` : ''}
+ ${project ? `
${project.project_name}` : ''}
${timeAgo}
@@ -878,7 +840,7 @@
const project = projects.find(p => p.id === issue.project_id);
originalInfo.innerHTML = `
-
프로젝트: ${project ? project.name : '미지정'}
+
프로젝트: ${project ? project.project_name : '미지정'}
카테고리: ${getCategoryText(issue.category)}
설명: ${issue.description}
등록자: ${issue.reporter?.username || '알 수 없음'}
@@ -892,7 +854,7 @@
projects.forEach(project => {
const option = document.createElement('option');
option.value = project.id;
- option.textContent = project.name;
+ option.textContent = project.project_name;
if (project.id === issue.project_id) {
option.selected = true;
}