mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-08-01 04:01:01 +00:00
fix total estimate calculation
This commit is contained in:
parent
146ab0ccde
commit
1464ea5165
1 changed files with 7 additions and 1 deletions
|
|
@ -87,7 +87,13 @@
|
|||
if (angular.isArray(tasks) && tasks.length > 0) {
|
||||
totalEstimate = moment.duration();
|
||||
_.each(tasks, (task) => {
|
||||
totalEstimate.add(task.timeEstimate);
|
||||
if (task.subTasks && task.subTasks.length > 0) {
|
||||
_.each(task.subTasks, (subTask) => {
|
||||
totalEstimate.add(subTask.timeEstimate);
|
||||
});
|
||||
} else {
|
||||
totalEstimate.add(task.timeEstimate);
|
||||
}
|
||||
});
|
||||
}
|
||||
return totalEstimate;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue