feat(Salix): refs #6427 #6427 change front

This commit is contained in:
Javier Segarra 2024-06-14 14:25:24 +02:00
parent 57083e2f5c
commit 806fe91cd0
2 changed files with 6 additions and 2 deletions

View File

@ -33,6 +33,9 @@ export default class Controller {
'email': {
url: 'VnUsers/recoverPassword',
data: {user: this.user},
cb: data => {
data === '' && this.goToLogin();
}
},
'sms': {
@ -43,7 +46,7 @@ export default class Controller {
data.token && this.goToChangePassword(data);
!data.token && this.goToLogin();
} else
data.code && this.handleCode(data.code);
this.handleCode(data.code);
}
},
};
@ -54,7 +57,7 @@ export default class Controller {
throw new UserError(`Credentials not valid`);
const method = this.methodsAvailables()[this.method];
this.$http.post(method.url, method.data)
.then(({data}) => data === '' ? this.goToLogin() : method.cb(data));
.then(({data}) => method.cb(data));
}
}
Controller.$inject = ['$scope', '$element', '$http', 'vnApp', '$translate', '$state', '$location'];

View File

@ -6,3 +6,4 @@ User or recovery email: Usuario
User's phone: Móvil del usuario
User's id: Id del usuario
Credentials not valid: Credenciales no válidas
E-mail: Correo electrónico