mirror of
https://github.com/wekan/wekan.git
synced 2025-12-29 05:38:48 +01:00
Add user option to hide finished checklist items
Add a user option to hide finished items in a checklist.
This commit is contained in:
parent
2a25318ba8
commit
5755ece33e
6 changed files with 74 additions and 5 deletions
|
|
@ -193,6 +193,9 @@ BlazeComponent.extendComponent({
|
|||
}
|
||||
this.toggleDeleteDialog.set(!this.toggleDeleteDialog.get());
|
||||
},
|
||||
'click #toggleHideCheckedItemsButton'() {
|
||||
Meteor.call('toggleHideCheckedItems');
|
||||
},
|
||||
};
|
||||
|
||||
return [
|
||||
|
|
@ -211,6 +214,14 @@ BlazeComponent.extendComponent({
|
|||
},
|
||||
}).register('checklists');
|
||||
|
||||
Template.checklists.helpers({
|
||||
hideCheckedItems() {
|
||||
const currentUser = Meteor.user();
|
||||
if (currentUser) return currentUser.hasHideCheckedItems();
|
||||
return false;
|
||||
},
|
||||
});
|
||||
|
||||
Template.checklistDeleteDialog.onCreated(() => {
|
||||
const $cardDetails = this.$('.card-details');
|
||||
this.scrollState = {
|
||||
|
|
@ -246,6 +257,11 @@ Template.checklistItemDetail.helpers({
|
|||
!Meteor.user().isWorker()
|
||||
);
|
||||
},
|
||||
hideCheckedItems() {
|
||||
const user = Meteor.user();
|
||||
if (user) return user.hasHideCheckedItems();
|
||||
return false;
|
||||
},
|
||||
});
|
||||
|
||||
BlazeComponent.extendComponent({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue