Bug connectiong with mobilefirst fixid

This commit is contained in:
Eudes Inácio
2021-06-30 11:51:29 +01:00
parent 53ee2306f5
commit 6d907aa7de
2 changed files with 5 additions and 21 deletions
+4 -20
View File
@@ -5,12 +5,10 @@ import { EventsService } from '../services/events.service';
import { Event } from '../models/event.model';
import { ProcessesService } from '../services/processes.service';
import { NotificationsService } from '../services/notifications.service';
import { WebNotificationsService } from '../services/webnotifications.service';
import { ModalController, AlertController, AnimationController, Platform } from '@ionic/angular';
import { NavigationExtras,Router } from '@angular/router';
import { ToastService } from '../services/toast.service';
@Component({
selector: 'app-home',
templateUrl: './home.page.html',
@@ -55,7 +53,6 @@ export class HomePage implements OnInit {
private toastService: ToastService,
private animationController: AnimationController,
private notificatinsservice: NotificationsService,
private webnotificatinsservice: WebNotificationsService,
private platform: Platform) {
router.events.subscribe((val) => {
@@ -69,15 +66,11 @@ export class HomePage implements OnInit {
}
ngOnInit() {
console.log('Home');
if(this.platform.is('desktop') /* || this.platform.is('mobileweb') */) {
/* this.webnotificatinsservice.webconnection();
this.webnotificatinsservice.onReceviNotificationWeb(); */
console.log('desktop');
if(this.platform.is('desktop') || this.platform.is('mobileweb')) {
console.log('Notifications not supported')
} else {
/* this.mobilefirstConnect();
this.notificatinsservice.onReceviNotification(); */
console.log('mobile');
this.mobilefirstConnect();
this.notificatinsservice.onReceviNotification();
}
this.count();
@@ -110,7 +103,6 @@ export class HomePage implements OnInit {
}
mobilefirstConnect() {
console.log('MobileFirst Connect')
WLAuthorizationManager.obtainAccessToken("").then(
(token) => {
console.log('MobileFirst Server connect: Success ' + token);
@@ -141,12 +133,4 @@ export class HomePage implements OnInit {
);
}
}
+1 -1
View File
@@ -136,7 +136,7 @@ export class NotificationsService {
}else if (data.Service === "gabinete-digital" && data.Object === "despachos") {
let navigationExtras: NavigationExtras = {
queryParams: {
"serialNumber": data.IdObject,
serialNumber: data.IdObject,
}
};
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/despachos/despacho'], navigationExtras));