Push notifications with capacitor runing great

This commit is contained in:
Eudes Inácio
2021-11-05 07:49:01 +01:00
parent 84f2c1cc36
commit 1d58ef0615
12 changed files with 200 additions and 131 deletions
+13 -21
View File
@@ -83,31 +83,23 @@ export class ProfilePage implements OnInit {
this.storageservice.get("Notifications").then((value) => {
console.log("Init get store", value)
/* var data = JSON.parse(value); */
console.log("Init store parse", value)
if(typeof(value) == 'string') {
value = JSON.parse(value)
console.log("CSDfdvdf",value)
}
this.DataArray = []
value.forEach((element,i) => {
console.log("ARaaAA", element)
let notificationObject;
notificationObject = {
let notificationObject = {
index: i,
//alert: element.alert,
Service: element.Service,
Object: element.Object,
IdObject: element.IdObject,
FolderId: 1,
//desc: payload.desc,
//dateInit: this.getFormatedTime(payload.dateInit),
//dateEnd: this.getFormatedTime(payload.dateEnd),
//Location: payload.Location,
//TypeAgenda: payload.TypeAgenda,
//Role: payload.Role,
//Status: payload.Status
title: element.title,
Service: element.data.Service,
Object: element.data.Object,
IdObject: element.data.IdObject,
FolderId: element.data.FolderId,
body: element.body,
dateInit: this.getFormatedTime(element.data.dateInit),
dateEnd: this.getFormatedTime(element.data.dateEnd),
Location: element.data.Location,
TypeAgenda: element.data.TypeAgenda,
Role: element.data.Role,
Status: element.data.Status
}
/* if(element.payload){
var payload = JSON.parse(element.payload)