mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
- delete group implemented
- add group in progress
This commit is contained in:
@@ -124,7 +124,9 @@ __webpack_require__.r(__webpack_exports__);
|
||||
/* harmony import */ var src_environments_environment__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! src/environments/environment */ "./src/environments/environment.ts");
|
||||
/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @ionic/angular */ "./node_modules/@ionic/angular/__ivy_ngcc__/fesm2015/ionic-angular.js");
|
||||
/* harmony import */ var src_app_services_storage_service__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! src/app/services/storage.service */ "./src/app/services/storage.service.ts");
|
||||
/* harmony import */ var src_app_services_photo_service__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! src/app/services/photo.service */ "./src/app/services/photo.service.ts");
|
||||
/* 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__(/*! src/app/services/photo.service */ "./src/app/services/photo.service.ts");
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -165,43 +167,44 @@ let LoginPage = class LoginPage {
|
||||
yield alert.present();
|
||||
});
|
||||
}
|
||||
/* loginRocketChat(){
|
||||
this.authService.loginChat(this.postData).subscribe((res: any) =>{
|
||||
this.storageService.store(AuthConnstants.AUTH, res.data);
|
||||
console.log('Login to Rocket chat OK');
|
||||
},(error:any) =>{
|
||||
console.log('Network error');
|
||||
});
|
||||
} */
|
||||
loginRocketChat() {
|
||||
this.authService.loginChat(this.postData).subscribe((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) => {
|
||||
console.log('Network error');
|
||||
});
|
||||
}
|
||||
Login() {
|
||||
return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function* () {
|
||||
/* try { */
|
||||
//Go to our home in home/feed.
|
||||
//this.router.navigate(['/home/events']);
|
||||
if (this.validateInput()) {
|
||||
this.userattempt = {
|
||||
username: this.username,
|
||||
password: this.password,
|
||||
domainName: src_environments_environment__WEBPACK_IMPORTED_MODULE_5__["environment"].domain,
|
||||
BasicAuthKey: ""
|
||||
};
|
||||
if (yield this.authService.login(this.userattempt)) {
|
||||
/* this.loginRocketChat(); */
|
||||
this.router.navigate(['/home/events']);
|
||||
try {
|
||||
//Go to our home in home/feed.
|
||||
//this.router.navigate(['/home/events']);
|
||||
if (this.validateInput()) {
|
||||
this.userattempt = {
|
||||
username: this.username,
|
||||
password: this.password,
|
||||
domainName: src_environments_environment__WEBPACK_IMPORTED_MODULE_5__["environment"].domain,
|
||||
BasicAuthKey: ""
|
||||
};
|
||||
if (yield this.authService.login(this.userattempt)) {
|
||||
this.loginRocketChat();
|
||||
this.router.navigate(['/home/events']);
|
||||
}
|
||||
else {
|
||||
//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.');
|
||||
}
|
||||
}
|
||||
else {
|
||||
//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.');
|
||||
//this.toastService.presentToast('Preencha todos campos');
|
||||
this.presentAlert('Por favor, insira o seu nome de utilizador e palavra-passe.');
|
||||
}
|
||||
}
|
||||
else {
|
||||
//this.toastService.presentToast('Preencha todos campos');
|
||||
this.presentAlert('Por favor, insira o seu nome de utilizador e palavra-passe.');
|
||||
catch (error) {
|
||||
error;
|
||||
this.presentAlert('Ocorreu um erro ao fazer login. Contacte o administrador de sistema. ');
|
||||
}
|
||||
/* } catch (error) {
|
||||
error
|
||||
this.presentAlert('Ocorreu um erro ao fazer login. Contacte o administrador de sistema. '+ error);
|
||||
} */
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -210,7 +213,7 @@ LoginPage.ctorParameters = () => [
|
||||
{ type: src_app_services_auth_service__WEBPACK_IMPORTED_MODULE_3__["AuthService"] },
|
||||
{ type: src_app_services_storage_service__WEBPACK_IMPORTED_MODULE_7__["StorageService"] },
|
||||
{ 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"] }
|
||||
];
|
||||
LoginPage = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__decorate"])([
|
||||
|
||||
Reference in New Issue
Block a user