From 1aa03370367b99f6b1ac8d9b316ee2599d903e27 Mon Sep 17 00:00:00 2001 From: "tiago.kayaya" Date: Thu, 17 Jun 2021 09:55:19 +0100 Subject: [PATCH] save --- .../pedidos/pedido/pedido.page.html | 1 + .../pedidos/pedido/pedido.page.ts | 22 ++++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.html b/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.html index 4802585c9..46b799352 100644 --- a/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.html +++ b/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.html @@ -107,6 +107,7 @@
+
diff --git a/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts b/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts index e947f2181..49c44697b 100644 --- a/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts +++ b/src/app/pages/gabinete-digital/pedidos/pedido/pedido.page.ts @@ -228,9 +228,26 @@ export class PedidoPage implements OnInit { } catch (error) { this.toastService.badRequest() } + } + async assignar(note:string, documents:any) { + let body = { + "serialNumber": this.serialnumber, + "action": "Reencaminhar", + "ActionTypeId": 98, + "dataFields": { + "ReviewUserComment": note, + }, + "AttachmentList" :documents, + } - + try { + await this.processes.CompleteTask(body).toPromise() + this.toastService.successMessage('Processo arquivado') + this.close(); + } catch (error) { + this.toastService.badRequest() + } } sendExpedienteToPending(){ @@ -404,6 +421,9 @@ export class PedidoPage implements OnInit { else if(actionName == 'Arquivar'){ this.arquivar(res.data.note, docs); } + else if(actionName == 'Assignar'){ + this.assignar(res.data.note, docs); + } } }); }