This commit is contained in:
tiago.kayaya
2021-04-13 11:42:54 +01:00
parent 4949a0be72
commit 755ca81b63
+16 -9
View File
@@ -8,7 +8,7 @@ import { ModalController, AlertController, AnimationController } from '@ionic/an
/* import { Plugins, PushNotification, PushNotificationToken, PushNotificationActionPerformed, Modals } from '@capacitor/core'; */
import { Router } from '@angular/router';
import { FCM } from 'cordova-plugin-fcm-with-dependecy-updated/ionic/ngx';
//import { FCM } from 'cordova-plugin-fcm-with-dependecy-updated/ionic/ngx';
import { ViewEventPage } from '../pages/agenda/view-event/view-event.page';
import { ApproveEventModalPage } from '../pages/agenda/approve-event-modal/approve-event-modal.page';
import { ExpedienteDetailPage } from '../pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page';
@@ -52,7 +52,14 @@ export class HomePage implements OnInit {
postEvent: any;
folderId: string;
constructor(private zone: NgZone, private eventService: EventsService, private processesbackend: ProcessesService, private router: Router, private modalController: ModalController, public modalCtrl: AlertController, private fcm: FCM, private animationController: AnimationController,) {
constructor(private zone: NgZone,
private eventService: EventsService,
private processesbackend: ProcessesService,
private router: Router,
private modalController: ModalController,
public modalCtrl: AlertController,
//private fcm: FCM,
private animationController: AnimationController,) {
router.events.subscribe((val) => {
document.querySelectorAll('ion-modal').forEach((e) => e.remove())
@@ -66,8 +73,8 @@ export class HomePage implements OnInit {
ngOnInit() {
this.pushCordova()
/* //Initialize profile as mdgpr
//this.pushCordova();
//Initialize profile as mdgpr
let date = new Date();
date.setMonth(date.getMonth() + 1);
@@ -92,11 +99,11 @@ export class HomePage implements OnInit {
this.totalExpediente = result;
});
*/
}
pushCordova() {
/*
this.fcm.onNotification().subscribe(data => {
this.viewEventDetail(data.idObject)
if (data.click_action) {
@@ -149,11 +156,11 @@ export class HomePage implements OnInit {
});
this.ubscribeToTopic()
this.getToken()
this.getToken() */
}
ubscribeToTopic() {
/* ubscribeToTopic() {
this.fcm.subscribeToTopic('enappd');
}
getToken() {
@@ -162,7 +169,7 @@ export class HomePage implements OnInit {
// Register your new token in your back-end if you want
// backend.registerToken(token);
});
}
} */
async viewEventDetail(eventId: any) {
console.log(this.profile);