mirror of
https://gitlab.com/bmcgonag/get_my.git
synced 2026-03-27 00:08:49 +00:00
Making it so that Menu and Lists load from db when refreshed.
This commit is contained in:
parent
3ad8fab67b
commit
2f3f82477a
7 changed files with 47 additions and 19 deletions
|
|
@ -28,11 +28,17 @@ Template.mainMenuTbl.events({
|
|||
if (menuId == "addMenu") {
|
||||
// console.log("add menu clicked");
|
||||
} else {
|
||||
console.log("menuId is: " + menuId);
|
||||
Session.set("menuId", menuId);
|
||||
Meteor.setTimeout(function() {
|
||||
FlowRouter.go('/menuitems');
|
||||
}, 100);
|
||||
// console.log("menuId is: " + menuId);
|
||||
Meteor.call('add.userLast', "Menu", menuId, function(err, result) {
|
||||
if (err) {
|
||||
console.log(" ERROR writing last menu viewed by user to db: " + err);
|
||||
} else {
|
||||
Session.set("menuId", menuId);
|
||||
Meteor.setTimeout(function() {
|
||||
FlowRouter.go('/menuitems');
|
||||
}, 100);
|
||||
}
|
||||
});
|
||||
}
|
||||
} else if (sender.localName == "i") {
|
||||
let menuId = this._id;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue