summaryrefslogtreecommitdiff
path: root/iridescence/src/store
diff options
context:
space:
mode:
authorAdam T. Carpenter <atc@53hor.net>2020-09-12 17:26:25 -0400
committerAdam T. Carpenter <atc@53hor.net>2020-09-12 17:26:25 -0400
commit78daddbbbee1b67bbf3960e3d4d08d0757547207 (patch)
tree21a91819e4f88fdbb559748dfa06d5e491ea3554 /iridescence/src/store
parent4dffff999d4025ddb593f5f44bf4ecccf577a0e5 (diff)
downloadtheglassyladies-78daddbbbee1b67bbf3960e3d4d08d0757547207.tar.xz
theglassyladies-78daddbbbee1b67bbf3960e3d4d08d0757547207.zip
Working product name updating; working mock Dichroism API.
Diffstat (limited to 'iridescence/src/store')
-rw-r--r--iridescence/src/store/index.js10
1 files changed, 3 insertions, 7 deletions
diff --git a/iridescence/src/store/index.js b/iridescence/src/store/index.js
index 5a5b5f7..0e5d3be 100644
--- a/iridescence/src/store/index.js
+++ b/iridescence/src/store/index.js
@@ -13,13 +13,10 @@ export default new Vuex.Store({
},
getters: {
products(state) {
- const searchTerm = state.searchTerm.toLowerCase();
-
return state.products.filter(item => {
- return (
- item.name.toLowerCase().indexOf(searchTerm) != -1 ||
- item.description.toLowerCase().indexOf(searchTerm) != -1
- );
+ return JSON.stringify(item)
+ .toLowerCase()
+ .includes(state.searchTerm.toLowerCase());
});
}
},
@@ -33,7 +30,6 @@ export default new Vuex.Store({
},
actions: {
refreshProducts(context) {
- context.commit("setProducts", []);
context.commit("setProducts", dichroismApi.getProducts());
},
updateProduct(context, product) {