From 59122c04d3e7eea82db4b38a9228a01e12bd0b0e Mon Sep 17 00:00:00 2001 From: mono Date: Sat, 14 Mar 2026 23:16:22 -0500 Subject: [PATCH 1/3] #29 feat: improve products sync UI with loading state and results --- src/pages/sincronizar_productos_tryton.vue | 152 ++++++++++++++++----- 1 file changed, 121 insertions(+), 31 deletions(-) diff --git a/src/pages/sincronizar_productos_tryton.vue b/src/pages/sincronizar_productos_tryton.vue index fcd74b0..d091ee5 100644 --- a/src/pages/sincronizar_productos_tryton.vue +++ b/src/pages/sincronizar_productos_tryton.vue @@ -1,37 +1,113 @@ @@ -48,7 +124,8 @@ data() { return { api: inject('api'), - productos_tryton: [{}], + loading: false, + result: null, } }, mounted() { @@ -57,8 +134,21 @@ } }, methods: { + formatItems(ids) { + if (!ids || ids.length === 0) return []; + return ids.map(id => ({ id })); + }, startSync() { - this.productos_tryton = this.api.getProductsFromTryton() + this.loading = true; + this.api.getProductsFromTryton() + .then(response => { + this.result = response; + this.loading = false; + }) + .catch(error => { + console.error('Error al sincronizar productos:', error); + this.loading = false; + }); } } } -- 2.49.1 From 794e885b9d86910e6b9256aa3cb1c0fd11b8441c Mon Sep 17 00:00:00 2001 From: mono Date: Sat, 14 Mar 2026 23:19:14 -0500 Subject: [PATCH 2/3] #29 feat: improve sales sync UI with loading state and results --- src/pages/sincronizar_ventas_tryton.vue | 117 ++++++++++++++++++------ 1 file changed, 87 insertions(+), 30 deletions(-) diff --git a/src/pages/sincronizar_ventas_tryton.vue b/src/pages/sincronizar_ventas_tryton.vue index 35fc356..232c291 100644 --- a/src/pages/sincronizar_ventas_tryton.vue +++ b/src/pages/sincronizar_ventas_tryton.vue @@ -1,36 +1,86 @@ +