Updated Lists to pull last viewed list from db

This commit is contained in:
Brian McGonagill 2024-07-30 10:30:10 -05:00
parent be07ec72bd
commit 3ad8fab67b
5 changed files with 97 additions and 6 deletions

View file

@ -23,13 +23,19 @@ Template.listsTbl.events({
if (sender.localName == "li" || sender.localName == "span") {
let listId = event.currentTarget.id;
if (listId == "addList") {
// $('#modalList').modal('open');
// opens the modal and allows you to add a new List
} else {
// console.log("listId is: " + listId);
Session.set("listId", listId);
Meteor.setTimeout(function() {
FlowRouter.go('/listitems');
}, 100);
Meteor.call('add.userLast', "List", listId, function(err, result) {
if (err) {
console.log(" ERROR setting user last list id in db: " + err);
} else {
Meteor.setTimeout(function() {
FlowRouter.go('/listitems');
}, 100);
}
});
}
}
},