Merge branch 'developer' of bitbucket.org:equilibriumito/gabinete-digital into developer

This commit is contained in:
Peter Maquiran
2021-08-09 13:59:14 +01:00
3 changed files with 55 additions and 22 deletions
@@ -133,8 +133,8 @@ export class ExpedienteDetailPage implements OnInit {
loader.remove()
}
}
async openAddNoteModal(actionName:string) {
let classs;
if( window.innerWidth < 801) {
@@ -235,6 +235,8 @@ export class ExpedienteDetailPage implements OnInit {
async LoadTaskDetail(serial: string) {
this.processes.GetTask(serial).subscribe(res => {
console.log(res);
this.task = {
"SerialNumber": res.serialNumber,
"Folio": res.workflowInstanceDataFields.Subject,
@@ -248,6 +250,8 @@ export class ExpedienteDetailPage implements OnInit {
"DocId": res.workflowInstanceDataFields.DocID,
"WorkflowName": res.workflowDisplayName,
"Status": res.workflowInstanceDataFields.Status,
"DispatchNumber": res.workflowInstanceDataFields.DispatchNumber,
"AttachmentsProcessLastInstanceID": res.workflowInstanceDataFields.AttachmentsProcessLastInstanceID,
}
this.fulltask = res;
@@ -341,20 +345,22 @@ export class ExpedienteDetailPage implements OnInit {
if(res){
const data = res.data;
this.documents.push(data.selected);
console.log( this.documents);
this.documents.forEach(element =>{
let body = {
"Source": "1",
"SourceId": element.Id,
"SourceTitle": element.Assunto,
"SerialNumber": this.task.SerialNumber,
"ApplicationId": element.ApplicationType
/* let body = {
"InstanceID":null,
"WorkflowDisplayName": this.task.WorkflowName,
"FolderID": this.task.FolderId,
"DispatchNumber": this.task.DispatchNumber,
"AttachmentsProcessLastInstanceID": this.task.AttachmentsProcessLastInstanceID,
"Attachments": [
ApplicationId: element.ApplicationType,
SourceId: element.Id,
},
}
this.attachmentsService.setEventAttachmentById(body).subscribe((res)=>{
this.attachmentsService.AddAttachment(body).subscribe((res)=>{
this.getAttachments(this.task.SerialNumber);
});
})
}); */
});
}
});
@@ -250,6 +250,8 @@ export class ExpedientePrPage implements OnInit {
}
attachDocument(){
console.log('HERE');
this.getDoc();
}
@@ -266,21 +268,37 @@ export class ExpedientePrPage implements OnInit {
await modal.present();
modal.onDidDismiss().then((res)=>{
if(res){
console.log(res);
const data = res.data;
this.documents.push(data.selected);
console.log( this.documents);
this.documents.forEach(element =>{
console.log('RES'+ this.documents);
/* let body = {
"InstanceID":null,
"WorkflowDisplayName": "",
"FolderID": '',
"DispatchNumber": '',
"AttachmentsProcessLastInstanceID": '',
"Attachments": this.documents,
}
this.attachmentsService.AddAttachment(body).subscribe((res)=>{
this.getAttachments(this.task.SerialNumber);
}); */
/* this.documents.forEach(element =>{
let body = {
"Source": "1",
"SourceId": element.Id,
"SourceTitle": element.Assunto,
"SerialNumber": this.task.SerialNumber,
"ApplicationId": element.ApplicationType
"InstanceID":'',
"WorkflowDisplayName": "1",
"FolderID": element.Id,
"DispatchNumber": element.Assunto,
"AttachmentsProcessLastInstanceID": this.task.SerialNumber,
"Attachments": element.ApplicationType
}
this.attachmentsService.setEventAttachmentById(body).subscribe((res)=>{
this.attachmentsService.AddAttachment(body).subscribe((res)=>{
this.getAttachments(this.task.SerialNumber);
});
})
}) */
}
});
+9
View File
@@ -88,4 +88,13 @@ export class AttachmentsService {
return this.http.delete(`${geturl}`, options);
}
AddAttachment(body: any) {
let geturl = environment.apiURL + 'Attachments/CreateAttachmentProcess';
let options = {
headers: this.headers,
}
return this.http.post(`${geturl}`, body, options);
}
}