mirror of
https://gitlab.com/bmcgonag/get_my.git
synced 2026-03-27 00:08:49 +00:00
Updating framework to meteor 3 and later
This commit is contained in:
parent
717994508a
commit
cca29bc591
58 changed files with 2332 additions and 1611 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import { Lists } from '../../imports/api/lists.js';
|
||||
import { M } from '../lib/assets/materialize.js';
|
||||
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
|
||||
|
||||
Template.listsTbl.onCreated(function() {
|
||||
this.subscribe("myLists");
|
||||
|
|
@ -25,17 +26,19 @@ Template.listsTbl.events({
|
|||
if (listId == "addList") {
|
||||
// opens the modal and allows you to add a new List
|
||||
} else {
|
||||
// console.log("listId is: " + listId);
|
||||
console.log("listId is: " + listId);
|
||||
Session.set("listId", listId);
|
||||
Meteor.call('add.userLast', "List", listId, function(err, result) {
|
||||
if (err) {
|
||||
const addUserLast = async() => {
|
||||
let result = await Meteor.callAsync('add.userLast', "List", listId);
|
||||
if (!result) {
|
||||
console.log(" ERROR setting user last list id in db: " + err);
|
||||
} else {
|
||||
Meteor.setTimeout(function() {
|
||||
setTimeout(function() {
|
||||
FlowRouter.go('/listitems');
|
||||
}, 100);
|
||||
}
|
||||
});
|
||||
}
|
||||
addUserLast();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -47,15 +50,17 @@ Template.listsTbl.events({
|
|||
let splitList = listFullId.split("_");
|
||||
let listId = splitList[1];
|
||||
// console.log("listId is " + listId);
|
||||
Meteor.call("mark.complete", listId, function(err, result){
|
||||
if (err) {
|
||||
console.log(" ERROR marking list complete! " + err);
|
||||
const markComp = async() => {
|
||||
let result = await Meteor.callAsync("mark.complete", listId);
|
||||
if (!result) {
|
||||
console.log(" ERROR marking list complete!");
|
||||
showSnackbar("ERROR! List Not Makred Complete!", "red");
|
||||
} else {
|
||||
// console.log(" SUCCESS marking list complete.");
|
||||
showSnackbar("List Marked Complete!", "green");
|
||||
}
|
||||
});
|
||||
}
|
||||
markComp();
|
||||
}
|
||||
}
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue