Updating framework to meteor 3 and later

This commit is contained in:
Brian McGonagill 2025-06-21 07:28:59 -05:00
parent 717994508a
commit cca29bc591
58 changed files with 2332 additions and 1611 deletions

View file

@ -34,9 +34,14 @@ Template.listMgmtTbl.events({
},
'click .editListName' (event) {
event.preventDefault();
let listInfo = Lists.findOne({ _id: this._id });
let listName = listInfo.listName;
let listShared = listInfo.listShared;
const lInfo = async() => {
let listInfo = await Lists.findOneAsync({ _id: this._id });
return listInfo;
}
let listData = lInfo();
let listName = listData.listName;
let listShared = listData.listShared;
$("#listNameInp").val(listName);
if (listShared == true) {
$("#isShared").prop("checked", true);
@ -49,23 +54,27 @@ Template.listMgmtTbl.events({
'click .markListComplete' (event) {
event.preventDefault();
let listId = this._id;
Meteor.call('mark.complete', listId, function(err, result) {
if (err) {
// console.log(" ERROR marking complete: " + err);
const markComp = async() => {
let result = await Meteor.callAsync('mark.complete', listId);
if (!result) {
console.log(" ERROR marking complete.");
} else {
// console.log(" SUCCESS marking complete.");
}
});
}
markComp();
},
'click .markListNotComplete' (event) {
event.preventDefault();
let listId = this._id;
Meteor.call('mark.incomplete', listId, function(err, result) {
if (err) {
const markInc = async() => {
let result = await Meteor.callAsync('mark.incomplete', listId);
if (!result) {
console.log("Issue marking list incomplete.");
} else {
// console.log("List marked incomplete.");
}
});
}
markInc();
}
});