mirror of
https://gitlab.com/bmcgonag/get_my.git
synced 2026-03-26 15:58:50 +00:00
Commenting out console logging.
This commit is contained in:
parent
4687f27011
commit
d25ef56591
31 changed files with 87 additions and 87 deletions
|
|
@ -26,7 +26,7 @@ Template.login.helpers({
|
|||
Template.login.events({
|
||||
'click #logmein' (event) {
|
||||
event.preventDefault();
|
||||
console.log("clicked login");
|
||||
// console.log("clicked login");
|
||||
let email = $("#email").val();
|
||||
let pass = $("#password").val();
|
||||
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ Template.reg.events({
|
|||
});
|
||||
|
||||
let userId = Meteor.userId();
|
||||
console.log("User ID: " + userId);
|
||||
// console.log("User ID: " + userId);
|
||||
const addRole = async() => {
|
||||
let result = await Meteor.callAsync("addToRole", "user");
|
||||
if (!result) {
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ Template.prodMgmtForm.events({
|
|||
},
|
||||
'click #showNoStoreSet' (event) {
|
||||
let noStoreSet = $("#showNoStoreSet").prop('checked');
|
||||
console.log("Clicked: " + noStoreSet);
|
||||
// console.log("Clicked: " + noStoreSet);
|
||||
if (noStoreSet == true) {
|
||||
Session.set("noStoreSet", true);
|
||||
} else {
|
||||
|
|
@ -69,7 +69,7 @@ const newProd = async(name, store) => {
|
|||
let result = await Meteor.callAsync('add.product', name, store);
|
||||
try {
|
||||
if (!result) {
|
||||
console.log("No result when trying to add a new product.");
|
||||
// console.log("No result when trying to add a new product.");
|
||||
showSnackbar("Unable to add new product.");
|
||||
} else {
|
||||
$("#prodName").val("");
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ Template.prodMgmtTbl.events({
|
|||
const getProds = async() => {
|
||||
let prodInfo = await Products.findOneAsync({ _id: this._id });
|
||||
if (!prodInfo) {
|
||||
console.log("No Product Returned.");
|
||||
// console.log("No Product Returned.");
|
||||
} else {
|
||||
$("#prodName").val(prodInfo.prodName);
|
||||
$("#prodStore").val(prodInfo.prodStore);
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ Template.storeMgmtForm.events({
|
|||
const addStore = async(storeName) => {
|
||||
let result = await Meteor.callAsync("add.store", storeName);
|
||||
if (!result) {
|
||||
console.log("ERROR: Store add failed.");
|
||||
// console.log("ERROR: Store add failed.");
|
||||
} else {
|
||||
$("#storeName").val("");
|
||||
showSnackbar("Store Added Successfully!", "green");
|
||||
|
|
@ -72,7 +72,7 @@ const addStore = async(storeName) => {
|
|||
const editStore = async(storeId, storeName) => {
|
||||
let result = await Meteor.callAsync("edit.store", storeId, storeName);
|
||||
if (!result) {
|
||||
console.log("ERROR: Store add failed: " + err);
|
||||
// console.log("ERROR: Store add failed: " + err);
|
||||
} else {
|
||||
$("#storeName").val("");
|
||||
Session.set("editModeStore", false);
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ Template.systemAdmin.onRendered(function() {
|
|||
$("#allAdmReg").prop('checked', curr.SysAdminReg);
|
||||
$("#recvUpdateMsgs").prop('checked', curr.allowUpdates);
|
||||
} else {
|
||||
console.log(" ---- unable to find current system configuration.");
|
||||
// console.log(" ---- unable to find current system configuration.");
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -49,7 +49,7 @@ Template.systemAdmin.events({
|
|||
const allowUpdateInfo = async() => {
|
||||
let result = await Meteor.callAsync('allow.updateInfo', updSet);
|
||||
if (!result) {
|
||||
console.log(" ERROR changing update setting.");
|
||||
// console.log(" ERROR changing update setting.");
|
||||
showSnackbar("Update Setting Change Failed.", "red");
|
||||
} else {
|
||||
showSnackbar("Update Setting Changed Successfully!", "green");
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ Template.taskForm.events({
|
|||
event.preventDefault();
|
||||
let elemcc = document.getElementById('taskName');
|
||||
let taskName = M.Chips.getInstance(elemcc).chipsData;
|
||||
console.log(taskName);
|
||||
// console.log(taskName);
|
||||
},
|
||||
'change #taskDate' (event) {
|
||||
let taskDate = $("#taskDate").val();
|
||||
|
|
@ -94,9 +94,9 @@ Template.taskForm.events({
|
|||
const addTask = async() => {
|
||||
let result = await Meteor.callAsync("add.task", taskNameArr, userInfo[0], userInfo[1], taskDateArr, actDate);
|
||||
if (!result) {
|
||||
console.log(" ERROR adding the new task.");
|
||||
// console.log(" ERROR adding the new task.");
|
||||
} else {
|
||||
console.log(" SUCCESS adding the new task.");
|
||||
// console.log(" SUCCESS adding the new task.");
|
||||
Session.set("taskDateArr", []);
|
||||
$("#taskDate").val("");
|
||||
$("#taskUser").val("");
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ Template.taskTbl.events({
|
|||
const markComp = async() => {
|
||||
let result = await Meteor.callAsync("markTask.complete", taskId);
|
||||
if (!result) {
|
||||
console.log(" ERROR marking task completeL " + err);
|
||||
// console.log(" ERROR marking task completeL " + err);
|
||||
showSnackbar("ERROR Marking Task Complete!", "red");
|
||||
} else {
|
||||
showSnackbar("Successfully Marked Task Complete!", "green");
|
||||
|
|
|
|||
|
|
@ -68,10 +68,10 @@ Template.dashboard.helpers({
|
|||
let updateAvail = UpdateInfo.find({});
|
||||
try {
|
||||
if (!updateAvail) {
|
||||
console.log("No update info found.");
|
||||
// console.log("No update info found.");
|
||||
return false;
|
||||
} else {
|
||||
console.dir(updateAvail);
|
||||
// console.dir(updateAvail);
|
||||
return updateAvail;
|
||||
}
|
||||
} catch(error) {
|
||||
|
|
@ -82,10 +82,10 @@ Template.dashboard.helpers({
|
|||
const ifUpdate = async() => {
|
||||
let updateExists = await UpdateInfo.findOneAsync({ viewed: false });
|
||||
if (!updateExists) {
|
||||
console.log("Update doesn't exist as false.");
|
||||
// console.log("Update doesn't exist as false.");
|
||||
return false;
|
||||
} else {
|
||||
console.log("Update found with false.");
|
||||
// console.log("Update found with false.");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -179,7 +179,7 @@ Template.dashboard.events({
|
|||
let result = await Meteor.callAsync('markUpdate.read', eventId);
|
||||
try {
|
||||
if (!result) {
|
||||
console.log(" Error marking this read.");
|
||||
// console.log(" Error marking this read.");
|
||||
showSnackbar("Error Marking Read!", "red");
|
||||
} else {
|
||||
showSnackbar("Successfully Marked as Read.", "green");
|
||||
|
|
|
|||
|
|
@ -25,9 +25,9 @@ Template.deleteConfirmationModal.events({
|
|||
const delItem = async() => {
|
||||
let result = await Meteor.callAsync(method, deleteId);
|
||||
if (!result) {
|
||||
console.log(" ERROR deleting item from modal: " + err);
|
||||
// console.log(" ERROR deleting item from modal: " + err);
|
||||
} else {
|
||||
console.log(" SUCCESSFULLY deleted.");
|
||||
// console.log(" SUCCESSFULLY deleted.");
|
||||
// put the new modal open / close here
|
||||
// $('#modalDelete').modal('close');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,10 +22,10 @@ Template.headerBar.onRendered(function() {
|
|||
let isRole = await Roles.getRolesForUserAsync(userId);
|
||||
try {
|
||||
if (!isRole) {
|
||||
console.log("SystemAdmin role for user not found: " + isRole);;
|
||||
// console.log("SystemAdmin role for user not found: " + isRole);;
|
||||
} else {
|
||||
console.log("Found role for the user: ");
|
||||
console.dir(isRole);
|
||||
// console.log("Found role for the user: ");
|
||||
// console.dir(isRole);
|
||||
}
|
||||
} catch(error) {
|
||||
console.log(" ERROR getting role for user: " + error);
|
||||
|
|
|
|||
|
|
@ -58,13 +58,13 @@ Template.listItemTblByStore.events({
|
|||
if (typeof itemOrder == 'undefined' || itemOrder == "" || itemOrder == false) {
|
||||
Meteor.call("setOrdered.listItem", itemId, function(err, result) {
|
||||
if (err) {
|
||||
console.log(" ERROR updating order status to ordered: " + err);
|
||||
// console.log(" ERROR updating order status to ordered: " + err);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
Meteor.call("setNotOrdered.listItem", itemId, function(err, result) {
|
||||
if (err) {
|
||||
console.log(" ERROR updating order status to unordered: " + err);
|
||||
// console.log(" ERROR updating order status to unordered: " + err);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -73,7 +73,7 @@ Template.listItemTblByStore.events({
|
|||
event.preventDefault();
|
||||
Meteor.call('setReceived.listItem', this._id, function(err, result) {
|
||||
if (err) {
|
||||
console.log(" ERROR setting item as received: " + err);
|
||||
// console.log(" ERROR setting item as received: " + err);
|
||||
} else {
|
||||
// console.log(" SUCCESS setting item received.");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ Template.listItemsForm.helpers({
|
|||
selListId = selListInfo.viewId;
|
||||
Session.set("listId", selListId);
|
||||
} else {
|
||||
console.log("not finding any value for viewId.");
|
||||
// console.log("not finding any value for viewId.");
|
||||
}
|
||||
}
|
||||
let listInfo = Lists.findOne({ _id: selListId });
|
||||
|
|
@ -100,7 +100,7 @@ Template.listItemsForm.events({
|
|||
// console.log(findItemVal);
|
||||
let listItemInfo = Products.find({ prodName: {$regex: findItemVal + '.*', $options: 'i'}}).fetch();
|
||||
if (!listItemInfo) {
|
||||
console.log("No data for key input.");
|
||||
// console.log("No data for key input.");
|
||||
} else {
|
||||
getDataList(listItemInfo);
|
||||
}
|
||||
|
|
@ -128,7 +128,7 @@ const addItem = async(item, listId) => {
|
|||
let result = await Meteor.callAsync("add.listItem", item, listId);
|
||||
try {
|
||||
if (!result) {
|
||||
console.log(" ISSUE adding list item. See logs.");
|
||||
// console.log(" ISSUE adding list item. See logs.");
|
||||
} else {
|
||||
$("#findListItems").val("");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ Template.listItemsTbl.events({
|
|||
if (itemInfo.itemOrdered == true) {
|
||||
Meteor.call('setNotOrdered.listItem', this._id, function(err, result) {
|
||||
if (err) {
|
||||
console.log(" ERROR setting this item as NOT ordered: " + err);
|
||||
// console.log(" ERROR setting this item as NOT ordered: " + err);
|
||||
} else {
|
||||
// console.log(" SUCCESS setting this item as NOT ordered.");
|
||||
}
|
||||
|
|
@ -52,7 +52,7 @@ Template.listItemsTbl.events({
|
|||
} else {
|
||||
Meteor.call('setOrdered.listItem', this._id, function(err, result) {
|
||||
if (err) {
|
||||
console.log(" ERROR marking item ordered: " + err);
|
||||
// console.log(" ERROR marking item ordered: " + err);
|
||||
} else {
|
||||
// console.log(" SUCCESS marking this item ordered.");
|
||||
}
|
||||
|
|
@ -63,7 +63,7 @@ Template.listItemsTbl.events({
|
|||
event.preventDefault();
|
||||
Meteor.call('setReceived.listItem', this._id, function(err, result) {
|
||||
if (err) {
|
||||
console.log(" ERROR setting item as received: " + err);
|
||||
// console.log(" ERROR setting item as received: " + err);
|
||||
} else {
|
||||
// console.log(" SUCCESS setting item received.");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,12 +26,12 @@ 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);
|
||||
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);
|
||||
// console.log(" ERROR setting user last list id in db: " + err);
|
||||
} else {
|
||||
setTimeout(function() {
|
||||
FlowRouter.go('/listitems');
|
||||
|
|
@ -53,7 +53,7 @@ Template.listsTbl.events({
|
|||
const markComp = async() => {
|
||||
let result = await Meteor.callAsync("mark.complete", listId);
|
||||
if (!result) {
|
||||
console.log(" ERROR marking list complete!");
|
||||
// console.log(" ERROR marking list complete!");
|
||||
showSnackbar("ERROR! List Not Makred Complete!", "red");
|
||||
} else {
|
||||
// console.log(" SUCCESS marking list complete.");
|
||||
|
|
|
|||
|
|
@ -11,14 +11,14 @@ Template.MainLayout.onRendered(function() {
|
|||
let myprefs = await UserConfig.findOneAsync({ user: myId });
|
||||
try {
|
||||
if (!myprefs) {
|
||||
console.log("User Prefs appear undefined.");
|
||||
// console.log("User Prefs appear undefined.");
|
||||
} else {
|
||||
if (myprefs.darkMode == "light") {
|
||||
console.log("Found theme as light");
|
||||
// console.log("Found theme as light");
|
||||
Session.set("myTheme", "light");
|
||||
document.documentElement.setAttribute('theme', "light");
|
||||
} else {
|
||||
console.log("Found theme as dark");
|
||||
// console.log("Found theme as dark");
|
||||
Session.set("myTheme", "dark");
|
||||
document.documentElement.setAttribute('theme', "dark");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,9 +31,9 @@ Template.addProdToListModal.helpers({
|
|||
},
|
||||
productToChoose: function() {
|
||||
let menuItemId = Session.get("menuItemId");
|
||||
console.log("Menu Item Id received is: " + menuItemId);
|
||||
// console.log("Menu Item Id received is: " + menuItemId);
|
||||
let prodLinkLIst = MenuProdLinks.find({ menuItemId: menuItemId});
|
||||
console.dir(prodLinkLIst);
|
||||
// console.dir(prodLinkLIst);
|
||||
if (typeof prodLinkLIst != 'undefined' && prodLinkLIst != "" && prodLinkLIst != null) {
|
||||
return prodLinkLIst;
|
||||
}
|
||||
|
|
@ -44,9 +44,9 @@ Template.addProdToListModal.events({
|
|||
'click .productListing' (event) {
|
||||
let itemId = event.currentTarget.id;
|
||||
let selected = Session.get("itemsSelected");
|
||||
console.log("Item clicked: " + itemId);
|
||||
// console.log("Item clicked: " + itemId);
|
||||
selected.push(itemId);
|
||||
console.dir(selected);
|
||||
// console.dir(selected);
|
||||
Session.set("itemsSelected", selected);
|
||||
},
|
||||
'click #saveProdsToList' (event) {
|
||||
|
|
@ -56,7 +56,7 @@ Template.addProdToListModal.events({
|
|||
const addItemsFromMenu = async() => {
|
||||
let result = await Meteor.callAsync('add.itemsFromMenuItem', selectedItems, listId);
|
||||
if (!result) {
|
||||
console.log(" ERROR adding menu components to list: " + err);
|
||||
// console.log(" ERROR adding menu components to list: " + err);
|
||||
} else {
|
||||
showSnackbar("Items Added to List!", "green");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ Template.menuItemsForm.events({
|
|||
const addMenuItem = async() => {
|
||||
let result = await Meteor.callAsync('add.menuItem', menuItem);
|
||||
if (!result) {
|
||||
console.log(" ERROR adding menu item: " + err);
|
||||
// console.log(" ERROR adding menu item: " + err);
|
||||
} else {
|
||||
// console.log(" SUCCESS adding menu item.");
|
||||
return result;
|
||||
|
|
@ -98,13 +98,13 @@ Template.menuItemsForm.events({
|
|||
let addedItem = addMenuItem();
|
||||
|
||||
if (!addedItem) {
|
||||
console.log("Item was not added.");
|
||||
// console.log("Item was not added.");
|
||||
} else {
|
||||
// now add this item to the menu
|
||||
const addToMenu = async() => {
|
||||
let result2 = await Meteor.callAsync('addto.Menu', menuId, menuItem, addedItem, dateSrv);
|
||||
if (!result2) {
|
||||
console.log(" ERROR adding menuitem to menu: " + error);
|
||||
// console.log(" ERROR adding menuitem to menu: " + error);
|
||||
} else {
|
||||
$("#menuItemInp").val("");
|
||||
$("#dateServed").val("");
|
||||
|
|
@ -126,7 +126,7 @@ Template.menuItemsForm.events({
|
|||
const addToMenu = async() => {
|
||||
let result = await Meteor.callAsync('addto.Menu', menuId, menuItem, menuItemId, dateSrv, isLinked);
|
||||
if (!result) {
|
||||
console.log(" ERROR adding menuitem to menu: " + error);
|
||||
// console.log(" ERROR adding menuitem to menu: " + error);
|
||||
} else {
|
||||
// console.log("Added item to menu - no problem.");
|
||||
$("#menuItemInp").val("");
|
||||
|
|
@ -149,7 +149,7 @@ Template.menuItemsForm.events({
|
|||
const shiftDay = async() => {
|
||||
let result = await Meteor.callAsync('shiftDate', menuItemId, momentAddDay);
|
||||
if (!result) {
|
||||
console.log(" ERROR shifting meal days: " + err);
|
||||
// console.log(" ERROR shifting meal days: " + err);
|
||||
} else {
|
||||
showSnackbar("Items Shifted Out by 1 Calendar Day", "green");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ Template.menuItemsTbl.events({
|
|||
'click .deleteMenuItem' (event) {
|
||||
event.preventDefault();
|
||||
let theseIds = Session.get("menuId") + "_" + this.menuItemId;
|
||||
console.log("These Ids: " + theseIds);
|
||||
// console.log("These Ids: " + theseIds);
|
||||
Session.set("deleteId", theseIds);
|
||||
Session.set("method", "delete.itemFromMenu");
|
||||
Session.set("item", this.menuItemName);
|
||||
|
|
@ -63,7 +63,7 @@ Template.menuItemsTbl.events({
|
|||
event.preventDefault();
|
||||
Session.set("menuItemId", this.menuItemId);
|
||||
Session.set("menuItemName", this.menuItemName);
|
||||
console.log("menu item name = " + this.menuItemName);
|
||||
// console.log("menu item name = " + this.menuItemName);
|
||||
},
|
||||
'click .addProdsToList' (event) {
|
||||
event.preventDefault();
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ Template.modalLinkProducts.events({
|
|||
const addMenuProdLinks = async() => {
|
||||
let result = await Meteor.callAsync("add.menuProdLinks", menuItemId, menuItemName, linkObjArray);
|
||||
if (!result) {
|
||||
console.log(" ERROR adding product links to this menu item: " + err);
|
||||
// console.log(" ERROR adding product links to this menu item: " + err);
|
||||
} else {
|
||||
updMenuItemLinks();
|
||||
}
|
||||
|
|
@ -63,7 +63,7 @@ Template.modalLinkProducts.events({
|
|||
const updMenuItemLinks = async() => {
|
||||
let result = await Meteor.callAsync('update.menuItemLinked', menuItemId, true);
|
||||
if (!result) {
|
||||
console.log(" ERROR adding link to menu item: " + err);
|
||||
// console.log(" ERROR adding link to menu item: " + err);
|
||||
} else {
|
||||
linkInMenu();
|
||||
}
|
||||
|
|
@ -72,7 +72,7 @@ Template.modalLinkProducts.events({
|
|||
const linkInMenu = async() => {
|
||||
let result = await Meteor.callAsync('link.inMenu', menuItemId, true);
|
||||
if (!result) {
|
||||
console.log(" ERROR adding link to menu sub-item: " + error);
|
||||
// console.log(" ERROR adding link to menu sub-item: " + error);
|
||||
} else {
|
||||
showSnackbar("Products added to Menu Item successfully!", "green");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,9 +30,9 @@ Template.addMenuModal.events({
|
|||
const addMenu = async() => {
|
||||
let result = await Meteor.callAsync("add.menu", menuName);
|
||||
if (!result) {
|
||||
console.log(" ERROR adding menu: " + err);
|
||||
// console.log(" ERROR adding menu: " + err);
|
||||
} else {
|
||||
console.log(" SUCCESS adding menu.");
|
||||
// console.log(" SUCCESS adding menu.");
|
||||
$("#menuNameInp").val("");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,13 +27,13 @@ Template.mainMenuTbl.events({
|
|||
if (sender.localName == "li") {
|
||||
let menuId = event.currentTarget.id;
|
||||
if (menuId == "addMenu") {
|
||||
console.log("add menu clicked");
|
||||
// console.log("add menu clicked");
|
||||
} else {
|
||||
console.log("menuId is: " + menuId);
|
||||
// console.log("menuId is: " + menuId);
|
||||
const addUserLast = async() => {
|
||||
let result = await Meteor.callAsync('add.userLast', "Menu", menuId);
|
||||
if (!result) {
|
||||
console.log(" ERROR writing last menu viewed by user to db.");
|
||||
// console.log(" ERROR writing last menu viewed by user to db.");
|
||||
} else {
|
||||
Session.set("menuId", menuId);
|
||||
Meteor.setTimeout(function() {
|
||||
|
|
@ -48,9 +48,9 @@ Template.mainMenuTbl.events({
|
|||
const makrMenuComp = async() => {
|
||||
let result = await Meteor.callAsync("markMenu.complete", menuId);
|
||||
if (!result) {
|
||||
console.log(" ERROR: can't mark menu complete.");
|
||||
// console.log(" ERROR: can't mark menu complete.");
|
||||
} else {
|
||||
console.log(" SUCCESS marking menu complete.");
|
||||
// console.log(" SUCCESS marking menu complete.");
|
||||
setAllMade();
|
||||
}
|
||||
}
|
||||
|
|
@ -59,9 +59,9 @@ Template.mainMenuTbl.events({
|
|||
const setAllMade = async() => {
|
||||
let result = await Meteor.callAsync('setAllMade.menuItem', menuId);
|
||||
if (!result) {
|
||||
console.log(" ERROR: cannot set all items as made.");
|
||||
// console.log(" ERROR: cannot set all items as made.");
|
||||
} else {
|
||||
console.log(" SUCCESS setting all items made.");
|
||||
// console.log(" SUCCESS setting all items made.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,10 +88,10 @@ Template.myTasksForm.events({
|
|||
const addTask = async(task, date, actDate) => {
|
||||
let result = await Meteor.callAsync("add.myTask", task, date, actDate);
|
||||
if (!result) {
|
||||
console.log(" ERROR adding task for self: ");
|
||||
// console.log(" ERROR adding task for self: ");
|
||||
showSnackbar("Error adding task for self!", "red");
|
||||
} else {
|
||||
console.log(" SUCCESS adding task for self.");
|
||||
// console.log(" SUCCESS adding task for self.");
|
||||
// Session.set("taskDateArr", []);
|
||||
// $("#myTaskName").val("");
|
||||
// $("#myTaskDate").val("");
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ Template.myTasksTbl.events({
|
|||
const makrTaskComp = async() => {
|
||||
let result = await Meteor.callAsync("markTask.complete", taskId);
|
||||
if (!result) {
|
||||
console.log(" ERROR marking task completeL " + err);
|
||||
// console.log(" ERROR marking task completeL " + err);
|
||||
showSnackbar("ERROR Marking Task Complete!", "red");
|
||||
} else {
|
||||
showSnackbar("Successfully Marked Task Complete!", "green");
|
||||
|
|
@ -67,7 +67,7 @@ Template.myTasksTbl.events({
|
|||
},
|
||||
'click .deleteMyTask' (event) {
|
||||
event.preventDefault();
|
||||
console.log("detected click");
|
||||
// console.log("detected click");
|
||||
Session.set("deleteId", this._id);
|
||||
Session.set("method", "delete.task");
|
||||
Session.set("item", this.taskName);
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ Template.userConfig.events({
|
|||
const setDarkMode = async(mode) => {
|
||||
let result = await Meteor.callAsync('update.darkModePref', mode);
|
||||
if (!result) {
|
||||
console.log(" - Did not receive back a 'result' from the update.");
|
||||
// console.log(" - Did not receive back a 'result' from the update.");
|
||||
} else {
|
||||
showSnackbar("Dark Mode Preference Set to " + mode, "green");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,14 +32,14 @@ Meteor.methods({
|
|||
// add product info first
|
||||
let added = await Meteor.callAsync("add.product", itemName, [""]);
|
||||
if (!added) {
|
||||
console.log(" ERROR adding item to products: " + err);
|
||||
// console.log(" ERROR adding item to products: " + err);
|
||||
} else {
|
||||
// console.log(" SUCCESS adding item to Products.");
|
||||
|
||||
return await ListItems.insertAsync({
|
||||
itemName: iname,
|
||||
listId: listId,
|
||||
prodId: result,
|
||||
prodId: added,
|
||||
addedBy: this.userId,
|
||||
itemStore: "",
|
||||
itemOrdered: false,
|
||||
|
|
@ -81,7 +81,7 @@ Meteor.methods({
|
|||
// now pull the product
|
||||
let prodInfo = await Products.findOneAsync({ _id: itemIds[i] });
|
||||
if (!prodInfo) {
|
||||
console.log("Unable to load product info.");
|
||||
// console.log("Unable to load product info.");
|
||||
} else {
|
||||
ListItems.insertAsync({
|
||||
itemName: prodInfo.prodName,
|
||||
|
|
@ -96,7 +96,7 @@ Meteor.methods({
|
|||
}
|
||||
} else {
|
||||
// product exists on list, move on to next
|
||||
console.log("Product Exists on Selected List.");
|
||||
// console.log("Product Exists on Selected List.");
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ Meteor.methods({
|
|||
}
|
||||
|
||||
let ids = itemIds.split('_');
|
||||
console.log("item ids: " + ids[0] + " and " + ids[1]);
|
||||
// console.log("item ids: " + ids[0] + " and " + ids[1]);
|
||||
|
||||
return await Menus.updateAsync({ _id: ids[0] }, {
|
||||
$pull: {
|
||||
|
|
|
|||
|
|
@ -25,12 +25,12 @@ Meteor.methods({
|
|||
let linkExists = MenuProdLinks.findOne({ menuItemId: menuItemId });
|
||||
|
||||
if (linkExists) {
|
||||
console.log("sending to update method instead.");
|
||||
// console.log("sending to update method instead.");
|
||||
Meteor.call('update.menuPordLInks', menuItemId, menuItemName, prodNameArray, function(err, result) {
|
||||
if (err) {
|
||||
console.log(" ERROR moving to the update method: " + err);
|
||||
// console.log(" ERROR moving to the update method: " + err);
|
||||
} else {
|
||||
console.log("Successfully updated the menu prod links.")
|
||||
// console.log("Successfully updated the menu prod links.")
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -39,9 +39,9 @@ Meteor.methods({
|
|||
let configId = curr._id;
|
||||
const addNoSys = await Meteor.callAsync('edit.noSysAdminReg', configId, admReg, genReg);
|
||||
if (!addNoSys) {
|
||||
console.log(" Couldn't edit the system config.");
|
||||
// console.log(" Couldn't edit the system config.");
|
||||
} else {
|
||||
console.log("Success updating sys admin reg.");
|
||||
// console.log("Success updating sys admin reg.");
|
||||
}
|
||||
} catch(error) {
|
||||
console.log(" ERROR trying to pull current system config:");
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ Meteor.methods({
|
|||
|
||||
let userInfo = await Meteor.users.findOneAsync({ _id: this.userId });
|
||||
if (!userInfo) {
|
||||
console.log("No matching user info found.")
|
||||
// console.log("No matching user info found.")
|
||||
} else {
|
||||
try {
|
||||
return await TaskItems.insertAsync({
|
||||
|
|
@ -140,23 +140,23 @@ Meteor.methods({
|
|||
let upToDate = "";
|
||||
switch(timeFrame) {
|
||||
case "1-week":
|
||||
console.log("1 Week");
|
||||
// console.log("1 Week");
|
||||
upToDate = 7 * 24 * 60 * 60 * 1000;
|
||||
break;
|
||||
case "2-weeks":
|
||||
console.log("2 Week");
|
||||
// console.log("2 Week");
|
||||
upToDate = 14 * 24 * 60 * 60 * 1000;
|
||||
break;
|
||||
case '1-month':
|
||||
console.log("1 month");
|
||||
// console.log("1 month");
|
||||
upToDate = 30 * 24 * 60 * 60 * 1000;
|
||||
break;
|
||||
case '3-months':
|
||||
console.log("3 months");
|
||||
// console.log("3 months");
|
||||
upToDate = 90 * 24 * 60 * 60 * 1000;
|
||||
break;
|
||||
case 'all':
|
||||
console.log("all");
|
||||
// console.log("all");
|
||||
upToDate = 1 * 24 * 60 * 60 * 1000;
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ Meteor.methods({
|
|||
// we'll just edit that entry with updated information
|
||||
let userListInfo = await UserLast.findOneAsync({ userId: this.userId, view: view });
|
||||
if (!userListInfo) {
|
||||
console.log("Adding new user last item.");
|
||||
// console.log("Adding new user last item.");
|
||||
return await UserLast.insertAsync({
|
||||
userId: this.userId,
|
||||
view: view,
|
||||
|
|
@ -32,12 +32,12 @@ Meteor.methods({
|
|||
dateAdded: Date(),
|
||||
});
|
||||
} else {
|
||||
console.log("Editing existing user last itme.");
|
||||
// console.log("Editing existing user last itme.");
|
||||
// entry exists, call the edit function instead
|
||||
let result = await Meteor.callAsync('edit.userLast', view, viewId);
|
||||
if (!result) {
|
||||
try {
|
||||
console.log("Issue editing existing entry in userLast. Check the logs.");
|
||||
// console.log("Issue editing existing entry in userLast. Check the logs.");
|
||||
} catch(error) {
|
||||
console.log(" ERROR adding userLast item: " + error);
|
||||
console.log(error.message);
|
||||
|
|
@ -56,7 +56,7 @@ Meteor.methods({
|
|||
throw new Meteor.Error('Not able to change user view last setting. Make sure you are logged in with valid system administrator credentials.');
|
||||
}
|
||||
|
||||
console.log("Edit in progress.");
|
||||
// console.log("Edit in progress.");
|
||||
return await UserLast.updateAsync({ view: view, userId: this.userId }, {
|
||||
$set: {
|
||||
viewId: viewId,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue