mirror of
https://gitlab.com/bmcgonag/get_my.git
synced 2026-03-27 00:08:49 +00:00
Added ability to restore a completed lilst from List Management. #27
This commit is contained in:
parent
dcd0074b28
commit
c9c96d214d
5 changed files with 52 additions and 6 deletions
|
|
@ -2,7 +2,7 @@ import { Lists } from '../../../imports/api/lists.js';
|
|||
import { M } from '../../lib/assets/materialize.js';
|
||||
|
||||
Template.listMgmtTbl.onCreated(function() {
|
||||
this.subscribe("myLists");
|
||||
this.subscribe("allLists");
|
||||
});
|
||||
|
||||
Template.listMgmtTbl.onRendered(function() {
|
||||
|
|
@ -14,7 +14,12 @@ Template.listMgmtTbl.onRendered(function() {
|
|||
|
||||
Template.listMgmtTbl.helpers({
|
||||
lists: function() {
|
||||
return Lists.find({});
|
||||
let showComplete = Session.get("showCompletedLists");
|
||||
if (showComplete) {
|
||||
return Lists.find({ listComplete: true });
|
||||
} else {
|
||||
return Lists.find({});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -51,5 +56,16 @@ Template.listMgmtTbl.events({
|
|||
// console.log(" SUCCESS marking complete.");
|
||||
}
|
||||
});
|
||||
},
|
||||
'click .markListNotComplete' (event) {
|
||||
event.preventDefault();
|
||||
let listId = this._id;
|
||||
Meteor.call('mark.incomplete', listId, function(err, result) {
|
||||
if (err) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue