get events to aprove solved

This commit is contained in:
Eudes Inácio
2022-12-17 13:32:52 +01:00
parent 096d017d43
commit 79f343ca49
3 changed files with 36 additions and 1 deletions
@@ -18,6 +18,7 @@ export class EventListPage implements OnInit {
showLoader: boolean;
eventsPRList: any = []
eventsMDGPRList: any = []
eventsGenericList: any = []
eventPerson: EventPerson;
eventBody: EventBody;
categories: string[];
@@ -42,6 +43,9 @@ export class EventListPage implements OnInit {
ngOnInit() {
this.segment = this.loggeduser.Profile;
if(this.segment != "PR" && this.segment != "MDGPR") {
this.segment = "Unknown";
}
const pathname = window.location.pathname
@@ -86,6 +90,12 @@ export class EventListPage implements OnInit {
this.eventsPRList = this.sortService.sortArrayByDate(allEvents).reverse();
}
this.showLoader = false;
} else {
let genericEvents = await this.processes.GetTasksList('Agendar Evento', false).toPromise();
if(genericEvents.length > 0) {
this.eventsGenericList = this.sortService.sortArrayByDate(genericEvents).reverse();
}
this.showLoader = false;
}
}