mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 13:26:08 +00:00
Notification click open app
This commit is contained in:
+21
-36
@@ -98,48 +98,36 @@ export class HomePage implements OnInit {
|
||||
pushCordova() {
|
||||
|
||||
this.fcm.onNotification().subscribe(data => {
|
||||
this.viewEventDetail(data.idObject)
|
||||
this.viewEventDetail(data.IdObject)
|
||||
if (data.click_action) {
|
||||
console.log("Received in background: ", data);
|
||||
|
||||
if (data.service === "agenda") {
|
||||
//this.router.navigate(['/home/', service, idObject, 'home']);
|
||||
this.viewEventDetail(data.idObject)
|
||||
if (data.Service === "agenda") {
|
||||
//this.router.navigate(['/home/', service, IdObject, 'home']);
|
||||
this.viewEventDetail(data.IdObject)
|
||||
}
|
||||
else if (data.service === "gabinete-digital" && data.object === "expediente") {
|
||||
this.viewExpedientDetail(data.idObject)
|
||||
else if (data.Service === "gabinete-digital" && data.Object === "expediente") {
|
||||
this.viewExpedientDetail(data.IdObject)
|
||||
}
|
||||
else if (data.service === "gabinete-digital" && data.object === "event-list") {
|
||||
// this.ngZone.run(() => {this.router.navigate(['/home/gabinete-digital/event-list', idObject])})
|
||||
this.openApproveModal(data.idObject);
|
||||
else if (data.Service === "gabinete-digital" && data.Object === "event-list") {
|
||||
// this.ngZone.run(() => {this.router.navigate(['/home/gabinete-digital/event-list', IdObject])})
|
||||
this.openApproveModal(data.IdObject);
|
||||
}
|
||||
else if (data.service === "accoes" && data.object === "accao") {
|
||||
//this.viewPublications(data.idObject)
|
||||
alert(data.idObject)
|
||||
else if (data.Service === "accoes" && data.Object === "accao") {
|
||||
this.viewPublications(data.IdObject)
|
||||
alert(data.IdObject)
|
||||
}
|
||||
else if (data.service === "accoes" && data.object === "publicacao") {
|
||||
this.viewPublicationDetail(data.idObject)
|
||||
else if (data.Service === "accoes" && data.Object === "publicacao") {
|
||||
this.viewPublicationDetail(data.IdObject)
|
||||
}
|
||||
|
||||
} else {
|
||||
console.log("Received in foreground: ", data);
|
||||
if (data.service === "agenda") {
|
||||
//this.router.navigate(['/home/', service, idObject, 'home']);
|
||||
this.viewEventDetail(data.idObject)
|
||||
}
|
||||
else if (data.service === "gabinete-digital" && data.object === "expediente") {
|
||||
this.viewExpedientDetail(data.idObject)
|
||||
}
|
||||
else if (data.service === "gabinete-digital" && data.object === "event-list") {
|
||||
// this.ngZone.run(() => {this.router.navigate(['/home/gabinete-digital/event-list', idObject])})
|
||||
this.openApproveModal(data.idObject);
|
||||
}
|
||||
else if (data.service === "accoes" && data.object === "accao") {
|
||||
this.viewPublications(data.idObject)
|
||||
}
|
||||
else if (data.service === "accoes" && data.object === "publicacao") {
|
||||
this.viewPublicationDetail(data.idObject)
|
||||
}
|
||||
|
||||
console.log(data.Service)
|
||||
console.log(data.Object)
|
||||
console.log(data.IdObject)
|
||||
|
||||
};
|
||||
});
|
||||
|
||||
@@ -148,12 +136,9 @@ export class HomePage implements OnInit {
|
||||
// backend.registerToken(token);
|
||||
});
|
||||
|
||||
this.ubscribeToTopic()
|
||||
this.getToken()
|
||||
|
||||
}
|
||||
|
||||
ubscribeToTopic() {
|
||||
/* ubscribeToTopic() {
|
||||
this.fcm.subscribeToTopic('enappd');
|
||||
}
|
||||
getToken() {
|
||||
@@ -162,7 +147,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);
|
||||
|
||||
Reference in New Issue
Block a user