diff --git a/src/components/CatalogSalesManagement.vue b/src/components/CatalogSalesManagement.vue index 9d596b3..7115d3f 100644 --- a/src/components/CatalogSalesManagement.vue +++ b/src/components/CatalogSalesManagement.vue @@ -6,6 +6,14 @@

Ventas por Catálogo

+ + Sincronizar a Tryton + {{ catalogSales.length }} venta(s) diff --git a/src/components/NavBar.vue b/src/components/NavBar.vue index 4a0bdc6..e0c0e27 100644 --- a/src/components/NavBar.vue +++ b/src/components/NavBar.vue @@ -63,13 +63,16 @@ - + @@ -105,9 +108,12 @@ { title: 'Compra adm', route: '/compra_admin', icon: 'mdi-cart'}, { title: 'Gestión de Productos', route: '/admin/products', icon: 'mdi-package-variant'}, { title: 'Ver Ventas por Catálogo', route: '/admin/catalog-sales', icon: 'mdi-cart-arrow-down'}, - { title: 'Actualizar Productos De Tryton', route: '/sincronizar_productos_tryton', icon: 'mdi-sync'}, - { title: 'Actualizar Clientes De Tryton', route: '/sincronizar_clientes_tryton', icon: 'mdi-sync'}, - { title: 'Actualizar Ventas Tryton', route: '/sincronizar_ventas_tryton', icon: 'mdi-sync'} + { divider: true }, + { header: 'Sincronización Tryton' }, + { title: 'Importar Productos', route: '/sincronizar_productos_tryton', icon: 'mdi-download'}, + { title: 'Importar Clientes', route: '/sincronizar_clientes_tryton', icon: 'mdi-download'}, + { title: 'Exportar Ventas', route: '/sincronizar_ventas_tryton', icon: 'mdi-upload'}, + { title: 'Exportar Ventas Catálogo', route: '/sincronizar_catalog_sales_tryton', icon: 'mdi-upload'} ], }), computed: { diff --git a/src/pages/sincronizar_catalog_sales_tryton.vue b/src/pages/sincronizar_catalog_sales_tryton.vue new file mode 100644 index 0000000..568028a --- /dev/null +++ b/src/pages/sincronizar_catalog_sales_tryton.vue @@ -0,0 +1,120 @@ + + + diff --git a/src/services/api.js b/src/services/api.js index 87c5e15..5f9ec70 100644 --- a/src/services/api.js +++ b/src/services/api.js @@ -71,6 +71,10 @@ class Api { return this.apiImplementation.sendSalesToTryton(); } + sendCatalogSalesToTryton() { + return this.apiImplementation.sendCatalogSalesToTryton(); + } + getCatalogSales() { return this.apiImplementation.getCatalogSales(); } diff --git a/src/services/django-api.js b/src/services/django-api.js index 8375653..3ac56e5 100644 --- a/src/services/django-api.js +++ b/src/services/django-api.js @@ -116,6 +116,11 @@ class DjangoApi { return this.postRequest(url, {}); } + sendCatalogSalesToTryton() { + const url = this.base + "/don_confiao/api/enviar_catalog_sales_a_tryton"; + return this.postRequest(url, {}); + } + getCatalogSales() { const url = this.base + "/don_confiao/api/catalog_sales/"; return this.getRequest(url);