From a2b2e817034fba3444662d87fcd97cd61554e989 Mon Sep 17 00:00:00 2001 From: "kihong.kim" Date: Sun, 1 Feb 2026 01:39:39 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EB=A7=88=EA=B0=90=EC=9D=BC=20=EC=97=86?= =?UTF-8?q?=EB=8A=94=20=ED=95=A0=EC=9D=BC=EB=8F=84=20=EC=99=84=EB=A3=8C=20?= =?UTF-8?q?=EC=97=AC=EB=B6=80=EC=99=80=20=EC=83=81=EA=B4=80=EC=97=86?= =?UTF-8?q?=EC=9D=B4=20=ED=91=9C=EC=8B=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 마감일이 없는 할일은 특정 날짜에 속하지 않으므로 항상 표시 - 완료 체크 시 목록에서 사라지는 버그 수정 --- backend/routes/todos.js | 8 ++++---- flutter_app/lib/services/todo_service.dart | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/backend/routes/todos.js b/backend/routes/todos.js index 1bcf37f..8818fa0 100644 --- a/backend/routes/todos.js +++ b/backend/routes/todos.js @@ -40,7 +40,7 @@ router.get("/today", async (req, res) => { // Show todos that are: // 1. Due today (between start and end of today) - both completed and incomplete // 2. Due in the future (not yet due) - only incomplete - // 3. Have no due date set - only incomplete + // 3. Have no due date set - both completed and incomplete (always show) // Filter out: overdue todos (due date before today) const todos = await Todo.find({ $or: [ @@ -48,9 +48,9 @@ router.get("/today", async (req, res) => { { dueDate: { $gte: start, $lte: end } }, // Future todos - only incomplete { dueDate: { $gt: end }, completed: false }, - // No due date - only incomplete - { dueDate: { $exists: false }, completed: false }, - { dueDate: null, completed: false } + // No due date - always show (completed or not) + { dueDate: { $exists: false } }, + { dueDate: null } ] }).sort({ completed: 1, // Incomplete first diff --git a/flutter_app/lib/services/todo_service.dart b/flutter_app/lib/services/todo_service.dart index 825ca7f..2d5d89f 100644 --- a/flutter_app/lib/services/todo_service.dart +++ b/flutter_app/lib/services/todo_service.dart @@ -39,8 +39,8 @@ class TodoService { // Future date - only show if incomplete return !todo.completed; } - // No due date - only show if incomplete - return !todo.completed; + // No due date - always show (completed or not) + return true; }).toList(); // Sort: incomplete first, then by due date