This commit is contained in:
Peter Maquiran
2021-07-27 21:26:31 +01:00
parent 34a16d6b17
commit 2cb96a80ac
2 changed files with 11 additions and 3 deletions
+8 -2
View File
@@ -49,7 +49,7 @@ export class DespachoMdService {
return this.processes.CompleteTask(body) return this.processes.CompleteTask(body)
} }
async executado(note:string, documents:any , serialnumber) { executado(note:string, documents:any , serialnumber) {
let body = { let body = {
"serialNumber": serialnumber, "serialNumber": serialnumber,
@@ -63,5 +63,11 @@ export class DespachoMdService {
return this.processes.CompleteTask(body) return this.processes.CompleteTask(body)
} }
sendExpedienteToPending(serialnumber) {
return this.processes.SetTaskToPending(serialnumber)
}
} }
@@ -289,13 +289,15 @@ export class DespachoPage implements OnInit {
} }
async sendExpedienteToPending() { async sendExpedienteToPending() {
this.processes.SetTaskToPending(this.serialnumber).subscribe(res=>{
this.despachoMdService.sendExpedienteToPending(this.serialnumber).subscribe(res=>{
this.goBack(); this.goBack();
this.toastService.successMessage('Processo enviado para despacho') this.toastService.successMessage('Processo enviado para despacho')
}, },
error => { error => {
this.toastService.badRequest("Processo não enviado para despacho") this.toastService.badRequest("Processo não enviado para despacho")
}); });
} }
async openAddNoteModal(actionName:string) { async openAddNoteModal(actionName:string) {