conditions are: - the checklist must have at least 1 checklist item - all checklist items have to be finished - the option "hide checked checklist items" is set at card details
@@ -20,7 +20,8 @@ template(name="checklists")
.card-checklist-items
each checklist in checklists
- +checklistDetail(checklist = checklist card = card)
+ if checklist.showChecklist card.hideCheckedChecklistItems
+ +checklistDetail(checklist = checklist card = card)
if canModifyCard
+inlinedForm(autoclose=false classNames="js-add-checklist" cardId = cardId)
@@ -118,6 +118,13 @@ Checklists.helpers({
isFinished() {
return 0 !== this.itemCount() && this.itemCount() === this.finishedCount();
},
+ showChecklist(hideCheckedChecklistItems) {
+ let ret = true;
+ if (this.isFinished() && hideCheckedChecklistItems === true) {
+ ret = false;
+ }
+ return ret;
+ },
checkAllItems() {
const checkItems = ReactiveCache.getChecklistItems({ checklistId: this._id });
checkItems.forEach(function(item) {