Show all sprint tasks regardless of project in Kanban
This commit is contained in:
parent
9436308ae8
commit
1ab5911742
@ -89,18 +89,17 @@ export default function Home() {
|
||||
const selectedTask = tasks.find((t) => t.id === selectedTaskId)
|
||||
const projectTasks = selectedProjectId ? getTasksByProject(selectedProjectId) : []
|
||||
|
||||
// Get current active sprint for the selected project
|
||||
// Get current active sprint (across all projects)
|
||||
const now = new Date()
|
||||
const currentSprint = sprints.find((s) =>
|
||||
s.projectId === selectedProjectId &&
|
||||
s.status === 'active' &&
|
||||
new Date(s.startDate) <= now &&
|
||||
new Date(s.endDate) >= now
|
||||
)
|
||||
|
||||
// Filter tasks to only show current sprint tasks in Kanban
|
||||
// Filter tasks to only show current sprint tasks in Kanban (from ALL projects)
|
||||
const sprintTasks = currentSprint
|
||||
? projectTasks.filter((t) => t.sprintId === currentSprint.id)
|
||||
? tasks.filter((t) => t.sprintId === currentSprint.id)
|
||||
: []
|
||||
|
||||
const handleAddProject = () => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user