diff --git a/src/views/tasks/ShowTasks.vue b/src/views/tasks/ShowTasks.vue index b708fb175..70ca72126 100644 --- a/src/views/tasks/ShowTasks.vue +++ b/src/views/tasks/ShowTasks.vue @@ -16,9 +16,15 @@

{{ $t('task.show.noTasks') }}

-
- +
+
this.showNothingToDo = true, 100) }, watch: { @@ -122,6 +123,9 @@ export default { : sortByDueDate }) }, + hasTasks() { + return this.tasks && this.tasks.length > 0 + }, ...mapState({ userAuthenticated: state => state.auth.authenticated, loading: state => state[LOADING] && state[LOADING_MODULE] === 'tasks', @@ -175,12 +179,13 @@ export default { filter_include_nulls: this.showNulls, } - // FIXME: Add button to show / hide overdue - if (!this.showAll) { params.filter_by.push('due_date') params.filter_value.push(this.dateTo) params.filter_comparator.push('less') + + // NOTE: Ideally we could also show tasks with a start or end date in the specified range, but the api + // is not capable (yet) of combining multiple filters with 'and' and 'or'. if (!this.showOverdue) { params.filter_by.push('due_date') @@ -214,7 +219,7 @@ export default { .show-tasks-options { display: flex; flex-direction: column; - + > :deep(a) { margin-right: .5rem; }