mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Bug connectiong with mobilefirst fixid
This commit is contained in:
@@ -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 {
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user