From 253dceb5591c5a39122f1439a721ce5b0b3fc97c Mon Sep 17 00:00:00 2001
From: "Adam T. Carpenter" <atc@53hor.net>
Date: Tue, 15 Sep 2020 17:24:00 -0400
Subject: added new product button, added search bar to admin view

---
 iridescence/src/components/Navbar.vue | 27 ++++++++++++++++++---------
 1 file changed, 18 insertions(+), 9 deletions(-)

(limited to 'iridescence/src/components/Navbar.vue')

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: {
-- 
cgit v1.2.3

