mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
fix
This commit is contained in:
@@ -59,7 +59,7 @@ export class EventListPage implements OnInit {
|
||||
ngOnChanges() {
|
||||
this.LoadToApproveEvents();
|
||||
setTimeout(() => {
|
||||
this.LoadToApproveEvents();
|
||||
this.LoadToApproveEventsNoLoader();
|
||||
}, 3000)
|
||||
}
|
||||
|
||||
@@ -107,6 +107,43 @@ export class EventListPage implements OnInit {
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
async LoadToApproveEventsNoLoader() {
|
||||
|
||||
try {
|
||||
if(this.segment == 'MDGPR') {
|
||||
let mdEventsOficial = await this.processes.GetTasksList('Agenda Oficial MDGPR', false).toPromise();
|
||||
let mdEventsPessoal = await this.processes.GetTasksList('Agenda Pessoal MDGPR', false).toPromise();
|
||||
|
||||
let allEvents = mdEventsOficial.concat(mdEventsPessoal);
|
||||
if(allEvents.length > 0) {
|
||||
this.eventsMDGPRList = this.sortService.sortArrayByDate(allEvents).reverse();
|
||||
}
|
||||
this.showLoader = false;
|
||||
}
|
||||
else if(this.segment == 'PR') {
|
||||
let prEventsOficial = await this.processes.GetTasksList('Agenda Oficial PR', false).toPromise();
|
||||
let prEventsPessoal = await this.processes.GetTasksList('Agenda Pessoal PR', false).toPromise();
|
||||
let allEvents = prEventsOficial.concat(prEventsPessoal);
|
||||
|
||||
if(allEvents.length > 0) {
|
||||
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;
|
||||
}
|
||||
|
||||
} catch(erro) {
|
||||
this.showLoader = false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
async openApproveModal(eventSerialNumber, data) {
|
||||
|
||||
Reference in New Issue
Block a user