diff --git a/src/app/modals/create-process/create-process.page.html b/src/app/modals/create-process/create-process.page.html index 6679aae08..83e518769 100644 --- a/src/app/modals/create-process/create-process.page.html +++ b/src/app/modals/create-process/create-process.page.html @@ -18,6 +18,7 @@ +
diff --git a/src/app/models/despacho.model.ts b/src/app/models/despacho.model.ts index c54241959..2318cb945 100644 --- a/src/app/models/despacho.model.ts +++ b/src/app/models/despacho.model.ts @@ -11,8 +11,9 @@ export class Despacho{ DispatchFolder: Folder; AttachmentList?: { ProcessInstanceID: string, - "Source": string, - "UserId": string, - "Attachment": string - }[] + Attachments: { + ApplicationId: string, + SourceId: string + }[], + } } \ No newline at end of file diff --git a/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.html b/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.html index 074782045..c18ea8c21 100644 --- a/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.html +++ b/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.html @@ -8,117 +8,124 @@
-
-
-
- -
-
- -
-
-
- -
-
-
- -
-
- - Normal (4 dias para a execução da tarefa) - Urgente (2 dias para a execução da tarefa) - Muito Urgente (1 dia para a execução da tarefa) - Urgentíssimo (8 horas para a execução da tarefa) - -
-
-
-
-
-
- -
-
- - Tipos de assunto - - {{type.Description}} - - -
-
-
- -
-
-
- -
-
-
- - - Adicionar intervenientes - {{participant.Name}} - - + +
+ +
+
+
+
-
- +
+
-
- -
-
-
- -
-
-
- - - Com conhecimento - {{participant.Name}} - - + +
+
+
+
-
- +
+ + Normal (4 dias para a execução da tarefa) + Urgente (2 dias para a execução da tarefa) + Muito Urgente (1 dia para a execução da tarefa) + Urgentíssimo (8 horas para a execução da tarefa) +
-
- -
- -
- +
+
+
+ +
+
+ + Tipos de assunto + + {{type.Description}} + + +
-
- Anexar Documentos -
- -
- -
- - - -

- {{document.Assunto}} - {{document.appName}} - - - -

-

{{document.EntidadeOrganicaNome}} {{document.Data | date: 'dd-MM-yy'}}

+
+ +
+
+
+ +
+
+
+ + + Adicionar intervenientes + {{participant.Name}} + + +
+
+ +
+
+
+
+ +
+
+
+ +
+
+
+ + + Com conhecimento + {{participant.Name}} + + +
+
+ +
+
+
+
+ +
+ +
+ +
+
+ Anexar Documentos +
- - +
+ +
+ + + +

+ {{document.Assunto}} + {{document.appName}} + + + +

+

{{document.EntidadeOrganicaNome}} {{document.Data | date: 'dd-MM-yy'}}

+
+
+
+
+
+ +
diff --git a/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.ts b/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.ts index 925f9663f..8cd69c7ec 100644 --- a/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.ts +++ b/src/app/pages/gabinete-digital/expediente/expedient-task-modal/expedient-task-modal.page.ts @@ -143,8 +143,6 @@ export class ExpedientTaskModalPage implements OnInit { } async saveTask(){ - console.log(this.selectedTypes); - if(this.postData.Priority=='99999861'){ this.dispatchFolder.DeadlineType = 'Normal'; @@ -167,17 +165,24 @@ export class ExpedientTaskModalPage implements OnInit { UserType: val.IsRequired?"I": "CC" }; }) + + let docs = { + ProcessInstanceID: "", + Attachments: [ + + ] + } const DocumentToSave = this.documents.map((e) => { return { - ProcessInstanceID: '', - "Source": "webTRIX", - "UserId": this.loggeduser.UserId.toString(), - "Attachment": `${e.ApplicationType}@DOC@${e.Id}` - }; + ApplicationId: e.ApplicationType, + SourceId: e.Id + } }); + docs.Attachments = DocumentToSave + if(this.taskParticipants.length > 0) { switch (this.taskType) { case '0': @@ -189,7 +194,7 @@ export class ExpedientTaskModalPage implements OnInit { SubjectTypeId: this.postData.SubjectTypeId, UsersSelected: attendees, DispatchFolder: this.dispatchFolder, - AttachmentList: DocumentToSave + AttachmentList: docs } console.log('this.postData', this.postData, this.taskType); this.taskResult = await this.processes.postDespatcho(this.postData); @@ -203,7 +208,7 @@ export class ExpedientTaskModalPage implements OnInit { SubjectTypeId: this.postData.SubjectTypeId, UsersSelected: attendees, DispatchFolder: this.dispatchFolder, - AttachmentList: DocumentToSave + AttachmentList: docs } console.log(this.postData); this.taskResult = await this.processes.postParecer(this.postData); @@ -217,12 +222,14 @@ export class ExpedientTaskModalPage implements OnInit { SubjectTypeId: this.postData.SubjectTypeId, //this.selectedTypes UsersSelected: attendees, DispatchFolder: this.dispatchFolder, - AttachmentList: DocumentToSave + AttachmentList: docs } console.log(this.postData); this.taskResult = await this.processes.postDeferimento(this.postData); break; } + + console.log('this.taskResult', this.taskResult) this.modalController.dismiss('openDiscart'); } else { @@ -399,7 +406,8 @@ export class ExpedientTaskModalPage implements OnInit { cssClass: 'modal-width-100-width-background modal', componentProps: { type: 'AccoesPresidenciais & ArquivoDespachoElect', - showSearchInput: true + showSearchInput: true, + select: true } }); await modal.present(); 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 03dfdea68..2b2eb4c58 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 @@ -167,6 +167,7 @@ export class ExpedienteDetailPage implements OnInit { await modal.present(); modal.onDidDismiss().then(res=>{ console.log(res['data']); + // alert('close '+ res['data']) if(res['data']=='openDiscart'){ console.log('open discart'); diff --git a/src/app/services/processes.service.ts b/src/app/services/processes.service.ts index 55f591124..968200897 100644 --- a/src/app/services/processes.service.ts +++ b/src/app/services/processes.service.ts @@ -137,9 +137,7 @@ export class ProcessesService { let options = { headers: this.headers, }; - return this.http.post(`${geturl}`, body, options).toPromise().then(res =>{ - console.log(res); - }); + return this.http.post(`${geturl}`, body, options).toPromise() } UpdateTaskStatus(FolderId:string): Observable{ @@ -174,9 +172,7 @@ export class ProcessesService { let options = { headers: this.headers, }; - return this.http.post(`${geturl}`, body, options).toPromise().then(res =>{ - console.log(res); - }); + return this.http.post(`${geturl}`, body, options).toPromise(); } postParecer(body:any){ @@ -184,9 +180,7 @@ export class ProcessesService { let options = { headers: this.headers, }; - return this.http.post(`${geturl}`, body, options).toPromise().then(res =>{ - console.log(res); - }); + return this.http.post(`${geturl}`, body, options).toPromise(); } postDeferimento(body:any){ @@ -194,9 +188,7 @@ export class ProcessesService { let options = { headers: this.headers, }; - return this.http.post(`${geturl}`, body, options).toPromise().then(res =>{ - console.log(res); - }); + return this.http.post(`${geturl}`, body, options).toPromise(); }