working leantime widget 104
This commit is contained in:
parent
45d115f503
commit
607809b850
@ -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");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user