mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
Bug no expediente presenting list
This commit is contained in:
@@ -67,30 +67,21 @@ export class ExpedientePage implements OnInit {
|
||||
|
||||
this.processes.GetTaskListExpediente(false).subscribe(async res => {
|
||||
this.skeletonLoader = true
|
||||
|
||||
try {
|
||||
const expediente: object[] = await this.processes.GetTaskListExpediente(false).toPromise()
|
||||
const result = expediente
|
||||
const result = res
|
||||
|
||||
this.taskslist = new Array();
|
||||
let res = result.reverse().filter((data: any) => data.workflowInstanceDataFields.Status == "Active");
|
||||
let ress = result.reverse().filter((data: any) => data.workflowInstanceDataFields.Status == "Active");
|
||||
|
||||
res.forEach((element: any) => {
|
||||
ress.forEach((element: any) => {
|
||||
|
||||
let task = this.expedienteTaskPipe.transform(element)
|
||||
this.taskslist.push(task);
|
||||
this.sqliteservice.addProcess(task);
|
||||
this.addProcessTODb(task);
|
||||
});
|
||||
|
||||
this.listToPresent = this.taskslist
|
||||
console.log('expediente list', this.listToPresent)
|
||||
|
||||
} catch (error) {
|
||||
this.toastService.badRequest('Processo não encontrado')
|
||||
this.goBack()
|
||||
} finally {
|
||||
this.skeletonLoader = false;
|
||||
}
|
||||
}, (error) => {
|
||||
this.getEventsFromLocalDb();
|
||||
})
|
||||
@@ -119,6 +110,13 @@ export class ExpedientePage implements OnInit {
|
||||
this.router.navigate(['/home/gabinete-digital/expediente', serialNumber, 'gabinete-digital']);
|
||||
}
|
||||
|
||||
addProcessTODb(task) {
|
||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||
} else {
|
||||
this.sqliteservice.addProcess(task);
|
||||
}
|
||||
}
|
||||
|
||||
SqliteAddExpediente(list) {
|
||||
list.forEach((expediente) => {
|
||||
let data = {
|
||||
|
||||
Reference in New Issue
Block a user