This commit is contained in:
Peter Maquiran
2021-07-17 14:02:05 +01:00
parent 133e3ad122
commit b1c165bf87
23 changed files with 240 additions and 142 deletions
@@ -41,10 +41,16 @@ export class PendentesPage implements OnInit {
//Inicializar segment
this.segment = "despachos";
// update list
this.LoadList();
this.router.events.forEach((event) => {
if (event instanceof NavigationEnd &&
event.url.startsWith('/home/gabinete-digital?pendentes=true')) {
this.LoadList();
if(window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {
this.doRefresh()
} else {
this.LoadList()
}
}
});
@@ -98,10 +104,14 @@ export class PendentesPage implements OnInit {
doRefresh() {
this.LoadList();
setTimeout(()=>{
this.LoadList();
}, 1000)
}
async viewTaskDetails(serialNumber:string, workflowName:string) {
async viewTaskDetails(serialNumber:string, workflowName:string , task) {
console.log(this.profile);
if(workflowName == 'Despacho') {
this.router.navigate(['/home/gabinete-digital/despachos',serialNumber,'gabinete-digital']);
@@ -111,9 +121,13 @@ export class PendentesPage implements OnInit {
}
else if(workflowName == 'Expediente') {
this.router.navigate(['/home/gabinete-digital/expediente',serialNumber,'gabinete-digital']);
} else if (task.activityInstanceName == "Tarefa de Parecer") {
this.router.navigate(['/home/gabinete-digital/pedidos',serialNumber,'gabinete-digital']);
} else if(task.activityInstanceName == "Tarefa de Despacho") {
this.router.navigate(['/home/gabinete-digital/despachos',serialNumber,'gabinete-digital']);
} else {
console.log('cant find page for this task', workflowName)
}
console.log('cant find page for this task', task)
}
}