From e96f8b92f8e9430e060e1ae8cf2f29ff0244a948 Mon Sep 17 00:00:00 2001 From: Hyungi Ahn Date: Thu, 4 Sep 2025 11:16:47 +0900 Subject: [PATCH] =?UTF-8?q?TODO=20=EC=9D=BC=EC=A0=95=20=EB=B3=80=EA=B2=BD?= =?UTF-8?q?=20=EB=94=94=EB=B2=84=EA=B9=85:=20=EC=BD=98=EC=86=94=20?= =?UTF-8?q?=EB=A1=9C=EA=B7=B8=20=EC=B6=94=EA=B0=80=ED=95=98=EC=97=AC=20?= =?UTF-8?q?=EB=AC=B8=EC=A0=9C=20=EC=A7=84=EB=8B=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/static/js/todos.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/frontend/static/js/todos.js b/frontend/static/js/todos.js index 1e7bb48..b367a27 100644 --- a/frontend/static/js/todos.js +++ b/frontend/static/js/todos.js @@ -233,7 +233,11 @@ function todosApp() { // 할일 일정 설정 async scheduleTodo() { - if (!this.currentTodo || !this.scheduleForm.start_date) return; + 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; + } try { // 선택한 날짜의 총 시간 체크 @@ -269,14 +273,17 @@ 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 { // 기존 일정 수정 + console.log('🔄 기존 일정 수정 API 호출'); response = await window.api.put(`/todos/${this.currentTodo.id}`, { start_date: startDate.toISOString(), estimated_minutes: newMinutes