mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
emended list of events for PR call
This commit is contained in:
@@ -88,17 +88,12 @@ export class EventsPage implements OnInit {
|
||||
this.eventsList = res;
|
||||
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.prEventList = res;
|
||||
this.eventService.getAllMdEvents(formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 00:00:00', formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 23:59:59').subscribe(res => {
|
||||
this.mdEventList = res;
|
||||
this.eventsList = this.prEventList.concat(this.mdEventList);
|
||||
this.eventsList = res;
|
||||
console.log(this.eventsList);
|
||||
this.showLoader = false;
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@@ -111,14 +106,9 @@ export class EventsPage implements OnInit {
|
||||
});
|
||||
}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.prEventList = res;
|
||||
this.eventService.getAllMdEvents(formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 00:00:00', formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 23:59:59').subscribe(res => {
|
||||
this.mdEventList = res;
|
||||
this.personaleventsList = this.prEventList.concat(this.mdEventList).filter(data => data.CalendarName == "Pessoal");
|
||||
console.log(this.personaleventsList);
|
||||
this.showLoader = false;
|
||||
});
|
||||
});
|
||||
this.personaleventsList = res.filter(data => data.CalendarName == "Pessoal");
|
||||
this.showLoader = false;
|
||||
});
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -130,14 +120,9 @@ export class EventsPage implements OnInit {
|
||||
});
|
||||
}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.prEventList = res;
|
||||
this.eventService.getAllMdEvents(formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 00:00:00', formatDate(new Date(), 'yyyy-MM-dd', 'pt') + ' 23:59:59').subscribe(res => {
|
||||
this.mdEventList = res;
|
||||
this.officialeventsList = this.prEventList.concat(this.mdEventList).filter(data => data.CalendarName == "Oficial");
|
||||
console.log(this.officialeventsList);
|
||||
this.showLoader = false;
|
||||
});
|
||||
});
|
||||
this.officialeventsList = res.filter(data => data.CalendarName == "Oficial");;
|
||||
this.showLoader = false;
|
||||
});
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user