- delete group implemented

- add group in progress
This commit is contained in:
tiago.kayaya
2021-01-20 16:58:04 +01:00
parent bae1f89b73
commit 608eee8cc2
77 changed files with 1795 additions and 2388 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");
@@ -314,15 +320,19 @@ 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);
}, {
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);
console.log('Login to Rocket chat OK');
},(error:any) =>{
}, function (error) {
console.log('Network error');
});
} */
}
}, {
key: "Login",
value: function Login() {
@@ -331,8 +341,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 +354,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.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]]);
}));
}
}]);
@@ -391,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"]
}];