diff --git a/client/AdminMgmt/CategoryMgMt/catMgmt.html b/client/AdminMgmt/CategoryMgMt/catMgmt.html deleted file mode 100644 index bbfa5e5..0000000 --- a/client/AdminMgmt/CategoryMgMt/catMgmt.html +++ /dev/null @@ -1,8 +0,0 @@ - \ No newline at end of file diff --git a/client/AdminMgmt/CategoryMgMt/catMgmt.js b/client/AdminMgmt/CategoryMgMt/catMgmt.js deleted file mode 100644 index 5db371f..0000000 --- a/client/AdminMgmt/CategoryMgMt/catMgmt.js +++ /dev/null @@ -1,17 +0,0 @@ -import { Categories } from '../../../imports/api/category.js'; - -Template.catMgmt.onCreated(function() { - this.subscribe("myCategories"); -}); - -Template.catMgmt.onRendered(function() { - -}); - -Template.catMgmt.helpers({ - -}); - -Template.catMgmt.events({ - -}); \ No newline at end of file diff --git a/client/AdminMgmt/CategoryMgMt/catMgmtForm.html b/client/AdminMgmt/CategoryMgMt/catMgmtForm.html deleted file mode 100644 index bee5991..0000000 --- a/client/AdminMgmt/CategoryMgMt/catMgmtForm.html +++ /dev/null @@ -1,17 +0,0 @@ - \ No newline at end of file diff --git a/client/AdminMgmt/CategoryMgMt/catMgmtForm.js b/client/AdminMgmt/CategoryMgMt/catMgmtForm.js deleted file mode 100644 index ca5d55e..0000000 --- a/client/AdminMgmt/CategoryMgMt/catMgmtForm.js +++ /dev/null @@ -1,95 +0,0 @@ -import { Categories } from '../../../imports/api/category.js'; - -Template.catMgmtForm.onCreated(function() { - this.subscribe("myCategories"); -}); - -Template.catMgmtForm.onRendered(function() { - Session.set("catNameMiss", false); - Session.set("catEditMode", false); -}); - -Template.catMgmtForm.helpers({ - catNameErr: function() { - return Session.get("catNameMiss"); - }, - catEditMode: function() { - return Session.get("catEditMode"); - } -}); - -Template.catMgmtForm.events({ - 'click .saveCatMgmt' (event) { - event.preventDefault(); - let catName = $("#catNameInp").val(); - if (catName == null || catName == "") { - Session.set("catNameMiss", true); - return; - } else { - Meteor.call('add.category', catName, function(err, result) { - if (err) { - // console.log(" ERROR: Can't add category: " + err); - } else { - // console.log(" SUCCESS adding category."); - $("#catNameInp").val(""); - } - }); - } - }, - 'click .editCatMgmt' (event) { - event.preventDefault(); - let catName = $("#catNameInp").val(); - let catId = this._id; - if (catName == null || catName == "") { - Session.set("catNameMiss", true); - return; - } else { - let catId = Session.get("categoryEditId"); - Meteor.call('edit.category', catId, catName, function(err, result) { - if (err) { - // console.log(" ERROR: Can't edit category: " + err); - } else { - // console.log(" SUCCESS editing category."); - $("#catNameInp").val(""); - Session.set("catEditMode", false); - } - }); - } - }, - 'submit #catInputForm' (event) { - event.preventDefault(); - let catName = $("#catNameInp").val(); - let editMode = Session.get("catEditMode"); - if (catName == null || catName == "") { - Session.set("catNameMiss", true); - return; - } else { - if (editMode == false) { - Meteor.call('add.category', catName, function(err, result) { - if (err) { - // console.log(" ERROR: Can't add category: " + err); - } else { - // console.log(" SUCCESS adding category."); - $("#catNameInp").val(""); - } - }); - } else { - let catId = Session.get("categoryEditId"); - Meteor.call('edit.category', catId, catName, function(err, result) { - if (err) { - // console.log(" ERROR: Can't edit category: " + err); - } else { - // console.log(" SUCCESS editing category."); - $("#catNameInp").val(""); - Session.set("catEditMode", false); - } - }); - } - } - }, - 'click .cancelCatMgmt' (event) { - event.preventDefault(); - $("#catNameInp").val(""); - Session.set("catEditMode", false); - } -}); \ No newline at end of file diff --git a/client/AdminMgmt/CategoryMgMt/catMgmtTbl.html b/client/AdminMgmt/CategoryMgMt/catMgmtTbl.html deleted file mode 100644 index 0b05325..0000000 --- a/client/AdminMgmt/CategoryMgMt/catMgmtTbl.html +++ /dev/null @@ -1,16 +0,0 @@ - \ No newline at end of file diff --git a/client/AdminMgmt/CategoryMgMt/catMgmtTbl.js b/client/AdminMgmt/CategoryMgMt/catMgmtTbl.js deleted file mode 100644 index 0d82838..0000000 --- a/client/AdminMgmt/CategoryMgMt/catMgmtTbl.js +++ /dev/null @@ -1,35 +0,0 @@ -import { Categories } from '../../../imports/api/category.js'; - -Template.catMgmtTbl.onCreated(function() { - this.subscribe("myCategories"); -}); - -Template.catMgmtTbl.onRendered(function() { - Meteor.setTimeout(function() { - $('.tooltipped').tooltip(); - }, 150); -}); - -Template.catMgmtTbl.helpers({ - cats: function() { - return Categories.find({}); - } -}); - -Template.catMgmtTbl.events({ - 'click .deleteCategory' (event) { - event.preventDefault(); - Session.set("deleteId", this._id); - Session.set("method", "delete.category"); - Session.set("item", this.categoryName); - Session.set("view", "Categories"); - $('#modalDelete').modal('open'); - }, - 'click .editCategory' (event) { - event.preventDefault(); - Session.set("categoryEditId", this._id); - Session.set("catEditMode", true); - let catInfo = Categories.findOne({ _id: this._id }); - $("#catNameInp").val(catInfo.categoryName); - } -}); \ No newline at end of file diff --git a/client/AdminMgmt/LocationMgmt/locMgmt.html b/client/AdminMgmt/LocationMgmt/locMgmt.html deleted file mode 100644 index 54fd5de..0000000 --- a/client/AdminMgmt/LocationMgmt/locMgmt.html +++ /dev/null @@ -1,8 +0,0 @@ - \ No newline at end of file diff --git a/client/AdminMgmt/LocationMgmt/locMgmt.js b/client/AdminMgmt/LocationMgmt/locMgmt.js deleted file mode 100644 index c658703..0000000 --- a/client/AdminMgmt/LocationMgmt/locMgmt.js +++ /dev/null @@ -1,15 +0,0 @@ -Template.locMgmt.onCreated(function() { - -}); - -Template.locMgmt.onRendered(function() { - -}); - -Template.locMgmt.helpers({ - -}); - -Template.locMgmt.events({ - -}); \ No newline at end of file diff --git a/client/AdminMgmt/LocationMgmt/locMgmtForm.html b/client/AdminMgmt/LocationMgmt/locMgmtForm.html deleted file mode 100644 index c0a9d63..0000000 --- a/client/AdminMgmt/LocationMgmt/locMgmtForm.html +++ /dev/null @@ -1,17 +0,0 @@ - \ No newline at end of file diff --git a/client/AdminMgmt/LocationMgmt/locMgmtForm.js b/client/AdminMgmt/LocationMgmt/locMgmtForm.js deleted file mode 100644 index a484598..0000000 --- a/client/AdminMgmt/LocationMgmt/locMgmtForm.js +++ /dev/null @@ -1,95 +0,0 @@ -import { Locations } from '../../../imports/api/location.js'; - -Template.locMgmtForm.onCreated(function() { - this.subscribe("myLocations"); -}); - -Template.locMgmtForm.onRendered(function() { - Session.set("locNameMiss", false); - Session.set("locEditMode", false); -}); - -Template.locMgmtForm.helpers({ - locNameErr: function() { - return Session.get("locNameMiss"); - }, - locEditMode: function() { - return Session.get("locEditMode"); - } -}); - -Template.locMgmtForm.events({ - 'click .saveLocMgmt' (event) { - event.preventDefault(); - let locName = $("#locNameInp").val(); - if (locName == null || locName == "") { - Session.set("locNameMiss", true); - return; - } else { - Meteor.call('add.location', locName, function(err, result) { - if (err) { - // console.log(" ERROR: Can't add category: " + err); - } else { - // console.log(" SUCCESS adding category."); - $("#locNameInp").val(""); - } - }); - } - }, - 'click .editLocMgmt' (event) { - event.preventDefault(); - let locName = $("#locNameInp").val(); - let locEditMode = Session.get("locEditMode"); - let locId = Session.get("locEditId"); - if (locName == null || locName == "") { - Session.set("locNameMiss", true); - return; - } else { - Meteor.call('edit.location', locId, locName, function(err, result) { - if (err) { - // console.log(" ERROR: Can't edit category: " + err); - } else { - // console.log(" SUCCESS editing category."); - $("#locNameInp").val(""); - Session.set("locEditMode", false); - } - }); - } - }, - 'submit #locInputForm' (event) { - event.preventDefault(); - let locName = $("#locNameInp").val(); - let locEditMode = Session.get("locEditMode"); - let locId = Session.get("locEditId"); - if (locName == null || locName == "") { - Session.set("locNameMiss", true); - return; - } else { - if (locEditMode == false) { - Meteor.call('add.location', locName, function(err, result) { - if (err) { - // console.log(" ERROR: Can't add category: " + err); - } else { - // console.log(" SUCCESS adding category."); - $("#locNameInp").val(""); - } - }); - } else { - Meteor.call('edit.location', locId, locName, function(err, result) { - if (err) { - // console.log(" ERROR: Can't edit category: " + err); - } else { - // console.log(" SUCCESS editing category."); - $("#locNameInp").val(""); - Session.set("locEditMode", false); - } - }); - } - } - }, - 'click .cancelLocMgmt' (event) { - event.preventDefault(); - $("#locNameInp").val(""); - Session.set("locEditMode", false); - } -}); \ No newline at end of file diff --git a/client/AdminMgmt/LocationMgmt/locMgmtTbl.html b/client/AdminMgmt/LocationMgmt/locMgmtTbl.html deleted file mode 100644 index 5447968..0000000 --- a/client/AdminMgmt/LocationMgmt/locMgmtTbl.html +++ /dev/null @@ -1,16 +0,0 @@ - \ No newline at end of file diff --git a/client/AdminMgmt/LocationMgmt/locMgmtTbl.js b/client/AdminMgmt/LocationMgmt/locMgmtTbl.js deleted file mode 100644 index 66ebe25..0000000 --- a/client/AdminMgmt/LocationMgmt/locMgmtTbl.js +++ /dev/null @@ -1,35 +0,0 @@ -import { Locations } from '../../../imports/api/location.js'; - -Template.locMgmtTbl.onCreated(function() { - this.subscribe("myLocations"); -}); - -Template.locMgmtTbl.onRendered(function() { - Meteor.setTimeout(function() { - $('.tooltipped').tooltip(); - }, 150); -}); - -Template.locMgmtTbl.helpers({ - locs: function() { - return Locations.find({}); - } -}); - -Template.locMgmtTbl.events({ - 'click .deleteLocation' (event) { - event.preventDefault(); - Session.set("deleteId", this._id); - Session.set("method", "delete.location"); - Session.set("item", this.locationName); - Session.set("view", "Locations"); - $('#modalDelete').modal('open'); - }, - 'click .editLocation' (event) { - event.preventDefault(); - Session.set("locEditMode", true); - Session.set("locEditId", this._id); - let locInfo = Locations.findOne({ _id: this._id }); - $("#locNameInp").val(locInfo.locationName); - }, -}); \ No newline at end of file diff --git a/client/AdminMgmt/ProductMgmt/prodMgmtForm.html b/client/AdminMgmt/ProductMgmt/prodMgmtForm.html index 355f23a..234a878 100644 --- a/client/AdminMgmt/ProductMgmt/prodMgmtForm.html +++ b/client/AdminMgmt/ProductMgmt/prodMgmtForm.html @@ -6,18 +6,6 @@ -
- - -
- -
-
- - -
@@ -63,26 +41,4 @@ Done
- - - - - - \ No newline at end of file diff --git a/client/AdminMgmt/ProductMgmt/prodMgmtForm.js b/client/AdminMgmt/ProductMgmt/prodMgmtForm.js index cfac46c..5ee61e7 100644 --- a/client/AdminMgmt/ProductMgmt/prodMgmtForm.js +++ b/client/AdminMgmt/ProductMgmt/prodMgmtForm.js @@ -1,7 +1,5 @@ import { Products } from '../../../imports/api/products.js'; import { Stores } from '../../../imports/api/stores.js'; -import { Categories } from '../../../imports/api/category.js'; -import { Locations } from '../../../imports/api/location.js'; Template.prodMgmtForm.onCreated(function() { this.subscribe("myProducts"); @@ -26,12 +24,6 @@ Template.prodMgmtForm.helpers({ prodNameErr: function() { return Session.get("prodNameRed"); }, - category: function() { - return Categories.find({}); - }, - locations: function() { - return Locations.find({}); - }, prodEditMode: function() { return Session.get("prodEditMode"); }, @@ -41,17 +33,7 @@ Template.prodMgmtForm.events({ 'click .saveProdMgmt' (event) { event.preventDefault(); let name = $("#prodName").val(); - let cat = $("#prodCategory").val(); let store = $("#prodStore").val(); - let location = $("#prodLocation").val(); - - if (cat == null) { - cat = ""; - } - - if (location == null) { - location = ""; - } if (store == null) { store = ""; @@ -61,15 +43,13 @@ Template.prodMgmtForm.events({ Session.set("prodNameRed", true); return; } else { - Meteor.call('add.product', name, cat, store, location, function(err, result) { + Meteor.call('add.product', name, store, function(err, result) { if (err) { // console.log(" ERROR: can't add product: " + err); } else { // console.log(" SUCCESS adding product."); $("#prodName").val(""); - $("#prodCategory").val(""); $("#prodStore").val(""); - $("#prodLocation").val(""); $('select').formSelect(); } }); @@ -78,8 +58,7 @@ Template.prodMgmtForm.events({ 'click .editProdMgmt' (event) { event.preventDefault(); let name = $("#prodName").val(); - let cat = $("#prodCategory").val(); - let store = $("#prodStore").val(); + let location = $("#prodLocation").val(); let prodId = Session.get("prodEditId"); @@ -105,9 +84,7 @@ Template.prodMgmtForm.events({ } else { // console.log(" SUCCESS adding product."); $("#prodName").val(""); - $("#prodCategory").val(""); $("#prodStore").val(""); - $("#prodLocation").val(""); $('select').formSelect(); Session.set("prodEditMode", false); } @@ -118,9 +95,7 @@ Template.prodMgmtForm.events({ // event.preventDefault(); if (event.which === 13) { let name = $("#prodName").val(); - let cat = $("#prodCategory").val(); let store = $("#prodStore").val(); - let location = $("#prodLocation").val(); let prodId = Session.get("prodEditId"); let prodEditMode = Session.get("prodEditMode"); console.log(" ---- got the submit event for products."); @@ -147,9 +122,7 @@ Template.prodMgmtForm.events({ } else { // console.log(" SUCCESS adding product."); $("#prodName").val(""); - $("#prodCategory").val(""); $("#prodStore").val(""); - $("#prodLocation").val(""); $('select').formSelect(); } }); @@ -160,9 +133,7 @@ Template.prodMgmtForm.events({ } else { // console.log(" SUCCESS adding product."); $("#prodName").val(""); - $("#prodCategory").val(""); $("#prodStore").val(""); - $("#prodLocation").val(""); $('select').formSelect(); } }); @@ -173,9 +144,7 @@ Template.prodMgmtForm.events({ 'click .cancelProdMgmt' (event) { event.preventDefault(); $("#prodName").val(""); - $("#prodCategory").val(""); $("#prodStore").val(""); - $("#prodLocation").val(""); $('select').formSelect(); }, 'change #prodStore' (event) { @@ -188,26 +157,6 @@ Template.prodMgmtForm.events({ $('#modalStore').modal('open'); } }, - 'change #prodLocation' (event) { - event.preventDefault(); - let val = $("#prodLocation").val(); - - if (val == "addNewLocation") { - $("#prodLocation").val(""); - // open a modal to enter store information. - $('#modalLocation').modal('open'); - } - }, - 'change #prodCategory' (event) { - event.preventDefault(); - let val = $("#prodCategory").val(); - - if (val == "addNewCat") { - $("#prodCategory").val(""); - // open a modal to enter store information. - $('#modalCategory').modal('open'); - } - }, 'click .modal-close' (event) { $('select').formSelect(); } diff --git a/client/AdminMgmt/ProductMgmt/prodMgmtTbl.html b/client/AdminMgmt/ProductMgmt/prodMgmtTbl.html index cbddd53..ad58b7e 100644 --- a/client/AdminMgmt/ProductMgmt/prodMgmtTbl.html +++ b/client/AdminMgmt/ProductMgmt/prodMgmtTbl.html @@ -13,9 +13,7 @@ {{/if}} - Category Store - Location Actions @@ -23,9 +21,7 @@ {{#each products}} {{prodName}} - {{prodCategory}} {{prodStore}} - {{prodLocation}} delete edit diff --git a/client/AdminMgmt/ProductMgmt/prodMgmtTbl.js b/client/AdminMgmt/ProductMgmt/prodMgmtTbl.js index 3a036d3..04c7cf0 100644 --- a/client/AdminMgmt/ProductMgmt/prodMgmtTbl.js +++ b/client/AdminMgmt/ProductMgmt/prodMgmtTbl.js @@ -40,8 +40,6 @@ Template.prodMgmtTbl.events({ Session.set("prodEditId", this._id); let prodInfo = Products.findOne({ _id: this._id }); $("#prodName").val(prodInfo.prodName); - $("#prodCategory").val(prodInfo.prodCategory); - $("#prodLocation").val(prodInfo.prodLocation); $("#prodStore").val(prodInfo.prodStore); $('select').formSelect(); }, diff --git a/client/Dashboard/dashboard.js b/client/Dashboard/dashboard.js index e3467a8..80add4b 100644 --- a/client/Dashboard/dashboard.js +++ b/client/Dashboard/dashboard.js @@ -1,6 +1,4 @@ -import { Categories } from "../../imports/api/category"; import { Lists } from "../../imports/api/lists"; -import { Locations } from "../../imports/api/location"; import { Products } from "../../imports/api/products"; import { Stores } from "../../imports/api/stores"; import { Menus } from '../../imports/api/menu.js'; @@ -75,12 +73,6 @@ Template.dashboard.events({ case "prodMgmtLink": FlowRouter.go('/manageProduct'); break; - case "catMgmtLink": - FlowRouter.go('/manageCategory'); - break; - case "locationMgmtLink": - FlowRouter.go('/manageLocation'); - break; case "myMenuLink": FlowRouter.go('/mymenus'); break; @@ -105,12 +97,6 @@ Template.dashboard.events({ case "storeInfoCard": FlowRouter.go('/manageStore'); break; - case "catInfoCard": - FlowRouter.go('/manageCategory'); - break; - case "locInfoCard": - FlowRouter.go('/manageLocation'); - break; case "prodInfoCard": FlowRouter.go("/manageProduct"); break; diff --git a/imports/api/category.js b/imports/api/category.js deleted file mode 100644 index eb8883b..0000000 --- a/imports/api/category.js +++ /dev/null @@ -1,50 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { Mongo } from 'meteor/mongo'; -import { check } from 'meteor/check'; - -export const Categories = new Mongo.Collection('categories'); - -Categories.allow({ - insert: function(userId, doc){ - // if use id exists, allow insert - return !!userId; - }, -}); - -Meteor.methods({ - 'add.category' (categoryName) { - check(categoryName, String); - - if (!this.userId) { - throw new Meteor.Error('You are not allowed to add categories. Make sure you are logged in with valid user credentials.'); - } - - return Categories.insert({ - categoryName: categoryName, - categoryOwner: this.userId, - }); - }, - 'edit.category' (categoryId, categoryName,) { - check(categoryId, String); - check(categoryName, String); - - if (!this.userId) { - throw new Meteor.Error('You are not allowed to edit categories. Make sure you are logged in with valid user credentials.'); - } - - return Categories.update({ _id: categoryId }, { - $set: { - categoryName: categoryName, - } - }); - }, - 'delete.category' (categoryId) { - check(categoryId, String); - - if (!this.userId) { - throw new Meteor.Error('You are not allowed to delete categories. Make sure you are logged in with valid user credentials.'); - } - - return Categories.remove({ _id: categoryId }); - }, -}); \ No newline at end of file diff --git a/imports/api/listItems.js b/imports/api/listItems.js index 50805cc..3eac732 100644 --- a/imports/api/listItems.js +++ b/imports/api/listItems.js @@ -35,9 +35,7 @@ Meteor.methods({ listId: listId, prodId: result, addedBy: this.userId, - itemCategory: "", itemStore: "", - itemLocation: "", itemOrdered: false, itemReceived: false, dateAddedToList: new Date(), @@ -50,9 +48,7 @@ Meteor.methods({ listId: listId, prodId: prodInfo._id, addedBy: this.userId, - itemCategory: prodInfo.prodCategory, itemStore: prodInfo.prodStore, - itemLocation: prodInfo.prodLocation, itemOrdered: false, itemReceived: false, dateAddedToList: new Date(), diff --git a/imports/api/location.js b/imports/api/location.js deleted file mode 100644 index 05b0925..0000000 --- a/imports/api/location.js +++ /dev/null @@ -1,50 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { Mongo } from 'meteor/mongo'; -import { check } from 'meteor/check'; - -export const Locations = new Mongo.Collection('locations'); - -Locations.allow({ - insert: function(userId, doc){ - // if use id exists, allow insert - return !!userId; - }, -}); - -Meteor.methods({ - 'add.location' (name) { - check(name, String); - - if (!this.userId) { - throw new Meteor.Error('You are not allowed to add locations. Make sure you are logged in with valid user credentials.'); - } - - return Locations.insert({ - locationName: name, - owner: this.userId, - }); - }, - 'edit.location' (locationId, locationName) { - check(locationId, String); - check(locationName, String); - - if (!this.userId) { - throw new Meteor.Error('You are not allowed to edit locations. Make sure you are logged in with valid user credentials.'); - } - - return Locations.update({ _id: locationId }, { - $set: { - locationName: locationName, - } - }); - }, - 'delete.location' (locationId) { - check(locationId, String); - - if (!this.userId) { - throw new Meteor.Error('You are not allowed to delete locations. Make sure you are logged in with valid user credentials.'); - } - - return Locations.remove({ _id: locationId }); - }, -}); \ No newline at end of file diff --git a/imports/api/products.js b/imports/api/products.js index 91775f9..4e81e00 100644 --- a/imports/api/products.js +++ b/imports/api/products.js @@ -12,11 +12,9 @@ Products.allow({ }); Meteor.methods({ - 'add.product' (prodName, prodCategory, prodStore, prodLocation) { + 'add.product' (prodName, prodStore) { check(prodName, String); - check(prodCategory, String); check(prodStore, String); - check(prodLocation, String); if (!this.userId) { throw new Meteor.Error('You are not allowed to add products. Make sure you are logged in with valid user credentials.'); @@ -25,17 +23,13 @@ Meteor.methods({ return Products.insert({ prodName: prodName, prodOwner: this.userId, - prodCategory: prodCategory, prodStore: prodStore, - prodLocation: prodLocation, }); }, - 'edit.product' (prodId, prodName, prodCategory, prodStore, prodLocation) { + 'edit.product' (prodId, prodName, prodStore) { check(prodId, String); check(prodName, String); - check(prodCategory, String); check(prodStore, String); - check(prodLocation, String); if (!this.userId) { throw new Meteor.Error('You are not allowed to edit products. Make sure you are logged in with valid user credentials.'); @@ -44,9 +38,7 @@ Meteor.methods({ return Products.update({ _id: prodId }, { $set: { prodName: prodName, - prodCategory: prodCategory, prodStore: prodStore, - prodLocation: prodLocation, } }); }, diff --git a/lib/routes.js b/lib/routes.js index 0c3c7fd..9c777f9 100644 --- a/lib/routes.js +++ b/lib/routes.js @@ -61,20 +61,6 @@ FlowRouter.route('/manageProduct', { } }); -FlowRouter.route('/manageCategory', { - name: 'manageCategory', - action() { - BlazeLayout.render('MainLayout', { main: 'catMgmt' }); - } -}); - -FlowRouter.route('/manageLocation', { - name: 'manageLocation', - action() { - BlazeLayout.render('MainLayout', { main: 'locMgmt' }); - } -}); - FlowRouter.route('/manageLists', { name: 'manageLists', action() { diff --git a/server/publish.js b/server/publish.js index 79bc9d6..ad7e3c7 100644 --- a/server/publish.js +++ b/server/publish.js @@ -2,8 +2,6 @@ import { SysConfig } from '../imports/api/systemConfig.js'; import { Stores } from '../imports/api/stores.js'; import { UserConfigOptions } from '../imports/api/userConfigOptions.js'; 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'; import { Menus } from '../imports/api/menu.js'; @@ -39,22 +37,6 @@ Meteor.publish("myProducts", function() { } }); -Meteor.publish("myCategories", function() { - try { - return Categories.find({}); - } catch (error) { - console.log(" ERROR pulling category data: " + error); - } -}); - -Meteor.publish("myLocations", function() { - try { - return Locations.find({}); - } catch (error) { - console.log(" ERROR pulling location data: " + error); - } -}); - Meteor.publish("myLists", function() { try { return Lists.find( { $or: [ { listOwner: this.userId, listComplete: false }, { listShared: true, listComplete: false } ] } );