diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..65bf17c --- /dev/null +++ b/.gitignore @@ -0,0 +1,111 @@ +node_modules/@babel/runtime/.meteor-portable-2.json +node_modules/@babel/runtime/helpers/esm/.meteor-portable-2.json +node_modules/jquery/.meteor-portable-2.json +node_modules/meteor-node-stubs/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/asn1.js/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/asn1.js/node_modules/bn.js/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/assert/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/available-typed-arrays/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/base64-js/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/bn.js/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/brorand/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/browserify-aes/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/browserify-cipher/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/browserify-des/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/browserify-rsa/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/browserify-sign/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/browserify-zlib/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/buffer/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/buffer-xor/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/builtin-status-codes/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/call-bind/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/cipher-base/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/console-browserify/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/constants-browserify/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/create-ecdh/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/create-ecdh/node_modules/bn.js/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/create-hash/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/create-hmac/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/crypto-browserify/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/define-properties/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/des.js/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/diffie-hellman/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/diffie-hellman/node_modules/bn.js/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/domain-browser/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/elliptic/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/elliptic/node_modules/bn.js/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/es-abstract/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/es-to-primitive/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/es6-object-assign/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/events/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/evp_bytestokey/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/foreach/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/function-bind/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/get-intrinsic/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/has/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/has-bigints/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/has-symbols/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/hash-base/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/hash.js/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/hmac-drbg/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/https-browserify/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/ieee754/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/inherits/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/is-arguments/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/is-bigint/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/is-boolean-object/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/is-callable/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/is-date-object/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/is-generator-function/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/is-nan/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/is-negative-zero/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/is-number-object/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/is-regex/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/is-string/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/is-symbol/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/is-typed-array/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/md5.js/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/miller-rabin/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/miller-rabin/node_modules/bn.js/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/minimalistic-assert/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/minimalistic-crypto-utils/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/object-inspect/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/object-is/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/object-keys/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/object.assign/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/os-browserify/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/pako/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/parse-asn1/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/path-browserify/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/pbkdf2/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/process/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/public-encrypt/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/public-encrypt/node_modules/bn.js/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/punycode/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/querystring/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/querystring-es3/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/randombytes/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/randomfill/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/readable-stream/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/ripemd160/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/safe-buffer/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/safer-buffer/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/setimmediate/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/sha.js/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/stream-browserify/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/stream-http/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/string.prototype.trimend/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/string.prototype.trimstart/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/string_decoder/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/timers-browserify/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/tty-browserify/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/unbox-primitive/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/url/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/url/node_modules/punycode/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/util/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/util-deprecate/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/vm-browserify/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/which-boxed-primitive/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/which-typed-array/.meteor-portable-2.json +node_modules/meteor-node-stubs/node_modules/xtend/.meteor-portable-2.json +node_modules/regenerator-runtime/.meteor-portable-2.json diff --git a/client/AdminMgmt/ProductMgmt/prodMgmtTbl.html b/client/AdminMgmt/ProductMgmt/prodMgmtTbl.html index 889d3b5..dc77774 100644 --- a/client/AdminMgmt/ProductMgmt/prodMgmtTbl.html +++ b/client/AdminMgmt/ProductMgmt/prodMgmtTbl.html @@ -4,7 +4,15 @@
| Product Name | +
+ {{#if $eq searchProd false}}
+ Product Name search
+ {{else}}
+
+ close
+
+ {{/if}}
+ |
Category | Store | Location | @@ -14,7 +22,7 @@
|---|---|---|---|---|
| {{prodName}} | +{{prodName}} | {{prodCategory}} | {{prodStore}} | {{prodLocation}} | diff --git a/client/AdminMgmt/ProductMgmt/prodMgmtTbl.js b/client/AdminMgmt/ProductMgmt/prodMgmtTbl.js index 08a69e8..00bd866 100644 --- a/client/AdminMgmt/ProductMgmt/prodMgmtTbl.js +++ b/client/AdminMgmt/ProductMgmt/prodMgmtTbl.js @@ -8,12 +8,21 @@ Template.prodMgmtTbl.onRendered(function() { Meteor.setTimeout(function() { $('.tooltipped').tooltip(); }, 150); + Session.set("searchProds", false); }); Template.prodMgmtTbl.helpers({ products: function() { - return Products.find({}); + let searchVal = Session.get("searchVal"); + if (typeof searchVal == 'undefined' || searchVal.length == 0) { + return Products.find({}); + } else { + return Products.find({ prodName: { $regex: searchVal + '.*', $options: 'i' } }); + } }, + searchProd: function() { + return Session.get("searchProds"); + } }); Template.prodMgmtTbl.events({ @@ -37,5 +46,19 @@ Template.prodMgmtTbl.events({ $("#prodLocation").val(prodInfo.prodLocation); $("#prodStore").val(prodInfo.prodStore); $('select').formSelect(); + }, + 'click #filterProds' (event) { + event.preventDefault(); + Session.set("searchProds", true); + }, + 'click #closeFilter' (event) { + event.preventDefault(); + Session.set("searchProds", false); + }, + "keyup #searchProds" (event) { + if (event.which !== 13) { + let searchVal = $("#searchProds").val(); + Session.set("searchVal", searchVal); + } } }); \ No newline at end of file diff --git a/client/ListItems/listItemsForm.html b/client/ListItems/listItemsForm.html index 8e7e3a7..50db33b 100644 --- a/client/ListItems/listItemsForm.html +++ b/client/ListItems/listItemsForm.html @@ -1,17 +1,39 @@