From 5ec54596e0ab5c344e02de503a6e083f4d9004ac Mon Sep 17 00:00:00 2001 From: Andres2908 Date: Thu, 5 May 2022 23:38:11 -0500 Subject: [PATCH] selector --- components/Login.vue | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/components/Login.vue b/components/Login.vue index d709c27..1c77b2c 100644 --- a/components/Login.vue +++ b/components/Login.vue @@ -35,7 +35,7 @@ type="is-primary is-light is-outlined" expanded > - + Impresiones @@ -45,7 +45,7 @@ type="is-primary is-light is-outlined" expanded > - + Inscripciones @@ -61,7 +61,7 @@ Iniciar Sesión @@ -90,12 +90,12 @@ export default { }, methods: { login() { - if (this.numeroCuenta && this.password && !this.error) { + if (this.numeroCuenta && this.password && this.selector && !this.error) { const data = { numeroCuenta: this.numeroCuenta, passwordUser: this.password, } - + console.log(this.selector) this.updateIsLoading(true) axios .post(`${process.env.api}/Usuario/login`, data) @@ -111,7 +111,11 @@ export default { localStorage.setItem('carrera', info.carrera) this.updateIsLoading(false) - this.$router.push(`/registro`) + if (this.selector === 'impresiones') { + this.$router.push(`/impresion`) + } else { + this.$router.push('/registro') + } }) .catch((err) => { this.error = 'is-danger'