From d450ff3cbcfebe796f0b80c61217639a5af0c432 Mon Sep 17 00:00:00 2001 From: Hyungi Ahn Date: Sat, 25 Oct 2025 14:37:10 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EA=B4=80=EB=A6=AC=ED=95=A8=20=EA=B0=9C?= =?UTF-8?q?=EC=84=A0=20-=20=EB=8D=B0=EC=9D=B4=ED=84=B0=20=ED=95=84?= =?UTF-8?q?=ED=84=B0=EB=A7=81=20=EB=B0=8F=20=ED=83=AD=20=EA=B5=AC=EC=A1=B0?= =?UTF-8?q?=20=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ๐Ÿ“Š Data Filtering Improvements: - ๊ด€๋ฆฌํ•จ์—์„œ ์ˆ˜์‹ ํ•จ์—์„œ ์ฒ˜๋ฆฌ๋œ ํ•ญ๋ชฉ๋งŒ ํ‘œ์‹œ (in_progress, completed) - ์ˆ˜์‹ ํ•จ์˜ pending_review, disposed ์ƒํƒœ ์ œ์™ธ - ์˜ฌ๋ฐ”๋ฅธ ์›Œํฌํ”Œ๋กœ์šฐ ๋ฐ์ดํ„ฐ๋งŒ ๊ด€๋ฆฌํ•จ์—์„œ ์ฒ˜๋ฆฌ ๐ŸŽจ UI Simplification: - ๋ณต์žกํ•œ ํ•„ํ„ฐ ์ œ๊ฑฐ (์ƒํƒœ, ์šฐ์„ ์ˆœ์œ„, ๋‹ด๋‹น์ž, ๊ฒ€์ƒ‰) - ํ”„๋กœ์ ํŠธ ํ•„ํ„ฐ๋งŒ ์œ ์ง€ํ•˜์—ฌ ํ•ต์‹ฌ ๊ธฐ๋Šฅ์— ์ง‘์ค‘ - ๋” ๊น”๋”ํ•˜๊ณ  ์ง๊ด€์ ์ธ ์ธํ„ฐํŽ˜์ด์Šค ๐Ÿ“‹ Status Tabs Implementation: - ํ”„๋กœ์ ํŠธ ์„ ํƒ ์•„๋ž˜์— ์ง„ํ–‰ ์ค‘/์™„๋ฃŒ๋จ ํƒญ ์ถ”๊ฐ€ - ํƒญ ํด๋ฆญ์œผ๋กœ ์ƒํƒœ๋ณ„ ์ด์Šˆ ๋ถ„๋ฆฌ ํ‘œ์‹œ - ์ง„ํ–‰ ์ค‘(ํŒŒ๋ž€์ƒ‰), ์™„๋ฃŒ๋จ(์ดˆ๋ก์ƒ‰) ์‹œ๊ฐ์  ๊ตฌ๋ถ„ - ๋ถ€๋“œ๋Ÿฌ์šด ์ „ํ™˜ ์• ๋‹ˆ๋ฉ”์ด์…˜ ์ ์šฉ ๐Ÿ”ง JavaScript Logic Updates: - currentTab ๋ณ€์ˆ˜๋กœ ํ˜„์žฌ ์„ ํƒ๋œ ํƒญ ์ƒํƒœ ๊ด€๋ฆฌ - switchTab() ํ•จ์ˆ˜๋กœ ํƒญ ์ „ํ™˜ ๋ฐ ์Šคํƒ€์ผ ์—…๋ฐ์ดํŠธ - filterIssues() ํ•จ์ˆ˜์—์„œ review_status ๊ธฐ๋ฐ˜ ํ•„ํ„ฐ๋ง - ๋ถˆํ•„์š”ํ•œ ํ•„ํ„ฐ๋ง ๋กœ์ง ์ œ๊ฑฐ๋กœ ์„ฑ๋Šฅ ๊ฐœ์„  ๐Ÿš€ User Experience: - ํ”„๋กœ์ ํŠธ ์„ ํƒ โ†’ ์ƒํƒœ ํƒญ ์„ ํƒ์œผ๋กœ ๋‹จ์ˆœํ•œ ์›Œํฌํ”Œ๋กœ์šฐ - ์ง„ํ–‰ ์ค‘๊ณผ ์™„๋ฃŒ๋จ ํ•ญ๋ชฉ์„ ๋ช…ํ™•ํžˆ ๋ถ„๋ฆฌ - ๊ด€๋ฆฌํ•จ ๋ณธ์—ฐ์˜ ๋ชฉ์ ์— ๋งž๋Š” ๊ธฐ๋Šฅ ์ง‘์ค‘ Expected Result: โœ… ์ˆ˜์‹ ํ•จ์—์„œ ์ฒ˜๋ฆฌ๋œ ํ•ญ๋ชฉ๋งŒ ๊ด€๋ฆฌํ•จ์— ํ‘œ์‹œ โœ… ํ”„๋กœ์ ํŠธ๋ณ„ ์ง„ํ–‰ ์ค‘/์™„๋ฃŒ๋จ ํƒญ์œผ๋กœ ๋ถ„๋ฆฌ โœ… ๋ถˆํ•„์š”ํ•œ ํ•„ํ„ฐ ์ œ๊ฑฐ๋กœ ๋‹จ์ˆœํ™”๋œ UI โœ… ์ง๊ด€์ ์ธ ํƒญ ๊ธฐ๋ฐ˜ ์ƒํƒœ ๊ด€๋ฆฌ --- frontend/issues-management.html | 108 ++++++++++++++------------------ 1 file changed, 46 insertions(+), 62 deletions(-) diff --git a/frontend/issues-management.html b/frontend/issues-management.html index 6071939..f91c5a5 100644 --- a/frontend/issues-management.html +++ b/frontend/issues-management.html @@ -145,55 +145,29 @@ - +
-
- -
+
+ +
- -
- - -
- - -
- - -
- - -
- - -
- - -
- - + +
+ +
@@ -283,6 +257,7 @@ let filteredIssues = []; let selectedIssues = new Set(); let currentIssueId = null; + let currentTab = 'in_progress'; // ๊ธฐ๋ณธ๊ฐ’: ์ง„ํ–‰ ์ค‘ // API ๋กœ๋“œ ํ›„ ์ดˆ๊ธฐํ™” ํ•จ์ˆ˜ async function initializeManagement() { @@ -343,12 +318,7 @@ // ๋ถ€์ ํ•ฉ ๋ชฉ๋ก ๋กœ๋“œ (๊ด€๋ฆฌ์ž๋Š” ๋ชจ๋“  ๋ถ€์ ํ•ฉ ์กฐํšŒ) async function loadIssues() { try { - let endpoint = '/api/issues/'; - - // ๊ด€๋ฆฌ์ž์ธ ๊ฒฝ์šฐ ์ „์ฒด ๋ถ€์ ํ•ฉ ์กฐํšŒ API ์‚ฌ์šฉ - if (currentUser.role === 'admin') { - endpoint = '/api/issues/admin/all'; - } + let endpoint = '/api/issues/admin/all'; const response = await fetch(endpoint, { headers: { @@ -358,7 +328,11 @@ }); if (response.ok) { - issues = await response.json(); + const allIssues = await response.json(); + // ๊ด€๋ฆฌํ•จ์—์„œ๋Š” ์ง„ํ–‰ ์ค‘(in_progress)๊ณผ ์™„๋ฃŒ๋จ(completed) ์ƒํƒœ๋งŒ ํ‘œ์‹œ + issues = allIssues.filter(issue => + issue.review_status === 'in_progress' || issue.review_status === 'completed' + ); filterIssues(); updateStatistics(); } else { @@ -370,25 +344,35 @@ } } + // ํƒญ ์ „ํ™˜ ํ•จ์ˆ˜ + function switchTab(tab) { + currentTab = tab; + + // ํƒญ ๋ฒ„ํŠผ ์Šคํƒ€์ผ ์—…๋ฐ์ดํŠธ + const inProgressTab = document.getElementById('inProgressTab'); + const completedTab = document.getElementById('completedTab'); + + if (tab === 'in_progress') { + inProgressTab.className = 'flex-1 px-4 py-2 text-sm font-medium rounded-md transition-colors duration-200 bg-blue-500 text-white'; + completedTab.className = 'flex-1 px-4 py-2 text-sm font-medium rounded-md transition-colors duration-200 text-gray-600 hover:text-gray-900'; + } else { + inProgressTab.className = 'flex-1 px-4 py-2 text-sm font-medium rounded-md transition-colors duration-200 text-gray-600 hover:text-gray-900'; + completedTab.className = 'flex-1 px-4 py-2 text-sm font-medium rounded-md transition-colors duration-200 bg-green-500 text-white'; + } + + filterIssues(); + } + // ํ•„ํ„ฐ๋ง ๋ฐ ํ‘œ์‹œ ํ•จ์ˆ˜๋“ค function filterIssues() { const projectFilter = document.getElementById('projectFilter').value; - const statusFilter = document.getElementById('statusFilter').value; - const priorityFilter = document.getElementById('priorityFilter').value; - const assigneeFilter = document.getElementById('assigneeFilter').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 (priorityFilter && issue.priority !== priorityFilter) return false; - if (assigneeFilter === 'unassigned' && issue.assignee_id) return false; - if (assigneeFilter && assigneeFilter !== 'unassigned' && issue.assignee_id != assigneeFilter) return false; + // ํ˜„์žฌ ํƒญ์— ๋”ฐ๋ฅธ ์ƒํƒœ ํ•„ํ„ฐ๋ง + if (issue.review_status !== currentTab) return false; - if (searchInput) { - const searchText = `${issue.description} ${issue.reporter?.username || ''}`.toLowerCase(); - if (!searchText.includes(searchInput)) return false; - } + // ํ”„๋กœ์ ํŠธ ํ•„ํ„ฐ๋ง + if (projectFilter && issue.project_id != projectFilter) return false; return true; });