코드 정리 및 UI 개선: 불필요한 파일 제거, 디버그 로그 정리, 프로덕션 설정 개선, 할일관리 헤더 개선

This commit is contained in:
Hyungi Ahn
2025-09-04 11:21:15 +09:00
parent 16eec06b7c
commit f49edaf06b
6 changed files with 25 additions and 3763 deletions

View File

@@ -233,11 +233,7 @@ function todosApp() {
// 할일 일정 설정
async scheduleTodo() {
console.log('🔧 scheduleTodo 호출됨:', this.currentTodo, this.scheduleForm);
if (!this.currentTodo || !this.scheduleForm.start_date) {
console.log('❌ 필수 데이터 누락:', { currentTodo: this.currentTodo, start_date: this.scheduleForm.start_date });
return;
}
if (!this.currentTodo || !this.scheduleForm.start_date) return;
try {
// 선택한 날짜의 총 시간 체크
@@ -273,17 +269,14 @@ function todosApp() {
let response;
// 이미 일정이 설정된 할일인지 확인
console.log('📋 할일 상태 확인:', this.currentTodo.status);
if (this.currentTodo.status === 'draft') {
// 새로 일정 설정
console.log('📅 새로 일정 설정 API 호출');
response = await window.api.post(`/todos/${this.currentTodo.id}/schedule`, {
start_date: startDate.toISOString(),
estimated_minutes: newMinutes
});
} else {
// 기존 일정 지연 (active 상태의 할일)
console.log('🔄 기존 일정 지연 API 호출');
response = await window.api.put(`/todos/${this.currentTodo.id}/delay`, {
delayed_until: startDate.toISOString()
});

View File

@@ -1,92 +0,0 @@
/**
* 간단한 테스트용 documentViewer
*/
window.documentViewer = () => ({
// 기본 상태
loading: false,
error: null,
// 네비게이션
navigation: null,
// 검색
searchQuery: '',
// 데이터
notes: [],
bookmarks: [],
documentLinks: [],
backlinks: [],
// UI 상태
activeFeatureMenu: null,
selectedHighlightColor: '#FFFF00',
// 모달 상태
showLinksModal: false,
showLinkModal: false,
showNotesModal: false,
showBookmarksModal: false,
showBacklinksModal: false,
// 폼 데이터
linkForm: {
target_document_id: '',
selected_text: '',
book_scope: 'same',
target_book_id: '',
link_type: 'document',
target_text: '',
description: ''
},
// 기타 데이터
availableBooks: [],
filteredDocuments: [],
// 초기화
init() {
console.log('🔧 간단한 documentViewer 로드됨');
this.documentId = new URLSearchParams(window.location.search).get('id');
console.log('📋 문서 ID:', this.documentId);
},
// 뒤로가기
goBack() {
console.log('🔙 뒤로가기 클릭됨');
const urlParams = new URLSearchParams(window.location.search);
const fromPage = urlParams.get('from');
if (fromPage === 'index') {
window.location.href = '/index.html';
} else if (fromPage === 'hierarchy') {
window.location.href = '/hierarchy.html';
} else {
window.location.href = '/index.html';
}
},
// 기본 함수들
toggleFeatureMenu(feature) {
console.log('🎯 기능 메뉴 토글:', feature);
this.activeFeatureMenu = this.activeFeatureMenu === feature ? null : feature;
},
searchInDocument() {
console.log('🔍 문서 검색:', this.searchQuery);
},
// 빈 함수들 (오류 방지용)
navigateToDocument() { console.log('네비게이션 함수 호출됨'); },
goToBookContents() { console.log('목차로 이동 함수 호출됨'); },
createHighlightWithColor() { console.log('하이라이트 생성 함수 호출됨'); },
resetTargetSelection() { console.log('타겟 선택 리셋 함수 호출됨'); },
loadDocumentsFromBook() { console.log('서적 문서 로드 함수 호출됨'); },
onTargetDocumentChange() { console.log('타겟 문서 변경 함수 호출됨'); },
openTargetDocumentSelector() { console.log('타겟 문서 선택기 열기 함수 호출됨'); },
saveDocumentLink() { console.log('문서 링크 저장 함수 호출됨'); },
closeLinkModal() { console.log('링크 모달 닫기 함수 호출됨'); },
getSelectedBookTitle() { return '테스트 서적'; }
});
console.log('✅ 테스트용 documentViewer 정의됨');

File diff suppressed because it is too large Load Diff