mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +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.processes.GetTaskListExpediente(false).subscribe(async res => {
|
||||||
this.skeletonLoader = true
|
this.skeletonLoader = true
|
||||||
|
const result = res
|
||||||
try {
|
|
||||||
const expediente: object[] = await this.processes.GetTaskListExpediente(false).toPromise()
|
|
||||||
const result = expediente
|
|
||||||
|
|
||||||
this.taskslist = new Array();
|
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)
|
let task = this.expedienteTaskPipe.transform(element)
|
||||||
this.taskslist.push(task);
|
this.taskslist.push(task);
|
||||||
this.sqliteservice.addProcess(task);
|
this.addProcessTODb(task);
|
||||||
});
|
});
|
||||||
|
|
||||||
this.listToPresent = this.taskslist
|
this.listToPresent = this.taskslist
|
||||||
console.log('expediente list', this.listToPresent)
|
console.log('expediente list', this.listToPresent)
|
||||||
|
|
||||||
} catch (error) {
|
|
||||||
this.toastService.badRequest('Processo não encontrado')
|
|
||||||
this.goBack()
|
|
||||||
} finally {
|
|
||||||
this.skeletonLoader = false;
|
this.skeletonLoader = false;
|
||||||
}
|
|
||||||
}, (error) => {
|
}, (error) => {
|
||||||
this.getEventsFromLocalDb();
|
this.getEventsFromLocalDb();
|
||||||
})
|
})
|
||||||
@@ -119,6 +110,13 @@ export class ExpedientePage implements OnInit {
|
|||||||
this.router.navigate(['/home/gabinete-digital/expediente', serialNumber, 'gabinete-digital']);
|
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) {
|
SqliteAddExpediente(list) {
|
||||||
list.forEach((expediente) => {
|
list.forEach((expediente) => {
|
||||||
let data = {
|
let data = {
|
||||||
|
|||||||
Reference in New Issue
Block a user