mirror of
https://github.com/wekan/wekan.git
synced 2025-09-22 01:50:48 +02:00
Checklist, hide checked checklist items (configureable at each checklist)
This commit is contained in:
parent
7623c8dcb7
commit
bb17feaa17
5 changed files with 48 additions and 19 deletions
|
@ -63,6 +63,13 @@ Checklists.attachSchema(
|
|||
type: Number,
|
||||
decimal: true,
|
||||
},
|
||||
hideCheckedChecklistItems: {
|
||||
/**
|
||||
* hide the checked checklist-items?
|
||||
*/
|
||||
type: Boolean,
|
||||
optional: true,
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
|
@ -118,9 +125,9 @@ Checklists.helpers({
|
|||
isFinished() {
|
||||
return 0 !== this.itemCount() && this.itemCount() === this.finishedCount();
|
||||
},
|
||||
showChecklist(hideCheckedChecklistItems) {
|
||||
showChecklist(hideFinishedChecklistIfItemsAreHidden) {
|
||||
let ret = true;
|
||||
if (this.isFinished() && hideCheckedChecklistItems === true) {
|
||||
if (this.isFinished() && hideFinishedChecklistIfItemsAreHidden === true && (this.hideCheckedChecklistItems === true || this.hideAllChecklistItems)) {
|
||||
ret = false;
|
||||
}
|
||||
return ret;
|
||||
|
@ -198,6 +205,13 @@ Checklists.mutations({
|
|||
},
|
||||
};
|
||||
},
|
||||
toggleHideCheckedChecklistItems() {
|
||||
return {
|
||||
$set: {
|
||||
hideCheckedChecklistItems: !this.hideCheckedChecklistItems,
|
||||
}
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
if (Meteor.isServer) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue