This commit is contained in:
Peter Maquiran
2022-05-16 14:29:42 +01:00
parent 286c28e9ba
commit cdf921975c
4 changed files with 106 additions and 116 deletions
@@ -18,8 +18,8 @@ import { Storage } from '@ionic/storage';
export class EventsToApprovePage implements OnInit {
showLoader: boolean;
eventsPRList: any = []
eventsMDGPRList;
eventsPRList: any = [];
eventsMDGPRList: any = [];
eventPerson: EventPerson;
eventBody: EventBody;
categories: string[];
@@ -41,7 +41,7 @@ export class EventsToApprovePage implements OnInit {
}
ngOnInit() {
console.log('ERROR LEGN',this.eventsMDGPRList.length)
// console.log('ERROR LEGN',this.eventsMDGPRList.length)
this.segment = this.loggeduser.Profile;
this.LoadToApproveEvents();
@@ -67,16 +67,14 @@ export class EventsToApprovePage implements OnInit {
this.showLoader = true;
this.getFromDB();
if(this.segment != 'PR'){
if(this.segment != 'PR') {
let mdEventsOficial = await this.processes.GetTasksList('Agenda Oficial MDGPR', false).toPromise();
let mdEventsPessoal = await this.processes.GetTasksList('Agenda Pessoal MDGPR', false).toPromise();
console.log(mdEventsOficial)
console.log(mdEventsPessoal)
this.eventsMDGPRList = mdEventsOficial.concat(mdEventsPessoal);
this.eventsMDGPRList = this.sortService.sortArrayByDate(this.eventsMDGPRList)
this.eventsMDGPRList = this.eventsMDGPRList.filter(function(item) {
return item.activityInstanceName != 'Editar Evento'
})
})
console.log(this.eventsMDGPRList)