diff --git a/src/app/home/home.page.ts b/src/app/home/home.page.ts
index 070babc46..946a63ea8 100644
--- a/src/app/home/home.page.ts
+++ b/src/app/home/home.page.ts
@@ -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();
diff --git a/src/app/services/webnotifications.service.ts b/src/app/services/webnotifications.service.ts
index c528bc51c..ec446a1e8 100644
--- a/src/app/services/webnotifications.service.ts
+++ b/src/app/services/webnotifications.service.ts
@@ -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);
}
diff --git a/src/index.html b/src/index.html
index f1e90bcc6..553bfaa3f 100644
--- a/src/index.html
+++ b/src/index.html
@@ -7,11 +7,11 @@
-
-
+
+
-
+