Skip to content

Commit

Permalink
UI bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fawzi-iit committed Dec 3, 2023
1 parent e948bbd commit 7b9a06a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions public/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ document.addEventListener('DOMContentLoaded', function() {
event.preventDefault();
loadProjects();
hideCreateProjectForm();
hideCreateTaskForm();
});

// Event listener for the 'Create Project' link
Expand Down Expand Up @@ -133,10 +134,9 @@ function attachProjectClickHandlers() {
projectLink.addEventListener('click', function(event) {
event.preventDefault();
const projectId = this.getAttribute('data-projectid');
console.log("Clicked project ID:", this.getAttribute('data-projectid'));
currentProjectId = this.getAttribute('data-projectid');
fetchTasksForProject(currentProjectId);
showCreateTaskForm();
console.log("Clicked project ID:", projectId);
fetchTasksForProject(projectId);
showCreateTaskForm(projectId); // Pass projectId to the function
showBackButton();
});
});
Expand Down

0 comments on commit 7b9a06a

Please sign in to comment.