This commit is contained in:
Peter Maquiran
2023-08-10 16:46:55 +01:00
parent 8b3989de3b
commit 19ddb18148
33 changed files with 257 additions and 222 deletions
+23 -3
View File
@@ -44,6 +44,7 @@ export class TaskService {
AllProcess = []
showLoader: boolean = false
showLoaderNum = 0
loadCount = false
loadNum = 0
@@ -213,14 +214,20 @@ export class TaskService {
}
async loadDespachos() {
this.showLoaderNum++
let despachos = await this.despachoRule.getList({ updateStore: true })
if (despachos) {
this.despachoStore.reset(despachos)
}
this.showLoaderNum--
}
async loadExpedientes() {
this.showLoaderNum++
try {
let expedientes;
expedientes = await this.processesbackend.GetTaskListExpediente(false).toPromise()
@@ -240,10 +247,13 @@ export class TaskService {
}
this.showLoaderNum--
}
async loadPedidos() {
this.showLoader = true
this.showLoaderNum++
try {
let pareceres = await this.processesbackend.GetTasksList("Pedido de Parecer", false).toPromise();
@@ -264,11 +274,13 @@ export class TaskService {
}));
} catch (error) {}
this.showLoaderNum--
}
async loadPendestes() {
this.showLoaderNum++
try {
let pendentes = await this.processesbackend.GetPendingTasks(false).toPromise();
@@ -280,11 +292,14 @@ export class TaskService {
} catch (error) {
}
this.showLoaderNum--
}
async loadEventosParaAprovacao() {
this.showLoaderNum++
// PR dont have event to approve
if(this.SessionStore.user.Profile != 'PR') {
@@ -319,12 +334,15 @@ export class TaskService {
}
}
this.showLoaderNum--
}
async loadDiplomas() {
this.showLoaderNum++
try {
let depachoAPI = await this.processesbackend.GetTasksList("Despacho do Presidente da República", false).toPromise();
@@ -384,6 +402,7 @@ export class TaskService {
this.deplomasStore.resetDiplomasAssinadoList(diplomasAssinados)
} catch (error) {}
this.showLoaderNum--
}
@@ -391,9 +410,10 @@ export class TaskService {
goToProcess(serialNumber: string, workflowName: string, activityName: string) {
console.log({workflowName, serialNumber, activityName})
if (workflowName == 'Despacho') {
if (activityName == 'Tarefa de Despacho' || activityName == 'Concluir Despacho') {
if (activityName == 'Tarefa de Despacho' || activityName == 'Concluir Despacho' || activityName == 'Reexecutar Despacho') {
this.router.navigate(['/home/gabinete-digital/despachos', serialNumber, 'gabinete-digital']);
}
}