Callback add at home page

This commit is contained in:
Eudes Inácio
2021-08-25 16:36:33 +01:00
52 changed files with 177 additions and 177 deletions
+24 -7
View File
@@ -2,18 +2,21 @@
/* tslint:disable */
///<reference path="../../../plugins/cordova-plugin-mfp/typings/worklight.d.ts" />
///<reference path="../../../plugins/cordova-plugin-mfp-push/typings/mfppush.d.ts" />
import { Component, OnInit, NgZone, Inject } from '@angular/core';
import { EventsService } from '../services/events.service';
import { Component, OnInit, NgZone } from '@angular/core';
import { Event } from '../models/event.model';
import { ProcessesService } from '../services/processes.service';
import { NotificationsService } from '../services/notifications.service';
<<<<<<< HEAD
import { WebNotificationsService } from '../services/webnotifications.service';
import { ModalController, AlertController, AnimationController, Platform } from '@ionic/angular';
=======
import { AlertController, Platform } from '@ionic/angular';
>>>>>>> 07435162e12e42437c43ac894bad4be11c64e70e
import { Router, ActivatedRoute } from '@angular/router';
import { ToDayEventStorage } from '../store/to-day-event-storage.service';
import { DocumentCounterService } from 'src/app/OtherService/document-counter.service'
import { PermissionService } from '../OtherService/permission.service';
import { TotalDocumentService, TotalDocumentStore } from '../store/total-document.service';
import { TotalDocumentStore } from '../store/total-document.service';
import { connection } from '../services/socket/synchro.service';
// import { NetworkService } from '../services/network.service';
@@ -68,10 +71,12 @@ export class HomePage implements OnInit {
postEvent: any;
folderId: string;
connection = connection
constructor(private zone: NgZone,
private router: Router,
public modalCtrl: AlertController,
private notificatinsservice: NotificationsService,
private notificationsService: NotificationsService,
private platform: Platform,
private activeroute: ActivatedRoute,
private webnotification: WebNotificationsService,
@@ -99,6 +104,18 @@ export class HomePage implements OnInit {
//this.folderId = this.navParams.get('folderId');
}
this.notificationsService.registerCallback(
'Create Depacho',
() =>{
this.refreshing()
}
)
}
refreshing() {
}
ngOnInit() {
@@ -110,8 +127,8 @@ export class HomePage implements OnInit {
this.webnotification.onReceviNotificationWeb();
} else {
this.mobilefirstConnect();
this.notificatinsservice.getAndpostToken2();
this.notificatinsservice.onReceviNotification();
this.notificationsService.getAndpostToken2();
this.notificationsService.onReceviNotification();
}
}