diff --git a/src/app/home/home.page.ts b/src/app/home/home.page.ts index 5d9561374..841a86ff0 100644 --- a/src/app/home/home.page.ts +++ b/src/app/home/home.page.ts @@ -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(); } diff --git a/src/app/pages/login/login.page.ts b/src/app/pages/login/login.page.ts index a36401d82..50b902e5c 100644 --- a/src/app/pages/login/login.page.ts +++ b/src/app/pages/login/login.page.ts @@ -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 diff --git a/src/app/services/notifications.service.ts b/src/app/services/notifications.service.ts index 0846829e1..bf7396d88 100644 --- a/src/app/services/notifications.service.ts +++ b/src/app/services/notifications.service.ts @@ -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 = {