Updated to filter Products when no store is assigned.

This commit is contained in:
Brian McGonagill 2024-08-09 12:03:49 -05:00
parent d0398ddc32
commit a7a9c48e01
5 changed files with 31 additions and 10 deletions

View file

@ -17,15 +17,15 @@ Meteor.startup(() => {
allowReg: true,
});
} else {
console.log("Registration policy already set.");
// console.log("Registration policy already set.");
}
// check if the isLInked item exists on menuitems, and if not, add it (data cleanup task)
let itemInfoNoLink = MenuItems.find({ isLinked: { $exists: false } }).fetch();
console.log("No Ites with isLinked not set: " + itemInfoNoLink.length);
if (itemInfoNoLink.length > 0) {
console.log("found items with isLinked not set.");
console.dir(itemInfoNoLink);
// console.log("found items with isLinked not set.");
// console.dir(itemInfoNoLink);
let infoLength = itemInfoNoLink.length;
for (i=0; i < infoLength; i++) {
MenuItems.update({ _id: itemInfoNoLink[i]._id }, {
@ -36,7 +36,7 @@ Meteor.startup(() => {
}
} else {
// this will show if all items are found to have isLInked set.
console.log("No itesm with isLinked not set.");
// console.log("No itesm with isLinked not set.");
}
});

View file

@ -16,7 +16,7 @@ Meteor.methods({
if (err) {
console.log(" ERROR: can't set user dark mode preference: " + err);
} else {
console.log(" SUCCESSFULLY set user dark mode preference.");
// console.log(" SUCCESSFULLY set user dark mode preference.");
}
});
} else if (countOfUsers == 1) {
@ -27,7 +27,7 @@ Meteor.methods({
if (err) {
console.log(" ERROR: can't set user dark mode preference: " + err);
} else {
console.log(" SUCCESSFULLY set user dark mode preference.");
// console.log(" SUCCESSFULLY set user dark mode preference.");
}
});
}
@ -59,4 +59,4 @@ Meteor.methods({
return Roles.setUserRoles(userId, role);
},
});
});