1 Commits

Author SHA1 Message Date
f48cbdb03a Merge pull request 'v0.1.2: Minor ui improvements' (#3) from dev into main
Reviewed-on: #3
2025-03-01 13:25:13 +00:00
3 changed files with 14 additions and 18 deletions

View File

@ -17,7 +17,7 @@ from dotenv import load_dotenv
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
APP_VERSION = "0.1.3"
APP_VERSION = "0.1.2"
load_dotenv(BASE_DIR / ".env")

View File

@ -229,9 +229,7 @@ class Table {
durations[i] = hours
total += hours
parentDurations[i] += hours
if (parent.is_productive) {
this.dailyTotals[i] += hours
}
this.dailyTotals[i] += hours
})
return {
id: project.id,
@ -241,20 +239,18 @@ class Table {
}
})
if (parentDurations.reduce((a, b) => a + b, 0) !== 0) {
this.addProject(
parent.id,
parent.name,
parent.project_num,
parentDurations.map(v => v === 0 ? "" : v),
true,
parent.is_productive
)
this.addProject(
parent.id,
parent.name,
parent.project_num,
parentDurations.map(v => v === 0 ? "" : v),
true,
parent.is_productive
)
projects.filter(p => p.total !== 0).forEach(project => {
this.addProject(project.id, project.name, "", project.durations)
})
}
projects.filter(p => p.total !== 0).forEach(project => {
this.addProject(project.id, project.name, "", project.durations)
})
})
this.updateTotals()
}

View File

@ -64,7 +64,7 @@
</tr>
<tr class="day-dates"></tr>
<tr class="day-totals">
<th colspan="2">Total Productive</th>
<th colspan="2">TOTAL</th>
</tr>
</tbody>
</table>