inprove image quality on publications and envent to aprove offline

This commit is contained in:
Eudes Inácio
2021-12-08 19:39:30 +01:00
parent 17dcecc13e
commit ed9fa5829f
5 changed files with 51 additions and 16 deletions
@@ -84,18 +84,48 @@ export class EventListPage implements OnInit {
this.platform.ready().then(() => {
this.sqliteservice.getListOfEventAprove('Agenda Oficial MDGPR', 'Agenda Pessoal MDGPR').then((event: any[]) => {
this.eventsMDGPRList = this.sortService.sortDate(event, 'taskStartDate')
this.eventsMDGPRList = this.sortService.sortDate(this.transformaDataDB(event), 'taskStartDate')
//this.eventsMDGPRList = this.eventsMDGPRList.filter(element => element.interveners != null)
console.log('MD event to aprove', this.eventsMDGPRList)
})
this.sqliteservice.getListOfEventAprove('Agenda Oficial PR', 'Agenda Pessoal PR').then((event: any[]) => {
this.eventsPRList = this.sortService.sortDate(event, 'taskStartDate')
this.eventsPRList = this.sortService.sortDate(this.transformaDataDB(event), 'taskStartDate')
console.log('PR event to aprove', this.eventsPRList)
})
})
console.log('Offlineee')
}
transformaDataDB(events) {
let MdEventsArray = [];
for (let i of events) {
let eventMD = {
Documents: i.Documents,
actions: i.actions,
activityInstanceName: i.activityInstanceName,
formURL: i.formURL,
interveners: i.interveners,
originator: i.originator,
serialNumber: i.serialNumber,
taskStartDate: i.taskStartDate,
totalDocuments: i.totalDocuments,
workflowDisplayName: i.workflowDisplayName,
workflowID: i.workflowID,
workflowInstanceDataFields: JSON.parse(i.workflowInstanceDataFields),
workflowInstanceFolio: i.workflowInstanceFolio,
workflowInstanceID: i.workflowInstanceID,
workflowName: i.workflowName,
}
MdEventsArray.push(eventMD);
}
return MdEventsArray;
}
segmentChanged(ev: any) {
this.LoadToApproveEvents();
}
@@ -111,13 +141,15 @@ export class EventListPage implements OnInit {
let mdEventsPessoal = await this.processes.GetTasksList('Agenda Pessoal MDGPR', false).toPromise();
this.eventsMDGPRList = mdEventsOficial.concat(mdEventsPessoal);
this.eventsMDGPRList = this.sortService.sortDate(this.eventsMDGPRList, 'taskStartDate')
console.log('MD EVENT TO APROVE ONLINE',this.eventsMDGPRList)
this.eventaprovacaostore.resetmd(this.sortService.sortArrayByDate(this.eventsMDGPRList).reverse());
}
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();
this.eventsPRList = prEventsOficial.concat(prEventsPessoal);
this.eventsPRList = this.sortService.sortDate(this.eventsPRList, 'taskStartDate')
this.eventsPRList = this.sortService.sortDate(this.eventsPRList, 'taskStartDate')
console.log('PR EVENT TO APROVE ONLINE',this.eventsPRList)
this.eventaprovacaostore.resetpr(this.sortService.sortArrayByDate(this.eventsPRList).reverse());
}
this.showLoader = false;