clean up logs modals and fix progress bars counting on completed but N<M/M task progress.
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-01-10 11:45:31 +01:00
parent 748814b43c
commit 84b8d5b2db
7 changed files with 146 additions and 211 deletions
+4 -1
View File
@@ -30,7 +30,10 @@
$: mdAddTask = {name:"task.add", project};
$: mdProjectEdit = {name:"project.edit", project};
$: mdProjectDelete = {name:"project.delete", project};
$: progressAmount = project.tasks.map(t => Math.min(t.completedAmount, t.itemAmount) * t.item.groupWeight).reduce((n,m) => n+m, 0);
$: progressAmount = project.tasks.map(t => t.active
? Math.min(t.completedAmount, t.itemAmount) * t.item.groupWeight
: t.itemAmount * t.item.groupWeight
).reduce((n,m) => n+m, 0);
$: progressTarget = Math.max(project.tasks.map(t => t.itemAmount * t.item.groupWeight).reduce((n,m) => n+m, 0), 1);
</script>