summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam T. Carpenter <atc@53hor.net>2020-11-13 10:11:21 -0500
committerAdam T. Carpenter <atc@53hor.net>2020-11-13 10:11:21 -0500
commita71c91289f87f4c01a5e3c87b5f00a2912fd07d6 (patch)
tree58edd8469c6a24bebc69dda43861e0ae2c6faed2
parent23272d18ef2eccd1a451bbd2aefb1f067b30962b (diff)
downloadtheglassyladies-a71c91289f87f4c01a5e3c87b5f00a2912fd07d6.tar.xz
theglassyladies-a71c91289f87f4c01a5e3c87b5f00a2912fd07d6.zip
fixed oldid in newproduct, shoved filter functionality into search/sort
(at least for initial deploy)
-rw-r--r--iridescence/src/components/ProductSearch.vue2
-rw-r--r--iridescence/src/components/admin/NewProduct.vue2
-rw-r--r--iridescence/src/views/Home.vue12
3 files changed, 4 insertions, 12 deletions
diff --git a/iridescence/src/components/ProductSearch.vue b/iridescence/src/components/ProductSearch.vue
index 430721c..907602c 100644
--- a/iridescence/src/components/ProductSearch.vue
+++ b/iridescence/src/components/ProductSearch.vue
@@ -35,6 +35,8 @@ export default {
term: "",
sortOptions: {
"Featured Items First": (_, b) => b.featured,
+ "In Stock": (a, b) => a.quantity < b.quantity,
+ "Made to Order": (a, b) => a.quantity > b.quantity,
"Name (A-Z)": (a, b) => a.name > b.name,
"Name (Z-A)": (a, b) => a.name < b.name,
"Date Added (New to Old)": () => 0,
diff --git a/iridescence/src/components/admin/NewProduct.vue b/iridescence/src/components/admin/NewProduct.vue
index cd8a93e..3d2e1f2 100644
--- a/iridescence/src/components/admin/NewProduct.vue
+++ b/iridescence/src/components/admin/NewProduct.vue
@@ -17,7 +17,7 @@
<button class="delete" @click="toggleModal"></button>
</header>
<section class="modal-card-body">
- <ProductEditCard v-bind:index="-1"></ProductEditCard>
+ <ProductEditCard v-bind:oldid="-1"></ProductEditCard>
</section>
<footer class="modal-card-foot"></footer>
</div>
diff --git a/iridescence/src/views/Home.vue b/iridescence/src/views/Home.vue
index 1212d2c..b636175 100644
--- a/iridescence/src/views/Home.vue
+++ b/iridescence/src/views/Home.vue
@@ -5,14 +5,6 @@
<div id="home">
<div class="columns">
- <div class="column is-narrow">
- <section class="section">
- <div class="box">
- <ProductFilter></ProductFilter>
- </div>
- </section>
- </div>
-
<div class="column">
<div class="container">
<section class="section">
@@ -29,15 +21,13 @@
<script>
import ProductList from "@/components/ProductList.vue";
-import ProductFilter from "@/components/ProductFilter.vue";
import ProductSearch from "@/components/ProductSearch.vue";
export default {
name: "Home",
components: {
ProductList,
- ProductSearch,
- ProductFilter
+ ProductSearch
}
};
</script>