This commit is contained in:
tiago.kayaya
2021-06-25 15:50:27 +01:00
3 changed files with 15 additions and 6 deletions
+6 -4
View File
@@ -66,10 +66,12 @@ export class HomePage implements OnInit {
}
ngOnInit() {
if(!this.platform.is('desktop')) {
/* this.mobilefirstConnect();
this.notificatinsservice.onReceviNotification(); */
}
if(this.platform.is('desktop') || this.platform.is('mobileweb')) {
console.log('Notifications not supported')
} else {
this.mobilefirstConnect();
this.notificatinsservice.onReceviNotification();
}
this.count();
}
+1 -1
View File
@@ -133,7 +133,7 @@ export class LoginPage implements OnInit {
if (attempt) {
//this.loginRocketChat();
this.authService.loginChat(this.userattempt);
//this.getToken();
this.getToken();
if(!this.pin) {
this.setPint = true
+8 -1
View File
@@ -35,7 +35,7 @@ export class NotificationsService {
}
getAndpostToken(username) {
if (this.platform.is('desktop')) {
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
console.log('Notifications not supported')
} else {
@@ -133,6 +133,13 @@ export class NotificationsService {
}
else if (data.Service === "gabinete-digital" && data.Object === "event-list") {
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/event-list/approve-event',data.IdObject, 'gabinete-digital']));
}else if (data.Service === "gabinete-digital" && data.Object === "despachos") {
let navigationExtras: NavigationExtras = {
queryParams: {
"serialNumber": data.IdObject,
}
};
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/despachos/despacho'], navigationExtras));
}
else if (data.Service === "gabinete-digital" && data.Object === "parecer") {
let navigationExtras: NavigationExtras = {