This commit is contained in:
Peter Maquiran
2021-08-19 18:56:08 +01:00
parent 31b00b5874
commit a0a63383c6
3 changed files with 31 additions and 5 deletions
@@ -244,17 +244,44 @@ export class DespachosPrOptionsPage implements OnInit {
else if(actionName == 'Gerar Diploma'){
await this.generateDiploma(res.data.note, docs);
}
else if(actionName == 'Concluido'){
//this.concluir(res.data.note, docs);
}
else if(actionName == 'Reexecução'){
await this.reexecutar(res.data.note, docs);
}
else if(actionName == 'Concluido'){
await this.concluir(res.data.note, docs);
}
this.goBack();
}
});
}
async concluir(note:string, documents:any){
let body = {
"serialNumber": this.serialNumber,
"action": "Executado",
"ActionTypeId": 104,
"dataFields": {
"ReviewUserComment": note,
},
"AttachmentList" :documents,
}
const loader = this.toastService.loading()
try {
await this.processes.CompleteTask(body).toPromise()
this.toastService.successMessage('')
this.close();
} catch (error) {
this.toastService.badRequest()
}
finally {
loader.remove()
}
}
async arquivar(note:string, documents:any){
let body = {
"serialNumber": this.serialNumber,