clean up logs modals and fix progress bars counting on completed but N<M/M task progress.
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user