From a55f45cafdf27180668f0d97680661952e19f2f7 Mon Sep 17 00:00:00 2001 From: martin chaparro Date: Tue, 24 Aug 2021 20:08:42 -0500 Subject: [PATCH] token expire, remove console --- APP/components/Charts/config_plots.js | 112 ++++++++++++++++- APP/nuxt.config.js | 6 +- APP/pages/compras.vue | 10 +- APP/pages/configuracion.vue | 99 +++++++-------- APP/pages/creditos.vue | 8 +- APP/pages/ingresos.vue | 8 +- APP/pages/login.vue | 1 - APP/pages/presupuesto.vue | 15 ++- APP/pages/resumen.vue | 174 +++++++++++++------------- APP/store/index.js | 25 ++-- 10 files changed, 279 insertions(+), 179 deletions(-) diff --git a/APP/components/Charts/config_plots.js b/APP/components/Charts/config_plots.js index 35e8feb..11e9f50 100644 --- a/APP/components/Charts/config_plots.js +++ b/APP/components/Charts/config_plots.js @@ -60,7 +60,7 @@ export var pieOptions={ chart: { renderTo: "container", defaultSeriesType: "pie", - backgroundColor: "rgba(0,0,0,0)" + //backgroundColor: "rgba(255,0,0,)" }, xAxis: { categories: [], @@ -80,4 +80,112 @@ export var pieOptions={ } } }, -}; \ No newline at end of file +}; + +export var ingresosvscomprasOptions = { + chart: { + renderTo: "container", + defaultSeriesType: "bar", + backgroundColor: "rgba(0,0,0,0)" + }, + title: { + text: "Gastos Vs Ingresos" + }, + plotOptions: { + bar: { + grouping: false, + shadow: false, + borderWidth: 0.5 + }, + }, + legend: { + shadow: true + }, + + credits: { + enabled: false + }, + xAxis: { + categories: [""], + crosshair: false + }, + yAxis: [ + { + min: 0, + title: { + text: "Pesos" + } + } + ], + series: [ + { + name: "Ingresos", + + color: "rgba(0,80,200,.5)", + data: [150], + pointPadding: 0.25, + pointPlacement: -0.2 + }, + { + name: "Gastos", + color: "rgba(165,0,217,1)", + data: [120], + pointPadding: 0.3, + pointPlacement: -0.2 + } + ] + }; + + export var ingresosvsegresosOptions = { + chart: { + renderTo: "container", + defaultSeriesType: "bar", + backgroundColor: "rgba(0,0,0,0)" + }, + title: { + text: "" + }, + plotOptions: { + bar: { + grouping: false, + shadow: false, + borderWidth: 0.5 + }, + }, + legend: { + shadow: false + }, + + credits: { + enabled: false + }, + xAxis: { + categories: [""], + crosshair: false + }, + yAxis: [ + { + min: 0, + title: { + text: "Pesos" + } + } + ], + series: [ + { + name: "Ingresos", + + color: "rgba(0,80,200,.5)", + data: [], + pointPadding: 0.25, + pointPlacement: -0.2 + }, + { + name: "Egresos", + color: "rgba(165,0,217,1)", + data: [], + pointPadding: 0.3, + pointPlacement: -0.2 + } + ] + }; \ No newline at end of file diff --git a/APP/nuxt.config.js b/APP/nuxt.config.js index 3d6d3fe..5293cb8 100644 --- a/APP/nuxt.config.js +++ b/APP/nuxt.config.js @@ -60,9 +60,9 @@ export default { // Axios module configuration (https://go.nuxtjs.dev/config-axios) axios: { - //baseURL: "http://192.168.1.111:4000/api" - baseURL:"http://localhost:4000/api" - //baseURL:"https://finanzasm.herokuapp.com/api" + //baseURL: "http://192.168.1.111:4000/api" + //baseURL:"http://localhost:4000/api" + // baseURL:"https://finanzasm.herokuapp.com/api" }, /* diff --git a/APP/pages/compras.vue b/APP/pages/compras.vue index 0ba4425..fa9f882 100644 --- a/APP/pages/compras.vue +++ b/APP/pages/compras.vue @@ -136,7 +136,6 @@ export default { this.$axios .get("/compras", axiosHeader) .then((res) => { - console.log(res.data.data); this.compras = res.data.data; }) .catch((e) => console.log(e)); @@ -151,12 +150,11 @@ export default { }, }; const toSend = this.newCompra; - console.log(axiosHeader.data); + this.$axios .post("/compra", toSend, axiosHeader) .then((res) => { this.clearFormCompra(); - console.log(res.data.status); this.getCompras(); }) .catch((e) => console.log(e)); @@ -168,12 +166,10 @@ export default { }, }; const toSend = this.newCompra; - console.log(axiosHeader.data); this.$axios .put("/compra", toSend, axiosHeader) .then((res) => { this.clearFormCompra(); - console.log(res.data.status); this.getCompras(); }) .catch((e) => console.log(e)); @@ -183,7 +179,7 @@ export default { var reg_edit = this.compras.filter((ic) => ic._id===id)[0]; this.newCompra = JSON.parse(JSON.stringify(reg_edit)); this.openForm = true; - console.log(reg_edit) + }, deleteCompra(id) { @@ -198,7 +194,6 @@ export default { this.$axios .delete("/compra", axiosHeader) .then((res) => { - console.log(res.data); this.getCompras(); this.clearFormCompra(); }) @@ -214,7 +209,6 @@ export default { }, getIcon(row, column, cellValue, index) { const found = this.$store.state.categorias.filter((ic) => ic.name === cellValue)[0]; - //console.log(found); return `${cellValue}` }, diff --git a/APP/pages/configuracion.vue b/APP/pages/configuracion.vue index 24f149b..19dc828 100644 --- a/APP/pages/configuracion.vue +++ b/APP/pages/configuracion.vue @@ -1,9 +1,13 @@