v0.1.2: Minor ui improvements #3

Merged
HEL merged 5 commits from dev into main 2025-03-01 13:25:14 +00:00
Showing only changes of commit 7f845dcb1d - Show all commits

View File

@ -216,17 +216,20 @@ class Table {
let projects = parent.projects.map(project => {
let durations = Array(this.nDays).fill("")
let total = 0
project.tasks.forEach(task => {
let date = new Date(task.date)
let i = Math.floor((date.valueOf() - this.startDate.valueOf()) / DAY_MS)
let hours = task.duration / 60
durations[i] = hours
total += hours
parentDurations[i] += hours
})
return {
id: project.id,
name: project.name,
durations: durations
durations: durations,
total: total
}
})
@ -239,7 +242,7 @@ class Table {
parent.is_productive
)
projects.forEach(project => {
projects.filter(p => p.total !== 0).forEach(project => {
this.addProject(project.id, project.name, "", project.durations)
})
})