From 5860411753199cc8bfab7ba722c4165b2eee2a2e Mon Sep 17 00:00:00 2001 From: Mono Mono Date: Sat, 8 Mar 2025 18:04:45 -0500 Subject: [PATCH 1/2] #12 feat(Compra): add compra administrativa. --- src/components/AdminPurchase.vue | 341 +++++++++++++++++++++++++++++++ src/components/NavBar.vue | 1 + src/pages/compra_admin.vue | 20 ++ 3 files changed, 362 insertions(+) create mode 100644 src/components/AdminPurchase.vue create mode 100644 src/pages/compra_admin.vue diff --git a/src/components/AdminPurchase.vue b/src/components/AdminPurchase.vue new file mode 100644 index 0000000..1eff2d6 --- /dev/null +++ b/src/components/AdminPurchase.vue @@ -0,0 +1,341 @@ + + + + diff --git a/src/components/NavBar.vue b/src/components/NavBar.vue index f8a791b..b51a4f9 100644 --- a/src/components/NavBar.vue +++ b/src/components/NavBar.vue @@ -32,6 +32,7 @@ { 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'}, ], }), watch: { diff --git a/src/pages/compra_admin.vue b/src/pages/compra_admin.vue new file mode 100644 index 0000000..b871718 --- /dev/null +++ b/src/pages/compra_admin.vue @@ -0,0 +1,20 @@ + + + From d89b79bfd0f0ff4c41a56046ee831776b9d35357 Mon Sep 17 00:00:00 2001 From: Mono Mono Date: Sat, 8 Mar 2025 19:07:40 -0500 Subject: [PATCH 2/2] #12 style(Navbar): add icions and separete admin actions. --- src/components/NavBar.vue | 53 ++++++++++++++++++++++++++++++--------- 1 file changed, 41 insertions(+), 12 deletions(-) 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; + }, } - } + }