Fix an issue with check to done task not moving to completed

This commit is contained in:
Chris Veleris 2025-07-22 21:41:14 +03:00 committed by Chris
parent ec428673a1
commit 3fdc31fb65
15 changed files with 700 additions and 187 deletions

View file

@ -122,9 +122,6 @@ const ProjectDetails: React.FC = () => {
localStorage.getItem('project_order_by') ||
'created_at:desc';
console.log(
`Fetching ONLY project ${id} with fetchProjectById`
);
const projectData = await fetchProjectById(id, {
sort: sortParam,
// Remove completed parameter since backend filtering isn't working
@ -171,6 +168,7 @@ const ProjectDetails: React.FC = () => {
name: taskName,
status: 'not_started',
project_id: project.id,
completed_at: null,
});
setTasks([...tasks, newTask]);
@ -318,6 +316,7 @@ const ProjectDetails: React.FC = () => {
status: 'not_started',
project_id: projectId,
priority: 'medium',
completed_at: null,
});
// Update the tasks list to include the new task