This commit is contained in:
tiago.kayaya
2021-01-26 11:04:54 +01:00
parent 0ef5b6628a
commit 63827c53dc
454 changed files with 14297 additions and 18822 deletions
@@ -249,7 +249,13 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
/* harmony import */
var src_app_services_photo_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
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__(
/*! src/app/services/photo.service */
"./src/app/services/photo.service.ts");
@@ -265,14 +271,6 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
this.alertController = alertController;
this.username = src_environments_environment__WEBPACK_IMPORTED_MODULE_5__["environment"].defaultuser;
this.password = src_environments_environment__WEBPACK_IMPORTED_MODULE_5__["environment"].defaultuserpwd;
this.body = {
"user": this.username,
"password": this.password
};
this.postData = {
"user": this.username,
"password": this.password
};
}
_createClass(LoginPage, [{
@@ -314,23 +312,26 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
}, _callee, this);
}));
}
/* loginRocketChat(){
this.authService.loginChat(this.postData).subscribe((res: any) =>{
this.storageService.store(AuthConnstants.AUTH, res.data);
console.log('Login to Rocket chat OK');
<<<<<<< HEAD
},(error:any) =>{
=======
}, {
key: "loginRocketChat",
value: function loginRocketChat() {
var _this = this;
_this.presentAlert('Login to Rocket chat OK');
var postData = {
"user": this.username,
"password": this.password
};
this.authService.loginChat(postData).subscribe(function (res) {
_this.storageService.store(src_app_config_auth_constants__WEBPACK_IMPORTED_MODULE_8__["AuthConnstants"].AUTH, res.data);
console.log('Logged user \n' + res.data);
console.log('Login to Rocket chat OK');
}, function (error) {
>>>>>>> feature/chat
console.log('Network error');
_this.presentAlert('Network error ' + error);
});
} */
}
}, {
key: "Login",
value: function Login() {
@@ -342,7 +343,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
_context2.prev = 0;
if (!this.validateInput()) {
_context2.next = 12;
_context2.next = 14;
break;
}
@@ -357,43 +358,44 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
case 5:
if (!_context2.sent) {
_context2.next = 9;
_context2.next = 11;
break;
}
/* this.loginRocketChat(); */
console.log(this.userattempt);
this.loginRocketChat();
this.router.navigate(['/home/events']);
_context2.next = 10;
_context2.next = 12;
break;
case 9:
case 11:
//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 12:
_context2.next = 15;
break;
case 12:
case 14:
//this.toastService.presentToast('Preencha todos campos');
this.presentAlert('Por favor, insira o seu nome de utilizador e palavra-passe.');
case 13:
_context2.next = 19;
case 15:
_context2.next = 21;
break;
case 15:
_context2.prev = 15;
case 17:
_context2.prev = 17;
_context2.t0 = _context2["catch"](0);
_context2.t0;
this.presentAlert('Ocorreu um erro ao fazer login. Contacte o administrador de sistema. ');
case 19:
case 21:
case "end":
return _context2.stop();
}
}
}, _callee2, this, [[0, 15]]);
}, _callee2, this, [[0, 17]]);
}));
}
}]);
@@ -411,7 +413,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_8__["PhotoService"]
type: src_app_services_photo_service__WEBPACK_IMPORTED_MODULE_9__["PhotoService"]
}, {
type: _ionic_angular__WEBPACK_IMPORTED_MODULE_6__["AlertController"]
}];