mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
PushNotification param change name from service to Service and object to Object
This commit is contained in:
@@ -8,6 +8,7 @@ import { ModalController } from '@ionic/angular';
|
||||
import { PublicationDetailPage } from '../../app/pages/publications/view-publications/publication-detail/publication-detail.page';
|
||||
import { ViewPublicationsPage } from '../../app/pages/publications/view-publications/view-publications.page';
|
||||
import { ExpedienteDetailPage } from '../../app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page'
|
||||
import { ViewEventPage } from '../../app/pages/agenda/view-event/view-event.page'
|
||||
|
||||
import { Plugins, PushNotification, PushNotificationToken, PushNotificationActionPerformed, Modals } from '@capacitor/core';
|
||||
import { Router } from '@angular/router';
|
||||
@@ -97,9 +98,11 @@ export class HomePage implements OnInit {
|
||||
PushNotifications.addListener(
|
||||
'pushNotificationActionPerformed',
|
||||
(notification: PushNotificationActionPerformed) => {
|
||||
let service = notification.notification.data.service;
|
||||
let object = notification.notification.data.object;
|
||||
let idObject = notification.notification.data.idObject;
|
||||
let service = notification.notification.data.Service;
|
||||
let object = notification.notification.data.Object;
|
||||
let idObject = notification.notification.data.IdObject;
|
||||
|
||||
console.log('Complete Object: ', notification )
|
||||
|
||||
console.log('Service: ', service);
|
||||
console.log('Object: ', object);
|
||||
@@ -127,7 +130,8 @@ export class HomePage implements OnInit {
|
||||
service = "agenda" ? this.router.navigate(['/home/', service, idObject, 'home']) : */
|
||||
|
||||
if (service === "agenda") {
|
||||
this.router.navigate(['/home/', service, idObject, 'home']);
|
||||
//this.router.navigate(['/home/', service, idObject, 'home']);
|
||||
this.viewEventDetail(idObject)
|
||||
} else if (service === "gabinete-digital" && object != "expediente") {
|
||||
this.router.navigate(['/home/', service]);
|
||||
} else if (service === "gabinete-digital" && object === "expediente") {
|
||||
@@ -195,6 +199,26 @@ export class HomePage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
async viewEventDetail(eventId:any) {
|
||||
console.log(this.profile);
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: ViewEventPage,
|
||||
componentProps:{
|
||||
eventId: eventId,
|
||||
},
|
||||
cssClass: 'modal',
|
||||
backdropDismiss: false
|
||||
});
|
||||
await modal.present();
|
||||
modal.onDidDismiss().then((res)=>{
|
||||
if(res){
|
||||
console.log(res);
|
||||
//this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
async viewExpedientDetail(serialNumber:any) {
|
||||
console.log(this.profile);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user