diff options
author | Adam T. Carpenter <atc@53hor.net> | 2020-09-15 17:24:00 -0400 |
---|---|---|
committer | Adam T. Carpenter <atc@53hor.net> | 2020-09-15 17:24:00 -0400 |
commit | 253dceb5591c5a39122f1439a721ce5b0b3fc97c (patch) | |
tree | 0a217184cd29f6ff8bc23fa9b7163594cdccf096 /iridescence/src/components/Navbar.vue | |
parent | 78daddbbbee1b67bbf3960e3d4d08d0757547207 (diff) | |
download | theglassyladies-253dceb5591c5a39122f1439a721ce5b0b3fc97c.tar.xz theglassyladies-253dceb5591c5a39122f1439a721ce5b0b3fc97c.zip |
added new product button, added search bar to admin view
Diffstat (limited to 'iridescence/src/components/Navbar.vue')
-rw-r--r-- | iridescence/src/components/Navbar.vue | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/iridescence/src/components/Navbar.vue b/iridescence/src/components/Navbar.vue index 551ce5a..16415bb 100644 --- a/iridescence/src/components/Navbar.vue +++ b/iridescence/src/components/Navbar.vue @@ -25,7 +25,13 @@ About </router-link> </div> - <div class="navbar-end"> + + <div class="navbar-end" v-if="routeName == 'Administration'"> + <div class="navbar-item"> + <NewProduct></NewProduct> + </div> + </div> + <div class="navbar-end" v-else> <div class="navbar-item has-dropdown is-active" v-for="category in categories.keys()" @@ -45,14 +51,7 @@ </div> <div class="navbar-item"> - <div class="buttons"> - <button class="button"> - Cart (5) - </button> - <button class="button is-info"> - Checkout - </button> - </div> + <CartCheckout></CartCheckout> </div> </div> </div> @@ -61,8 +60,15 @@ </template> <script> +import CartCheckout from "@/components/CartCheckout.vue"; +import NewProduct from "@/components/admin/NewProduct.vue"; + export default { name: "Navbar", + components: { + CartCheckout, + NewProduct + }, data() { return { isMenuActive: false @@ -80,6 +86,9 @@ export default { const products = this.$store.getters.products; console.log(products.map(item => item.categories)); return []; + }, + routeName() { + return this.$route.name; } }, methods: { |