mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Merge with migraCapacitor
This commit is contained in:
@@ -5,9 +5,8 @@ import { LoginUserRespose } from 'src/app/models/user.model';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
import { LocalstoreService } from 'src/app/store/localstore.service';
|
||||
import { EditProfilePage } from './edit-profile/edit-profile.page';
|
||||
import { JsonStore } from '../../services/jsonStore.service';
|
||||
import { StorageService } from '../../services/storage.service';
|
||||
import { NotificationsService } from '../../services/notifications.service';
|
||||
/* import { NotificationsService } from '../../services/notifications.service'; */
|
||||
import { SessionStore } from 'src/app/store/session.service';
|
||||
import { EventTrigger } from '../../services/eventTrigger.service';
|
||||
import { ThemeService } from 'src/app/services/theme.service'
|
||||
@@ -37,12 +36,11 @@ export class ProfilePage implements OnInit {
|
||||
private animationController: AnimationController,
|
||||
private router: Router,
|
||||
private localstoreService: LocalstoreService,
|
||||
private jsonstore: JsonStore,
|
||||
private storageservice: StorageService,
|
||||
private zone: NgZone,
|
||||
private notificationservice: NotificationsService,
|
||||
/* private notificationservice: NotificationsService, */
|
||||
private platform: Platform,
|
||||
private notificationsService: NotificationsService,
|
||||
/* private notificationsService: NotificationsService, */
|
||||
private eventtrigger: EventTrigger,
|
||||
public ThemeService: ThemeService
|
||||
) {
|
||||
@@ -61,14 +59,14 @@ export class ProfilePage implements OnInit {
|
||||
this.getNotificationData();
|
||||
}
|
||||
|
||||
this.notificationsService.registerCallback(
|
||||
/* this.notificationsService.registerCallback(
|
||||
'any',
|
||||
() => {
|
||||
setTimeout(()=>{
|
||||
this.getNotificationData();
|
||||
}, 100)
|
||||
}
|
||||
)
|
||||
) */
|
||||
|
||||
}
|
||||
|
||||
@@ -85,33 +83,40 @@ 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;
|
||||
if(element.payload){
|
||||
let notificationObject = {
|
||||
index: i,
|
||||
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)
|
||||
notificationObject = {
|
||||
index: i,
|
||||
alert: element.alert,
|
||||
//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
|
||||
//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 = {
|
||||
@@ -128,9 +133,9 @@ export class ProfilePage implements OnInit {
|
||||
TypeAgenda: element.TypeAgenda,
|
||||
Role: element.Role,
|
||||
Status: element.Status
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
this.DataArray.push(notificationObject)
|
||||
});
|
||||
@@ -200,7 +205,7 @@ export class ProfilePage implements OnInit {
|
||||
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/expedientes-pr', IdObject, 'gabinete-digital']));
|
||||
}
|
||||
|
||||
this.notificationservice.tempClearArray();
|
||||
//this.notificationservice.tempClearArray();
|
||||
this.deleteNotification(index);
|
||||
this.eventtrigger.publishSomeData({
|
||||
notification: "deleted"
|
||||
|
||||
Reference in New Issue
Block a user