some corrections

This commit is contained in:
tiago.kayaya
2021-01-05 13:58:15 +01:00
parent 8e1d1b502a
commit 5a8a7d76c4
5 changed files with 60 additions and 5 deletions
+5
View File
@@ -37,6 +37,7 @@ export class EventsPage implements OnInit {
/* Set segment variable */
segment:string;
public profile:string;
currentEvent: any;
eventsList: Event[];
officialeventsList: Event[];
@@ -130,12 +131,16 @@ export class EventsPage implements OnInit {
if(this.profile == "mdgpr"){
this.eventService.getAllMdEvents(formatDate(new Date(), 'yyyy-MM-dd HH:mm:ss', 'pt') /* + ' 00:00:00' */, formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 23:59:59').subscribe(res => {
this.eventsList = res;
this.currentEvent = res[0].Subject;
this.totalEvent = this.eventsList.length;
this.showLoader = false;
});
}else{
this.eventService.getAllPrEvents(formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 00:00:00', formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 23:59:59').subscribe(res => {
this.eventsList = res;
console.log(this.eventsList);
this.currentEvent = res[0].Subject;
this.totalEvent = this.eventsList.length;
this.showLoader = false;
});
}