mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
IBM Web notification config add
This commit is contained in:
@@ -7,6 +7,7 @@ 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 { Router, ActivatedRoute } from '@angular/router';
|
||||
import { ToDayEventStorage } from '../store/to-day-event-storage.service';
|
||||
@@ -73,7 +74,7 @@ export class HomePage implements OnInit {
|
||||
private notificatinsservice: NotificationsService,
|
||||
private platform: Platform,
|
||||
private activeroute: ActivatedRoute,
|
||||
// private network: NetworkService,
|
||||
private webnotification: WebNotificationsService,
|
||||
public p: PermissionService,
|
||||
public documentCounterService: DocumentCounterService) {
|
||||
|
||||
@@ -105,7 +106,8 @@ export class HomePage implements OnInit {
|
||||
this.network.checkNetworkDisconnection; */
|
||||
console.log('Active route ', this.router.url)
|
||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||
console.log('Notifications not supported')
|
||||
this.webnotification.webconnection();
|
||||
this.webnotification.onReceviNotificationWeb();
|
||||
} else {
|
||||
this.mobilefirstConnect();
|
||||
this.notificatinsservice.getAndpostToken2();
|
||||
|
||||
@@ -32,10 +32,10 @@ export class WebNotificationsService {
|
||||
webconnection() {
|
||||
|
||||
|
||||
MFPPush.initialize({
|
||||
/* MFPPush.initialize({
|
||||
appId: "com.gpr.gabinetedigital",
|
||||
mfpContextRoot: "/mfp",
|
||||
});
|
||||
}); */
|
||||
|
||||
MFPPush.registerDevice()
|
||||
.then((res) => {
|
||||
@@ -72,7 +72,9 @@ async onReceviNotificationWeb() {
|
||||
|
||||
if(message.actionName){
|
||||
//this.notificatinsRoutes(data);
|
||||
console.log("Web notification")
|
||||
} else {
|
||||
console.log("Web notification")
|
||||
//this.toastService.notificationMessage(message.alert,this.notificatinsRoutes, data);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user