TODO 일정 변경 디버깅: 콘솔 로그 추가하여 문제 진단
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user