diff --git a/index.html b/index.html index 826cb41..2cc0256 100644 --- a/index.html +++ b/index.html @@ -78,24 +78,24 @@ Heute:
-
+
-
+
-
+
diff --git a/js/app.js b/js/app.js index f197a49..416f0e2 100644 --- a/js/app.js +++ b/js/app.js @@ -728,6 +728,21 @@ const TimeTrack = { task.done = task.percentDone == 100; this.$forceUpdate(); this.updateStorage(); + }, + getOpenTasksForTracker(tasks) { + let counter = 0; + + tasks.forEach((task) => { + if (task.open) { + counter++; + } + }); + + return counter; + }, + showOpenTasksForTracker(tasks) { + let count = this.getOpenTasksForTracker(tasks); + return count > 0 ? '('+count+' offen)' : ''; } }, beforeDestroy() {