diff --git a/client/AdminMgmt/CleanUp/modalConfirm/cleanUpModalConfirm.js b/client/AdminMgmt/CleanUp/modalConfirm/cleanUpModalConfirm.js index 247da06..19245ea 100644 --- a/client/AdminMgmt/CleanUp/modalConfirm/cleanUpModalConfirm.js +++ b/client/AdminMgmt/CleanUp/modalConfirm/cleanUpModalConfirm.js @@ -29,7 +29,7 @@ Template.cleanUpModalConfirm.events({ case "Menus": cleanUp("clean.Menus", whatItems); case "Products": - // cleanUp("clean.Products", whatItems); + cleanUp("clean.Products", whatItems); case "Stores": // cleanUp("clean.Stores", whatItems); case "Tasks": @@ -43,7 +43,7 @@ Template.cleanUpModalConfirm.events({ cleanUp = async function(methodName, whatItems) { let result = Meteor.callAsync(methodName); if (!result) { - console.log(" ERROR cleaning " + whatItems + ": " + err); + console.log(" ERROR cleaning " + whatItems); } else { showSnackbar(whatItems + " have been cleaned up!", "green"); let confirmModal = document.getElementById('cleanUpConfirm'); @@ -51,6 +51,15 @@ cleanUp = async function(methodName, whatItems) { } } +cleanProducts = async function(methodName, whatItems) { + let result = await Meteor.call(methodName, whatItems); + if (!result) { + console.log(" ERROR cleaning " + whatItems); + } else { + showSnackbar(whatItems + " have been cleaned up.", "green"); + } +} + cleanTasks = async function(methodName, whatItems) { let timeFrame = Session.get("overdueVal"); let result = await Meteor.call(methodName, timeFrame); diff --git a/client/AdminMgmt/ProductMgmt/prodMgmtForm.html b/client/AdminMgmt/ProductMgmt/prodMgmtForm.html index 357b19c..3a6ff9c 100644 --- a/client/AdminMgmt/ProductMgmt/prodMgmtForm.html +++ b/client/AdminMgmt/ProductMgmt/prodMgmtForm.html @@ -2,14 +2,22 @@