From 5f0304168abda4400ba6b831b216bbe112752fe8 Mon Sep 17 00:00:00 2001 From: MattCarolus10 Date: Thu, 12 Nov 2026 22:08:22 +0000 Subject: [PATCH 01/12] Add button to delete completed tasks in the ToDo list --- Sprint-3/todo-list/index.html | 1 + 1 file changed, 1 insertion(+) diff --git a/Sprint-3/todo-list/index.html b/Sprint-3/todo-list/index.html index 4d12c46543..54c6ec4ae5 100644 --- a/Sprint-3/todo-list/index.html +++ b/Sprint-3/todo-list/index.html @@ -20,6 +20,7 @@

My ToDo List

+ - - - - + + + From ad4c77b9750b0f712367b3e632eecf7be00c4db0 Mon Sep 17 00:00:00 2001 From: MattCarolus10 Date: Thu, 12 Nov 2026 23:08:25 +0000 Subject: [PATCH 09/12] Add deadline parameter to addTask function for enhanced task management --- Sprint-3/todo-list/todos.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sprint-3/todo-list/todos.mjs b/Sprint-3/todo-list/todos.mjs index d2ad7896c1..d1c6097a52 100644 --- a/Sprint-3/todo-list/todos.mjs +++ b/Sprint-3/todo-list/todos.mjs @@ -10,8 +10,8 @@ */ // Append a new task to todos[] -export function addTask(todos, task, completed = false) { - todos.push({ task, completed }); +export function addTask(todos, task, completed = false, deadline = "") { + todos.push({ task, completed, deadline }); } // Delete todos[taskIndex] if it exists From 8aafe8a8f7ceb47083eeae7c08e00049b9c02c2e Mon Sep 17 00:00:00 2001 From: MattCarolus10 Date: Thu, 12 Nov 2026 23:31:22 +0000 Subject: [PATCH 10/12] Add deadline parameter to addNewTodo function for task management --- Sprint-3/todo-list/script.mjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sprint-3/todo-list/script.mjs b/Sprint-3/todo-list/script.mjs index a8661d9f50..f264e545c0 100644 --- a/Sprint-3/todo-list/script.mjs +++ b/Sprint-3/todo-list/script.mjs @@ -26,8 +26,9 @@ window.addEventListener("load", () => { function addNewTodo() { const taskInput = document.getElementById("new-task-input"); const task = taskInput.value.trim(); + const deadline = document.getElementById("deadline-input").value; if (task) { - Todos.addTask(todos, task, false); + Todos.addTask(todos, task, false, deadline); render(); } From 7d9d81aadaeb96b61de78b0aedacde84ef87cef3 Mon Sep 17 00:00:00 2001 From: MattCarolus10 Date: Fri, 13 Nov 2026 00:13:31 +0000 Subject: [PATCH 11/12] Display task deadline in todo list items --- Sprint-3/todo-list/script.mjs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Sprint-3/todo-list/script.mjs b/Sprint-3/todo-list/script.mjs index f264e545c0..df01ebbe54 100644 --- a/Sprint-3/todo-list/script.mjs +++ b/Sprint-3/todo-list/script.mjs @@ -63,6 +63,9 @@ function createListItem(todo, index) { const li = todoListItemTemplate.cloneNode(true); // true => Do a deep copy of the node li.querySelector(".description").textContent = todo.task; + if (todo.deadline) { + li.querySelector(".description").textContent += "-" + todo.deadline; + } if (todo.completed) { li.classList.add("completed"); } From aef7d52edb4f16d27032c4154bf1d640b4a5f91f Mon Sep 17 00:00:00 2001 From: MattCarolus10 Date: Fri, 13 Nov 2026 00:23:00 +0000 Subject: [PATCH 12/12] Add deadline property to mock task for testing consistency --- Sprint-3/todo-list/todos.test.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sprint-3/todo-list/todos.test.mjs b/Sprint-3/todo-list/todos.test.mjs index 4375bbe170..f22e0cc0be 100644 --- a/Sprint-3/todo-list/todos.test.mjs +++ b/Sprint-3/todo-list/todos.test.mjs @@ -18,7 +18,7 @@ function createMockTodos() { } // A mock task to simulate user input -const theTask = { task: "The Task", completed: false }; +const theTask = { task: "The Task", completed: false, deadline: "" }; describe("addTask()", () => { test("Add a task to an empty ToDo list", () => {