diff --git a/src/components/NavBar.vue b/src/components/NavBar.vue index b51a4f9..d2e0c56 100644 --- a/src/components/NavBar.vue +++ b/src/components/NavBar.vue @@ -12,11 +12,30 @@ - - - {{ item.title }} - - + + + + + + + + + @@ -26,13 +45,16 @@ data: () => ({ drawer: false, group: null, + showAdminMenu: false, menuItems: [ - { title: 'Inicio', route: '/'}, - { title: 'Comprar', route:'/comprar'}, - { title: 'Cuadrar tarro', route: '/cuadrar_tarro'}, - { title: 'Cuadres de tarro', route: '/cuadres_de_tarro'}, - { title: 'CSV Tryton', route: '/ventas_para_tryton'}, - { title: 'Compra adm', route: '/compra_admin'}, + { title: 'Inicio', route: '/', icon: 'mdi-home'}, + { title: 'Comprar', route:'/comprar', icon: 'mdi-cart'}, + ], + menuAdminItems: [ + { title: 'Cuadrar tarro', route: '/cuadrar_tarro', icon: 'mdi-calculator'}, + { title: 'Cuadres de tarro', route: '/cuadres_de_tarro', icon: 'mdi-chart-bar'}, + { title: 'CSV Tryton', route: '/ventas_para_tryton', icon: 'mdi-file-table'}, + { title: 'Compra adm', route: '/compra_admin', icon: 'mdi-cart'}, ], }), watch: { @@ -44,6 +66,13 @@ navigate(route) { this.$router.push(route); }, + navigateAdmin(route) { + this.toggleAdminMenu(); + this.navigate(route); + }, + toggleAdminMenu() { + this.showAdminMenu = !this.showAdminMenu; + }, } - } + }