mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
save
This commit is contained in:
@@ -307,7 +307,7 @@ let HomePage = class HomePage {
|
||||
PushNotifications.register();
|
||||
});
|
||||
PushNotifications.addListener('registration', (token) => {
|
||||
alert('Push registration success, token: ' + token.value);
|
||||
/* alert('Push registration success, token: ' + token.value); */
|
||||
console.log('FIREBASE: ', token.value);
|
||||
});
|
||||
PushNotifications.addListener('registrationError', (error) => {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -523,7 +523,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
||||
PushNotifications.register();
|
||||
});
|
||||
PushNotifications.addListener('registration', function (token) {
|
||||
alert('Push registration success, token: ' + token.value);
|
||||
/* alert('Push registration success, token: ' + token.value); */
|
||||
console.log('FIREBASE: ', token.value);
|
||||
});
|
||||
PushNotifications.addListener('registrationError', function (error) {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -635,15 +635,11 @@ __webpack_require__.r(__webpack_exports__);
|
||||
const environment = {
|
||||
production: false,
|
||||
apiURL: 'https://equilibrium.dyndns.info/GabineteDigital.Services/V4/api/',
|
||||
<<<<<<< HEAD
|
||||
apiChatUrl: 'http://chat.gabinetedigital.local:3000/api/v1/',
|
||||
=======
|
||||
/* apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/V3/api/', */
|
||||
apiChatUrl: 'https://www.tabularium.pt/api/v1/',
|
||||
/* apiChatUrl: 'http://chat.gabinetedigital.local:3000/api/v1/', */
|
||||
>>>>>>> feature/chat
|
||||
domain: 'gabinetedigital.local',
|
||||
defaultuser: 'paulo.pinto',
|
||||
defaultuser: 'tiagox.kayaya',
|
||||
defaultuserpwd: 'tabteste@006'
|
||||
};
|
||||
/*
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -776,17 +776,13 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
||||
var environment = {
|
||||
production: false,
|
||||
apiURL: 'https://equilibrium.dyndns.info/GabineteDigital.Services/V4/api/',
|
||||
<<<<<<< HEAD
|
||||
apiChatUrl: 'http://chat.gabinetedigital.local:3000/api/v1/',
|
||||
=======
|
||||
|
||||
/* apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/V3/api/', */
|
||||
apiChatUrl: 'https://www.tabularium.pt/api/v1/',
|
||||
|
||||
/* apiChatUrl: 'http://chat.gabinetedigital.local:3000/api/v1/', */
|
||||
>>>>>>> feature/chat
|
||||
domain: 'gabinetedigital.local',
|
||||
defaultuser: 'paulo.pinto',
|
||||
defaultuser: 'tiagox.kayaya',
|
||||
defaultuserpwd: 'tabteste@006'
|
||||
};
|
||||
/*
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -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");
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -144,8 +146,6 @@ let LoginPage = class LoginPage {
|
||||
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 };
|
||||
}
|
||||
ngOnInit() {
|
||||
}
|
||||
@@ -165,27 +165,20 @@ let LoginPage = class LoginPage {
|
||||
yield alert.present();
|
||||
});
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
/* 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) => {
|
||||
let postData = {
|
||||
"user": this.username,
|
||||
"password": this.password
|
||||
};
|
||||
this.authService.loginChat(postData).subscribe((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');
|
||||
this.presentAlert('Login to Rocket chat OK');
|
||||
}, (error) => {
|
||||
console.log('Network error');
|
||||
this.presentAlert('Network error ' + error);
|
||||
});
|
||||
}
|
||||
>>>>>>> feature/chat
|
||||
Login() {
|
||||
return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__awaiter"])(this, void 0, void 0, function* () {
|
||||
try {
|
||||
@@ -199,7 +192,8 @@ let LoginPage = class LoginPage {
|
||||
BasicAuthKey: ""
|
||||
};
|
||||
if (yield this.authService.login(this.userattempt)) {
|
||||
/* this.loginRocketChat(); */
|
||||
console.log(this.userattempt);
|
||||
this.loginRocketChat();
|
||||
this.router.navigate(['/home/events']);
|
||||
}
|
||||
else {
|
||||
@@ -224,7 +218,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"])([
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -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"]
|
||||
}];
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user