mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
Improve create process
This commit is contained in:
@@ -326,7 +326,12 @@ export class CreateProcessPage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async executado(message?) {
|
async executado(message?) {
|
||||||
let body = {
|
|
||||||
|
let body;
|
||||||
|
|
||||||
|
if(this.task.activityInstanceName =='Tarefa de Despacho' || this.task.activityInstanceName =='Reexecutar Despacho') {
|
||||||
|
|
||||||
|
body = {
|
||||||
"serialNumber": this.task.serialNumber,
|
"serialNumber": this.task.serialNumber,
|
||||||
"action": "Conhecimento",
|
"action": "Conhecimento",
|
||||||
"ActionTypeId": 104,
|
"ActionTypeId": 104,
|
||||||
@@ -335,12 +340,26 @@ export class CreateProcessPage implements OnInit {
|
|||||||
},
|
},
|
||||||
"AttachmentList" :null,
|
"AttachmentList" :null,
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else if(this.task.activityInstanceName =='Concluir Despacho' || this.task.activityInstanceName == 'Concluir Parecer') {
|
||||||
|
|
||||||
|
body = {
|
||||||
|
"serialNumber": this.task.serialNumber,
|
||||||
|
"action": "Despacho",
|
||||||
|
"ActionTypeId": 94,
|
||||||
|
"dataFields": {
|
||||||
|
"ReviewUserComment": '',
|
||||||
|
},
|
||||||
|
"AttachmentList" :null,
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await this.processes.CompleteTask(body).toPromise();
|
await this.processes.CompleteTask(body).toPromise();
|
||||||
this.toastService.successMessage(message)
|
this.toastService.successMessage('');
|
||||||
} catch(e) {
|
} catch (error) {
|
||||||
this.toastService.badRequest()
|
this.toastService.badRequest('Processo não efectuado');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user