From 0377f3631440f4d4e47177aa4602a20615262e88 Mon Sep 17 00:00:00 2001 From: Lemuel Marquez Date: Wed, 6 Jan 2021 17:43:26 -0600 Subject: [PATCH] hot fixes --- components/admin/inputTableA.vue | 6 ++--- components/admin/servicio/documento.vue | 5 ++--- components/admin/servicio/modificar/form.vue | 22 +++++++++---------- .../admin/servicio/programa/cargaMasiva.vue | 2 +- .../servicio/programa/tablaResponsables.vue | 2 +- components/admin/servicio/vistaServicio.vue | 2 +- components/responsable/cartaAceptacion.vue | 10 ++++----- components/responsable/cartaTermino.vue | 11 +++------- components/responsable/cuestionario.vue | 6 ++--- components/responsable/inputTable.vue | 2 +- nuxt.config.js | 4 ++-- .../admin/programa/infoResponsable/index.vue | 2 +- .../infoResponsable/modificar/index.vue | 2 +- pages/alumno/cuestionario/index.vue | 2 +- pages/alumno/index.vue | 2 +- pages/responsable/nuevo/index.vue | 2 +- 16 files changed, 36 insertions(+), 46 deletions(-) diff --git a/components/admin/inputTableA.vue b/components/admin/inputTableA.vue index 12e6e96..3b0f679 100644 --- a/components/admin/inputTableA.vue +++ b/components/admin/inputTableA.vue @@ -40,8 +40,8 @@ - - + + @@ -264,7 +264,7 @@ export default { salir = true; break; case "jwt malformed": - msj = "tu token esta mal formado, inicia sesión de nuevo"; + msj = "No se encontro tu token, inicia sesión de nuevo."; salir = true; break; case "No hay token": diff --git a/components/admin/servicio/documento.vue b/components/admin/servicio/documento.vue index 79a343b..f4d807d 100644 --- a/components/admin/servicio/documento.vue +++ b/components/admin/servicio/documento.vue @@ -115,8 +115,7 @@ export default { .catch((err) => { this.isLoading = false; this.error(err.response.data.message); - console.log(err.response.data.message); - this.errorDoc(); + // this.errorDoc(); }); }, rechazarCartaTermino() { @@ -171,7 +170,7 @@ export default { salir = true; break; case "jwt malformed": - msj = "tu token esta mal formado, inicia sesión de nuevo"; + msj = "No se encontro tu token, inicia sesión de nuevo."; salir = true; break; case "No hay token": diff --git a/components/admin/servicio/modificar/form.vue b/components/admin/servicio/modificar/form.vue index ab2f71b..b057bc9 100644 --- a/components/admin/servicio/modificar/form.vue +++ b/components/admin/servicio/modificar/form.vue @@ -193,8 +193,8 @@ export default { this.isLoading = true; return axios .get( - `${process.env.api}/servicio/admin?idServicio=${this.idServicio}` //, - // this.token + `${process.env.api}/servicio/admin?idServicio=${this.idServicio}`, + this.token ) .then((res) => { this.isLoading = false; @@ -263,24 +263,24 @@ export default { }, actualizar() { this.isLoading = true; - const data = {}; + const data = { idServicio: this.idServicio }; if (this.nuevo.direccion) { - data.direccionUpdate = this.nuevo.direccion; + data.direccion = this.nuevo.direccion; } if (this.nuevo.correo) { - data.correoUpdate = this.nuevo.correo; + data.correo = this.nuevo.correo; } if (this.nuevo.telefono) { - data.telefonoUpdate = this.nuevo.telefono; + data.telefono = this.nuevo.telefono; } if (this.nuevo.fechaInicioFinal) { - data.fechaInicioUpdate = this.nuevo.fechaInicioFinal; + data.fechaInicio = this.nuevo.fechaInicioFinal; } if (this.nuevo.fechaFinFinal) { - data.fechaFinUpdate = this.nuevo.fechaFinFinal; + data.fechaFin = this.nuevo.fechaFinFinal; } if (this.nuevo.fechaNacimientoFinal) { - data.fechaNacimientoUpdate = this.nuevo.fechaNacimientoFinal; + data.fechaNacimiento = this.nuevo.fechaNacimientoFinal; } const formData = new FormData(); if (this.cartaAceptacion) { @@ -305,7 +305,7 @@ export default { .then((res) => { this.isLoading = false; this.toast(); - this.$router.push("/admin/servicio/modificar"); + this.$router.push("/admin/servicio"); }) .catch((err) => { this.isLoading = false; @@ -336,7 +336,7 @@ export default { salir = true; break; case "jwt malformed": - msj = "tu token esta mal formado, inicia sesión de nuevo"; + msj = "No se encontro tu token, inicia sesión de nuevo."; salir = true; break; case "No hay token": diff --git a/components/admin/servicio/programa/cargaMasiva.vue b/components/admin/servicio/programa/cargaMasiva.vue index 6b265be..2223b67 100644 --- a/components/admin/servicio/programa/cargaMasiva.vue +++ b/components/admin/servicio/programa/cargaMasiva.vue @@ -115,7 +115,7 @@ export default { salir = true; break; case "jwt malformed": - msj = "tu token esta mal formado, inicia sesión de nuevo"; + msj = "No se encontro tu token, inicia sesión de nuevo."; salir = true; break; case "No hay token": diff --git a/components/admin/servicio/programa/tablaResponsables.vue b/components/admin/servicio/programa/tablaResponsables.vue index dcfda89..7cc03c5 100644 --- a/components/admin/servicio/programa/tablaResponsables.vue +++ b/components/admin/servicio/programa/tablaResponsables.vue @@ -133,7 +133,7 @@ export default { salir = true; break; case "jwt malformed": - msj = "tu token esta mal formado, inicia sesión de nuevo"; + msj = "No se encontro tu token, inicia sesión de nuevo."; salir = true; break; case "No hay token": diff --git a/components/admin/servicio/vistaServicio.vue b/components/admin/servicio/vistaServicio.vue index 0fcbe61..7d61c41 100644 --- a/components/admin/servicio/vistaServicio.vue +++ b/components/admin/servicio/vistaServicio.vue @@ -300,7 +300,7 @@ export default { salir = true; break; case "jwt malformed": - msj = "tu token esta mal formado, inicia sesión de nuevo"; + msj = "No se encontro tu token, inicia sesión de nuevo."; salir = true; break; case "No hay token": diff --git a/components/responsable/cartaAceptacion.vue b/components/responsable/cartaAceptacion.vue index d456c0f..8fd131a 100644 --- a/components/responsable/cartaAceptacion.vue +++ b/components/responsable/cartaAceptacion.vue @@ -49,7 +49,7 @@ >Enviar - + @@ -88,11 +88,9 @@ export default { }); }, Enviar() { - const loadingComponent = this.$buefy.loading.open({ - container: this.isFullPage ? null : this.$refs.element.$el, - }); const data = { idServicio: this.idServicio }; const formData = new FormData(); + formData.append("data", JSON.stringify(data)); formData.append("cartaAceptacion", this.file); this.isLoading = true; @@ -120,9 +118,9 @@ export default { }) .finally(() => { this.isLoading = false; - this.$router.push("/responsable"); localStorage.removeItem("idServicio"); localStorage.removeItem("cartaAceptacion"); + this.$router.push("/responsable"); }); }, getIdLocal() { @@ -145,7 +143,7 @@ export default { salir = true; break; case "jwt malformed": - msj = "tu token esta mal formado, inicia sesión de nuevo"; + msj = "No se encontro tu token, inicia sesión de nuevo."; salir = true; break; case "No hay token": diff --git a/components/responsable/cartaTermino.vue b/components/responsable/cartaTermino.vue index eeb108a..9aab87a 100644 --- a/components/responsable/cartaTermino.vue +++ b/components/responsable/cartaTermino.vue @@ -89,11 +89,9 @@ export default { }); }, Enviar() { - const loadingComponent = this.$buefy.loading.open({ - container: this.isFullPage ? null : this.$refs.element.$el, - }); const data = { idServicio: this.idServicio }; const formData = new FormData(); + formData.append("data", JSON.stringify(data)); formData.append("cartaTermino", this.file); this.isLoading = true; @@ -105,9 +103,6 @@ export default { }, }) .then((res) => { - console.log(res.data); - - loadingComponent.close(); this.$buefy.dialog.alert({ title: "Success", message: "Se enviaron los datos correctamente", @@ -124,9 +119,9 @@ export default { }) .finally(() => { this.isLoading = false; - this.$router.push("/responsable"); localStorage.removeItem("idServicio"); localStorage.removeItem("cartaTermino"); + this.$router.push("/responsable"); }); }, getIdLocal() { @@ -149,7 +144,7 @@ export default { salir = true; break; case "jwt malformed": - msj = "tu token esta mal formado, inicia sesión de nuevo"; + msj = "No se encontro tu token, inicia sesión de nuevo."; salir = true; break; case "No hay token": diff --git a/components/responsable/cuestionario.vue b/components/responsable/cuestionario.vue index 74f38d9..a3156be 100644 --- a/components/responsable/cuestionario.vue +++ b/components/responsable/cuestionario.vue @@ -218,16 +218,14 @@ export default { ariaModal: true, }); }) - .catch((error) => { this.error(error.response.data.message); }) - .finally(() => { this.isLoading = false; - this.$router.push("/responsable"); localStorage.removeItem("idServicio"); localStorage.removeItem("cuestionario"); + this.$router.push("/responsable"); }); }, getIdLocal() { @@ -250,7 +248,7 @@ export default { salir = true; break; case "jwt malformed": - msj = "tu token esta mal formado, inicia sesión de nuevo"; + msj = "No se encontro tu token, inicia sesión de nuevo."; salir = true; break; case "No hay token": diff --git a/components/responsable/inputTable.vue b/components/responsable/inputTable.vue index 2de160f..786d2c8 100644 --- a/components/responsable/inputTable.vue +++ b/components/responsable/inputTable.vue @@ -381,7 +381,7 @@ export default { salir = true; break; case "jwt malformed": - msj = "tu token esta mal formado, inicia sesión de nuevo"; + msj = "No se encontro tu token, inicia sesión de nuevo."; salir = true; break; case "No hay token": diff --git a/nuxt.config.js b/nuxt.config.js index a816ad8..03f4513 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -46,8 +46,8 @@ export default { // Build Configuration (https://go.nuxtjs.dev/config-build) build: {}, env: { - // api: "http://localhost:3000", - api: "https://venus.acatlan.unam.mx/ss-pruebas", + api: "http://localhost:3000", + // api: "https://venus.acatlan.unam.mx/ss-pruebas", // api: "https://890af9d598a4.ngrok.io" // api: 'https//venus.acatlan.unam.mx/pruebas_pcpuma' }, diff --git a/pages/admin/programa/infoResponsable/index.vue b/pages/admin/programa/infoResponsable/index.vue index 5a536f6..999160f 100644 --- a/pages/admin/programa/infoResponsable/index.vue +++ b/pages/admin/programa/infoResponsable/index.vue @@ -99,7 +99,7 @@ export default { salir = true; break; case "jwt malformed": - msj = "tu token esta mal formado, inicia sesión de nuevo"; + msj = "No se encontro tu token, inicia sesión de nuevo."; salir = true; break; case "No hay token": diff --git a/pages/admin/programa/infoResponsable/modificar/index.vue b/pages/admin/programa/infoResponsable/modificar/index.vue index 16496ff..344c88a 100644 --- a/pages/admin/programa/infoResponsable/modificar/index.vue +++ b/pages/admin/programa/infoResponsable/modificar/index.vue @@ -111,7 +111,7 @@ export default { salir = true; break; case "jwt malformed": - msj = "tu token esta mal formado, inicia sesión de nuevo"; + msj = "No se encontro tu token, inicia sesión de nuevo."; salir = true; break; case "No hay token": diff --git a/pages/alumno/cuestionario/index.vue b/pages/alumno/cuestionario/index.vue index b6e5686..6d4b27d 100644 --- a/pages/alumno/cuestionario/index.vue +++ b/pages/alumno/cuestionario/index.vue @@ -1034,7 +1034,7 @@ export default { salir=true break; case 'jwt malformed': - msj= "tu token esta mal formado, inicia sesión de nuevo" + msj= "No se encontro tu token, inicia sesión de nuevo." salir=true break; case 'No hay token': diff --git a/pages/alumno/index.vue b/pages/alumno/index.vue index 5c60437..3cb0ab9 100644 --- a/pages/alumno/index.vue +++ b/pages/alumno/index.vue @@ -357,7 +357,7 @@ export default { salir=true break; case 'jwt malformed': - msj= "tu token esta mal formado, inicia sesión de nuevo" + msj= "No se encontro tu token, inicia sesión de nuevo." salir=true break; case 'No hay token': diff --git a/pages/responsable/nuevo/index.vue b/pages/responsable/nuevo/index.vue index fd30ccc..bcc7136 100644 --- a/pages/responsable/nuevo/index.vue +++ b/pages/responsable/nuevo/index.vue @@ -348,7 +348,7 @@ export default { salir=true break; case 'jwt malformed': - msj= "tu token esta mal formado, inicia sesión de nuevo" + msj= "No se encontro tu token, inicia sesión de nuevo." salir=true break; case 'No hay token':