Delete notifications bug fix

This commit is contained in:
Eudes Inácio
2021-11-09 08:11:05 +01:00
parent 2c549931e5
commit b2de209cd4
+14 -30
View File
@@ -85,8 +85,10 @@ export class ProfilePage implements OnInit {
this.DataArray = []
value.forEach((element, i) => {
let notificationObject;
if (element.data) {
console.log("ARaaAA", element)
let notificationObject = {
notificationObject = {
index: i,
title: element.title,
Service: element.data.Service,
@@ -101,41 +103,23 @@ export class ProfilePage implements OnInit {
Role: element.data.Role,
Status: element.data.Status
}
/* if(element.payload){
var payload = JSON.parse(element.payload)
notificationObject = {
//index: i,
//alert: element.alert,
Service: payload.Service,
Object: payload.Object,
IdObject: payload.IdObject,
//FolderId: payload.FolderId,
//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
}
} else {
notificationObject = {
index: i,
alert: element.alert,
Service: element.Service,
Object: element.Object,
IdObject: element.IdObject,
FolderId: element.FolderId,
desc: element.desc,
dateInit: element.dateInit,
dateEnd: element.dateEnd,
IdObject: element.IdObject,
Location: element.Location,
TypeAgenda: element.TypeAgenda,
Object: element.Object,
Role: element.Role,
Status: element.Status
Service: element.Service,
Status: element.Status,
TypeAgenda: element.TypeAgenda,
body: element.body,
dateEnd: element.dateEnd,
dateInit: element.dateInit,
index: element.index,
title: element.title
}
}
}*/
this.DataArray.push(notificationObject)
});