working leantime widget 104

This commit is contained in:
Alma 2025-04-12 21:52:10 +02:00
parent 45d115f503
commit 607809b850

View File

@ -106,13 +106,13 @@ export function Flow() {
validDate: getEffectiveDate(task)
}));
const filteredTasks = tasksWithDates
.filter(task => task.status !== 3)
// Show all tasks, sorted by date
const sortedTasks = tasksWithDates
.sort((a, b) => a.validDate.getTime() - b.validDate.getTime())
.slice(0, 6);
console.log("Filtered and sorted tasks:", filteredTasks);
setTasks(filteredTasks);
console.log("Sorted tasks:", sortedTasks);
setTasks(sortedTasks);
} catch (error) {
console.error("Error fetching tasks:", error);
setError("Failed to fetch tasks");