Merge pull request #4884 from helioguardabaxo/master

Added 'next week' due date filter
This commit is contained in:
Lauri Ojansivu 2023-04-11 11:22:16 +03:00 committed by GitHub
commit 9aeb5b4f05
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 57 additions and 20 deletions

View file

@ -109,13 +109,18 @@ template(name="filterSidebar")
| {{_ 'filter-due-tomorrow' }}
if Filter.dueAt.isSelected 'tomorrow'
i.fa.fa-check
li(class="{{#if Filter.dueAt.isSelected 'week'}}active{{/if}}")
li(class="{{#if Filter.dueAt.isSelected 'thisweek'}}active{{/if}}")
a.name.js-toggle-due-this-week-filter
span.sidebar-list-item-description
| {{_ 'filter-due-this-week' }}
if Filter.dueAt.isSelected 'week'
if Filter.dueAt.isSelected 'thisweek'
i.fa.fa-check
li(class="{{#if Filter.dueAt.isSelected 'nextweek'}}active{{/if}}")
a.name.js-toggle-due-next-week-filter
span.sidebar-list-item-description
| {{_ 'filter-due-next-week' }}
if Filter.dueAt.isSelected 'nextweek'
i.fa.fa-check
hr
h3
i.fa.fa-list-alt

View file

@ -53,6 +53,11 @@ BlazeComponent.extendComponent({
Filter.dueAt.thisWeek();
Filter.resetExceptions();
},
'click .js-toggle-due-next-week-filter'(evt) {
evt.preventDefault();
Filter.dueAt.nextWeek();
Filter.resetExceptions();
},
'click .js-toggle-archive-filter'(evt) {
evt.preventDefault();
Filter.archive.toggle(this.currentData()._id);