This commit is contained in:
Peter Maquiran
2022-06-03 16:53:50 +01:00
parent 7430bf7fe1
commit ee370f7e2e
29 changed files with 175 additions and 404 deletions
@@ -257,6 +257,11 @@ export class CreateProcessPage implements OnInit {
});
let docs = {
ProcessInstanceID: "",
Attachments: []
}
const DocumentToSave = this.documents.map((e) => {
return {
ApplicationId: e.ApplicationType,
@@ -264,6 +269,8 @@ export class CreateProcessPage implements OnInit {
}
});
docs.Attachments = DocumentToSave;
this.dispatchFolder.SubjectTypes = this.selectedTypes;
const loader = this.toastService.loading()
@@ -278,6 +285,7 @@ export class CreateProcessPage implements OnInit {
UserEmail: this.loggeduser.Email,
UsersSelected: attendees,
DispatchFolder: this.dispatchFolder,
AttachmentList: docs
}
try {
@@ -302,6 +310,7 @@ export class CreateProcessPage implements OnInit {
UserEmail: this.loggeduser.Email,
UsersSelected: attendees,
DispatchFolder: this.dispatchFolder,
AttachmentList: docs
}
try {
@@ -309,8 +318,9 @@ export class CreateProcessPage implements OnInit {
await this.despachoService.createParecer(this.postData).toPromise();
await this.despachoService.solicitarParecer({ serialnumber: this.task.serialNumber, activityInstanceName: this.task.activityInstanceName}).toPromise();
} else {
await this.pedidoService.createParecer(this.postData).toPromise();
await this.pedidoService.taskCompleteParecer({serialNumber:this.task.serialNumber}).toPromise();
await this.pedidoService.taskCompleteParecer({serialNumber:this.task.serialNumber, note: this.postData.DispatchFolder.Subject}).toPromise();
}
this.modalController.dismiss();
@@ -331,6 +341,7 @@ export class CreateProcessPage implements OnInit {
UserEmail: this.loggeduser.Email,
UsersSelected: attendees,
DispatchFolder: this.dispatchFolder,
AttachmentList: docs
}
try {
@@ -358,6 +369,7 @@ export class CreateProcessPage implements OnInit {
UserEmail: this.loggeduser.Email,
UsersSelected: attendees,
DispatchFolder: this.dispatchFolder,
AttachmentList: docs
}
if(this.postData.DispatchFolder.Message){
@@ -387,6 +399,7 @@ export class CreateProcessPage implements OnInit {
UserEmail: this.loggeduser.Email,
UsersSelected: attendees,
DispatchFolder: this.dispatchFolder,
AttachmentList: docs
}
try {
@@ -396,7 +409,7 @@ export class CreateProcessPage implements OnInit {
await this.despachoService.solicitarParecer({ serialnumber: this.task.serialNumber, activityInstanceName: this.task.activityInstanceName}).toPromise();
} else {
await this.pedidoService.createParecer(this.postData).toPromise();
await this.pedidoService.taskCompleteParecer({serialNumber:this.task.serialNumber}).toPromise();
await this.pedidoService.taskCompleteParecer({serialNumber:this.task.serialNumber, note: this.postData.DispatchFolder.Subject}).toPromise();
}
this.modalController.dismiss();
@@ -417,6 +430,7 @@ export class CreateProcessPage implements OnInit {
UserEmail: this.loggeduser.Email,
UsersSelected: attendees,
DispatchFolder: this.dispatchFolder,
AttachmentList: docs
}
try {
@@ -474,7 +488,7 @@ export class CreateProcessPage implements OnInit {
}
} else {
console.log('unexpected error')
// console.log('unexpected error')
}