Many chcanges, but version 0.1.0 is ready to be cut.

This commit is contained in:
Brian McGonagill 2022-08-23 13:41:21 -05:00
parent 42643a37f5
commit 6e37ae8c74
46 changed files with 1038 additions and 273 deletions

View file

@ -5,6 +5,7 @@ import { Products } from '../imports/api/products.js';
import { Categories } from '../imports/api/category.js';
import { Locations } from '../imports/api/location.js';
import { Lists } from '../imports/api/lists.js';
import { ListItems } from '../imports/api/listItems.js';
Meteor.publish("SystemConfig", function() {
try {
@ -52,8 +53,17 @@ Meteor.publish("myLocations", function() {
Meteor.publish("myLists", function() {
try {
return Lists.find({ listOwner: this.userId, listComplete: false });
return Lists.find( { $or: [ { listOwner: this.userId, listComplete: false }, { listShared: true, listComplete: false } ] } );
} catch (error) {
console.log(" ERROR pulling list data: " + error);
}
});
Meteor.publish("myListItems", function(listId) {
try {
console.log("List Id is: " + listId);
return ListItems.find({ listId: listId });
} catch (error) {
console.log(" ERROR pulling list items for this list: " + error);
}
});