mirror of
https://gitlab.com/bmcgonag/get_my.git
synced 2026-03-27 00:08:49 +00:00
Fixing clean Up and added option to show which products arent used in a list
This commit is contained in:
parent
c6c5951d16
commit
680f7c614d
6 changed files with 71 additions and 10 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue