From db8ec154aedf48cac8cdc2f36453d3efde4cff2f Mon Sep 17 00:00:00 2001 From: Mono Mono Date: Mon, 3 Mar 2025 22:06:49 -0500 Subject: [PATCH 1/3] #5 feat(API): getCSVForTryton --- src/services/api.js | 4 ++++ src/services/django-api.js | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/src/services/api.js b/src/services/api.js index 2e6ef11..f100ab3 100644 --- a/src/services/api.js +++ b/src/services/api.js @@ -46,6 +46,10 @@ class Api { createCustomer(customer) { return this.apiImplementation.createCustomer(customer); } + + getCSVForTryton() { + return this.apiImplementation.getCSVForTryton(); + } } export default Api; diff --git a/src/services/django-api.js b/src/services/django-api.js index 389aa0e..b760b75 100644 --- a/src/services/django-api.js +++ b/src/services/django-api.js @@ -58,6 +58,11 @@ class DjangoApi { return this.postRequest(url, customer); } + getCSVForTryton() { + const url = this.base + '/don_confiao/api/sales/for_tryton'; + return this.getRequest(url); + } + getRequest(url) { return new Promise ((resolve, reject) => { fetch(url) From f8a52fc3ec4bf4a8c426fdf5849600b061d5305f Mon Sep 17 00:00:00 2001 From: Mono Mono Date: Mon, 3 Mar 2025 22:50:47 -0500 Subject: [PATCH 2/3] #5 feat(CSV): export csv tryton. --- src/components/ExportPurchasesForTryton.vue | 39 +++++++++++++++++++++ src/components/NavBar.vue | 1 + src/pages/ventas_para_tryton.vue | 3 ++ 3 files changed, 43 insertions(+) create mode 100644 src/components/ExportPurchasesForTryton.vue create mode 100644 src/pages/ventas_para_tryton.vue diff --git a/src/components/ExportPurchasesForTryton.vue b/src/components/ExportPurchasesForTryton.vue new file mode 100644 index 0000000..09aa2c5 --- /dev/null +++ b/src/components/ExportPurchasesForTryton.vue @@ -0,0 +1,39 @@ + + diff --git a/src/components/NavBar.vue b/src/components/NavBar.vue index 66c44c1..f8a791b 100644 --- a/src/components/NavBar.vue +++ b/src/components/NavBar.vue @@ -31,6 +31,7 @@ { 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'}, ], }), watch: { diff --git a/src/pages/ventas_para_tryton.vue b/src/pages/ventas_para_tryton.vue new file mode 100644 index 0000000..72eb030 --- /dev/null +++ b/src/pages/ventas_para_tryton.vue @@ -0,0 +1,3 @@ + From 49e8de8c0cef4faeb9ff57980572e61dfc10cce2 Mon Sep 17 00:00:00 2001 From: Mono Mono Date: Mon, 3 Mar 2025 22:52:44 -0500 Subject: [PATCH 3/3] #5 secured(csv): export_purchases_to_tryton --- src/pages/ventas_para_tryton.vue | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/pages/ventas_para_tryton.vue b/src/pages/ventas_para_tryton.vue index 72eb030..304c7d2 100644 --- a/src/pages/ventas_para_tryton.vue +++ b/src/pages/ventas_para_tryton.vue @@ -1,3 +1,19 @@ +