project migated to capacitor

This commit is contained in:
Eudes Inácio
2021-11-04 06:39:39 +01:00
parent d7745a1ed3
commit 84f2c1cc36
15 changed files with 310 additions and 1893 deletions
+34 -23
View File
@@ -1,5 +1,3 @@
///<reference path="../../../../plugins/cordova-plugin-mfp/typings/worklight.d.ts" />
/* ///<reference path="../../../../plugins/cordova-plugin-mfp-jsonstore/typings/jsonstore.d.ts" /> */
import { Component, OnInit, NgZone } from '@angular/core';
import { Router, NavigationExtras } from '@angular/router';
import { AnimationController, ModalController,Platform } from '@ionic/angular';
@@ -7,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'
@@ -39,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
) {
@@ -63,14 +59,14 @@ export class ProfilePage implements OnInit {
this.getNotificationData();
}
this.notificationsService.registerCallback(
/* this.notificationsService.registerCallback(
'any',
() => {
setTimeout(()=>{
this.getNotificationData();
}, 100)
}
)
) */
}
@@ -98,22 +94,37 @@ export class ProfilePage implements OnInit {
value.forEach((element,i) => {
console.log("ARaaAA", element)
let notificationObject;
if(element.payload){
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
}
/* 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 = {
@@ -130,8 +141,8 @@ export class ProfilePage implements OnInit {
TypeAgenda: element.TypeAgenda,
Role: element.Role,
Status: element.Status
}
}
}
}*/
this.DataArray.push(notificationObject)
@@ -202,7 +213,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"