working leantime widget 104
This commit is contained in:
parent
45d115f503
commit
607809b850
@ -106,13 +106,13 @@ export function Flow() {
|
|||||||
validDate: getEffectiveDate(task)
|
validDate: getEffectiveDate(task)
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const filteredTasks = tasksWithDates
|
// Show all tasks, sorted by date
|
||||||
.filter(task => task.status !== 3)
|
const sortedTasks = tasksWithDates
|
||||||
.sort((a, b) => a.validDate.getTime() - b.validDate.getTime())
|
.sort((a, b) => a.validDate.getTime() - b.validDate.getTime())
|
||||||
.slice(0, 6);
|
.slice(0, 6);
|
||||||
|
|
||||||
console.log("Filtered and sorted tasks:", filteredTasks);
|
console.log("Sorted tasks:", sortedTasks);
|
||||||
setTasks(filteredTasks);
|
setTasks(sortedTasks);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Error fetching tasks:", error);
|
console.error("Error fetching tasks:", error);
|
||||||
setError("Failed to fetch tasks");
|
setError("Failed to fetch tasks");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user