This commit is contained in:
tiago.kayaya
2021-01-20 10:23:59 +01:00
parent 874133d28e
commit 38765d4da9
99 changed files with 2696 additions and 18069 deletions
@@ -249,13 +249,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
/* harmony import */
var src_app_config_auth_constants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
/*! src/app/config/auth-constants */
"./src/app/config/auth-constants.ts");
/* harmony import */
var src_app_services_photo_service__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(
var src_app_services_photo_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
/*! src/app/services/photo.service */
"./src/app/services/photo.service.ts");
@@ -320,19 +314,15 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
}, _callee, this);
}));
}
}, {
key: "loginRocketChat",
value: function loginRocketChat() {
var _this = this;
this.authService.loginChat(this.postData).subscribe(function (res) {
_this.storageService.store(src_app_config_auth_constants__WEBPACK_IMPORTED_MODULE_8__["AuthConnstants"].AUTH, res.data);
/* loginRocketChat(){
this.authService.loginChat(this.postData).subscribe((res: any) =>{
this.storageService.store(AuthConnstants.AUTH, res.data);
console.log('Login to Rocket chat OK');
}, function (error) {
},(error:any) =>{
console.log('Network error');
});
}
} */
}, {
key: "Login",
value: function Login() {
@@ -342,7 +332,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
switch (_context2.prev = _context2.next) {
case 0:
if (!this.validateInput()) {
_context2.next = 12;
_context2.next = 11;
break;
}
@@ -357,28 +347,28 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
case 4:
if (!_context2.sent) {
_context2.next = 9;
_context2.next = 8;
break;
}
this.loginRocketChat();
/* this.loginRocketChat(); */
this.router.navigate(['/home/events']);
_context2.next = 10;
_context2.next = 9;
break;
case 9:
case 8:
//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 10:
_context2.next = 13;
case 9:
_context2.next = 12;
break;
case 12:
case 11:
//this.toastService.presentToast('Preencha todos campos');
this.presentAlert('Por favor, insira o seu nome de utilizador e palavra-passe.');
case 13:
case 12:
case "end":
return _context2.stop();
}
@@ -401,7 +391,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
}, {
type: src_app_services_toast_service__WEBPACK_IMPORTED_MODULE_4__["ToastService"]
}, {
type: src_app_services_photo_service__WEBPACK_IMPORTED_MODULE_9__["PhotoService"]
type: src_app_services_photo_service__WEBPACK_IMPORTED_MODULE_8__["PhotoService"]
}, {
type: _ionic_angular__WEBPACK_IMPORTED_MODULE_6__["AlertController"]
}];