Merge after pull

This commit is contained in:
Eudes Inácio
2021-06-16 08:43:02 +01:00
9 changed files with 240 additions and 171 deletions
+14 -11
View File
@@ -83,10 +83,11 @@ export class HomePage implements OnInit {
} else {
this.wlCommonInit();
}
this.count();
//Add a test
//this.pushCordova();
//Initialize profile as mdgpr
}
async count(){
let date = new Date();
date.setMonth(date.getMonth() + 1);
@@ -95,16 +96,18 @@ export class HomePage implements OnInit {
this.profile = "mdgpr";
if (this.profile == "mdgpr") {
this.eventService.getAllMdEvents(start, end).subscribe(res => {
this.eventsList = res;
this.totalEvent = this.eventsList.length;
});
let mdOficialEvents = await this.eventService.getAllPrOficialEvents(start, end).toPromise();
let mdPessoalEvents = await this.eventService.getAllPrPessoalEvents(start, end).toPromise();
this.eventsList = mdOficialEvents.concat(mdPessoalEvents)
this.totalEvent = this.eventsList.length;
}
else {
this.eventService.getAllPrEvents(start, end).subscribe(res => {
this.eventsList = res;
this.totalEvent = this.eventsList.length;
});
let prOficialEvents = await this.eventService.getAllPrOficialEvents(start, end).toPromise();
let prPessoalEvents = await this.eventService.getAllPrPessoalEvents(start, end).toPromise();
this.eventsList = prOficialEvents.concat(prPessoalEvents)
this.totalEvent = this.eventsList.length;
}