feat(frontend): 프로젝트 분석 페이지 전체 리팩토링

- 600줄에 달하는 project-analysis.js를 API, Data, UI, Controller 네 개의 모듈로 분리
- 복잡한 데이터 처리 로직과 UI 렌더링 로직을 분리하여 유지보수성 극대화
- 전역 상태를 최소화하고 데이터 흐름을 명확하게 개선
This commit is contained in:
2025-07-28 14:43:22 +09:00
parent 7c5a985166
commit 187c3fec07
2 changed files with 10 additions and 10 deletions

View File

@@ -15,10 +15,10 @@ async function searchReports() {
const dateInput = document.getElementById('reportDate');
const selectedDate = dateInput.value;
if (!selectedDate) {
if (!selectedDate) {
showError('날짜를 선택해주세요.');
return;
}
return;
}
showLoading(true);
currentProcessedData = null; // 새 검색이 시작되면 이전 데이터 초기화
@@ -27,11 +27,11 @@ async function searchReports() {
const rawData = await fetchReportData(selectedDate);
currentProcessedData = processReportData(rawData, selectedDate);
renderReport(currentProcessedData);
} catch (error) {
} catch (error) {
showError(error.message);
renderReport(null); // 에러 발생 시 데이터 없는 화면 표시
} finally {
showLoading(false);
} finally {
showLoading(false);
}
}