fix generate deploma

This commit is contained in:
Peter Maquiran
2021-11-03 16:45:01 +01:00
parent a693afd1d7
commit 05acdd8cd6
@@ -356,6 +356,32 @@ export class DespachoPage implements OnInit {
}
async generateDiploma(note:string, documents:any) {
let body = {
"serialNumber": this.serialnumber,
"action": "Reencaminhar",
"ActionTypeId": 99999839,
"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()
}
}
toDateString(e) {
return new Date(e).toDateString()
}
@@ -417,6 +443,9 @@ export class DespachoPage implements OnInit {
else if (actionName == 'Reexecução') {
await this.reexecute(res.data.note, docs);
this.goBack();
} else if(actionName == 'Gerar Diploma') {
await this.generateDiploma(res.data.note, docs);
this.goBack();
}
}
});
@@ -533,4 +562,5 @@ export class DespachoPage implements OnInit {
return await popover.present();
}
}