This commit is contained in:
tiago.kayaya
2021-01-22 16:01:44 +01:00
95 changed files with 3733 additions and 8202 deletions
@@ -331,8 +331,10 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
while (1) {
switch (_context2.prev = _context2.next) {
case 0:
_context2.prev = 0;
if (!this.validateInput()) {
_context2.next = 11;
_context2.next = 13;
break;
}
@@ -342,38 +344,48 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
domainName: src_environments_environment__WEBPACK_IMPORTED_MODULE_5__["environment"].domain,
BasicAuthKey: ""
};
_context2.next = 4;
_context2.next = 5;
return this.authService.login(this.userattempt);
case 4:
case 5:
if (!_context2.sent) {
_context2.next = 8;
_context2.next = 10;
break;
}
/* this.loginRocketChat(); */
this.router.navigate(['/home/events']);
_context2.next = 9;
_context2.next = 11;
break;
case 8:
case 10:
//this.toastService.presentToast('Não foi possível fazer login"');
this.presentAlert('O nome de utilizador e palavra-passe estão incorretas ou verifique a sua conexão com a internet e volte a tentar.');
case 9:
_context2.next = 12;
case 11:
_context2.next = 14;
break;
case 11:
case 13:
//this.toastService.presentToast('Preencha todos campos');
this.presentAlert('Por favor, insira o seu nome de utilizador e palavra-passe.');
case 12:
case 14:
_context2.next = 20;
break;
case 16:
_context2.prev = 16;
_context2.t0 = _context2["catch"](0);
_context2.t0;
this.presentAlert('Ocorreu um erro ao fazer login. Contacte o administrador de sistema. ');
case 20:
case "end":
return _context2.stop();
}
}
}, _callee2, this);
}, _callee2, this, [[0, 16]]);
}));
}
}]);