This commit is contained in:
Andres2908
2022-05-05 23:38:11 -05:00
parent cc5183db68
commit 5ec54596e0
+10 -6
View File
@@ -35,7 +35,7 @@
type="is-primary is-light is-outlined"
expanded
>
<b-icon icon="close"></b-icon>
<b-icon icon="printer-settings"></b-icon>
<span>Impresiones</span>
</b-radio-button>
@@ -45,7 +45,7 @@
type="is-primary is-light is-outlined"
expanded
>
<b-icon icon="check"></b-icon>
<b-icon icon="playlist-check"></b-icon>
<span>Inscripciones</span>
</b-radio-button>
</b-field>
@@ -61,7 +61,7 @@
<b-button
@click="login()"
type="is-success"
:disabled="error || !(numeroCuenta && password)"
:disabled="error || !(numeroCuenta && password && selector)"
>
Iniciar Sesión
</b-button>
@@ -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'