Fixes and updates.

This commit is contained in:
Wynne Crisman
2020-01-16 09:31:12 -08:00
parent 2e57558ef4
commit a20e42e360
25 changed files with 346 additions and 820 deletions

View File

@@ -1,5 +1,6 @@
import './Products.html';
import Batches from "../api/Batch";
let QUERY_LIMIT = 100;
let QUERY_LIMIT_INCREMENT = 100;
@@ -57,6 +58,10 @@ Template.Products.helpers({
dbQuery = dbQuery.length > 0 ? {$and: dbQuery} : {};
Session.set(PREFIX + 'productCount', Meteor.collections.Products.find(dbQuery).count()); //Always get a full count.
//console.log("dbQuery=" + JSON.stringify(dbQuery));
//console.log("Result Count: " + Meteor.collections.Products.find(dbQuery).count());
return Meteor.collections.Products.find(dbQuery, {limit: Session.get(PREFIX + "queryLimit"), skip: skipCount, sort: {name: 1}});
},
disableLoadMore: function() {