From 3ab9d3445dbda321272ca0c51ace9f5769c61794 Mon Sep 17 00:00:00 2001 From: "tiago.kayaya" Date: Mon, 13 Dec 2021 12:49:47 +0100 Subject: [PATCH] fix add atachment in Expediente --- .../expediente-detail.page.ts | 11 ++- src/app/pages/search/search.page.html | 6 +- src/app/pages/search/search.page.ts | 91 ++++++++++++++++++- 3 files changed, 96 insertions(+), 12 deletions(-) diff --git a/src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.ts b/src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.ts index c98925dfc..62a4f6236 100644 --- a/src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.ts +++ b/src/app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page.ts @@ -432,7 +432,7 @@ export class ExpedienteDetailPage implements OnInit { component: SearchPage, cssClass: 'modal-width-100-width-background modal', componentProps: { - type: 'AccoesPresidenciais & ArquivoDespachoElect', + type: 'Correspondencia', showSearchInput: true, select: true, findOnly: [8] @@ -458,7 +458,7 @@ export class ExpedienteDetailPage implements OnInit { body.Attachments = Attachments; const loader = this.toastService.loading() - + try { loader.remove() await this.attachmentsService.AddAttachment(body).toPromise() @@ -467,11 +467,12 @@ export class ExpedienteDetailPage implements OnInit { this.toastService._badRequest() } }); - - this.LoadTaskDetail(this.serialNumber); } - }); + setTimeout(() => { + this.LoadTaskDetail(this.serialNumber); + }, 5000); + }); } async openExpedientActionsModal(taskAction: any, task: any) { diff --git a/src/app/pages/search/search.page.html b/src/app/pages/search/search.page.html index d37b6ab0f..e30d9294a 100644 --- a/src/app/pages/search/search.page.html +++ b/src/app/pages/search/search.page.html @@ -177,10 +177,10 @@