mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 05:45:50 +00:00
fix
This commit is contained in:
+44
-27
@@ -37,6 +37,8 @@ export class DiplomaAssinarPage implements OnInit {
|
||||
customDate: any;
|
||||
caller:string;
|
||||
mergedArray: any = [];
|
||||
DraftIds = ""
|
||||
DraftNames = ""
|
||||
|
||||
constructor(
|
||||
private processes: ProcessesService,
|
||||
@@ -78,7 +80,9 @@ export class DiplomaAssinarPage implements OnInit {
|
||||
serialNumber: this.task.SerialNumber,
|
||||
task: this.task,
|
||||
showEnviarPendentes: false,
|
||||
fulltask: this.fulltask
|
||||
fulltask: this.fulltask,
|
||||
DraftNames: this.DraftNames,
|
||||
DraftIds: this.DraftIds
|
||||
|
||||
},
|
||||
translucent: true
|
||||
@@ -110,11 +114,15 @@ export class DiplomaAssinarPage implements OnInit {
|
||||
"DeadlineType": res.workflowInstanceDataFields.DeadlineType,
|
||||
"activityInstanceName": res.activityInstanceName,
|
||||
"Deadline": res.deadline,
|
||||
"TaskStartDate": res.taskStartDate
|
||||
"TaskStartDate": res.taskStartDate,
|
||||
"InstanceID": res.workflowInstanceDataFields.InstanceID,
|
||||
"FolderID": res.workflowInstanceDataFields.FolderID,
|
||||
}
|
||||
|
||||
this.fulltask = res;
|
||||
let stringDraft = res.workflowInstanceDataFields.DraftIds;
|
||||
this.DraftIds = stringDraft
|
||||
|
||||
let split_stringDraft = stringDraft?.split(";").filter(Boolean);
|
||||
|
||||
try {
|
||||
@@ -233,10 +241,12 @@ export class DiplomaAssinarPage implements OnInit {
|
||||
let body = {
|
||||
"InstanceId": this.task.InstanceID,
|
||||
"FolderId": this.task.FolderID,
|
||||
"DraftIds": "163;164;77",
|
||||
"OriginalFileName": "Doc1;Doc2;Doc3"
|
||||
"DraftIds": this.DraftIds,
|
||||
"OriginalFileName": this.DraftNames
|
||||
}
|
||||
|
||||
console.log(body)
|
||||
|
||||
const loader = this.toastService.loading()
|
||||
|
||||
try {
|
||||
@@ -244,7 +254,6 @@ export class DiplomaAssinarPage implements OnInit {
|
||||
|
||||
this.httpErroHandle.httpsSucessMessagge('Assinado')
|
||||
this.TaskService.loadDiplomas()
|
||||
this.goBack();
|
||||
} catch (error) {
|
||||
this.httpErroHandle.httpStatusHandle(error)
|
||||
}
|
||||
@@ -418,29 +427,37 @@ export class DiplomaAssinarPage implements OnInit {
|
||||
this.mergedArray.push(docObject);
|
||||
});
|
||||
}
|
||||
getDraft(split_stringDraft: string[]) {
|
||||
split_stringDraft.forEach(element => {
|
||||
console.log('List of ids', element)
|
||||
this.processes.GetDraftByID(element).subscribe((resd) => {
|
||||
let object = {
|
||||
"ApplicationId": "",
|
||||
"Assunto": resd.data.description,
|
||||
"DocDate": "",
|
||||
"DocId": resd.data.id,
|
||||
"DocNumber": "",
|
||||
"FolderId": "",
|
||||
"Sender": "",
|
||||
"SourceDocId": "",
|
||||
"content": resd.data.content,
|
||||
"path": resd.data.path,
|
||||
"ownerId": resd.data.ownerId,
|
||||
"status": resd.data.status,
|
||||
}
|
||||
this.mergedArray.push(object)
|
||||
console.log('List of draff', resd)
|
||||
})
|
||||
|
||||
});
|
||||
|
||||
async getDraft(split_stringDraft: string[]) {
|
||||
this.DraftNames = ""
|
||||
|
||||
for(const strg of split_stringDraft) {
|
||||
console.log('List of ids', strg)
|
||||
const resd = await this.processes.GetDraftByID(strg).toPromise()
|
||||
|
||||
let object = {
|
||||
"ApplicationId": "",
|
||||
"Assunto": resd.data.description,
|
||||
"DocDate": "",
|
||||
"DocId": resd.data.id,
|
||||
"DocNumber": "",
|
||||
"FolderId": "",
|
||||
"Sender": "",
|
||||
"SourceDocId": "",
|
||||
"content": resd.data.content,
|
||||
"path": resd.data.path,
|
||||
"ownerId": resd.data.ownerId,
|
||||
"status": resd.data.status,
|
||||
}
|
||||
this.mergedArray.push(object)
|
||||
this.DraftNames = this.DraftNames + resd.data.description+";"
|
||||
console.log('List of draff', resd)
|
||||
}
|
||||
|
||||
this.DraftNames = this.DraftNames.slice(0, -1);
|
||||
this.DraftIds = this.DraftIds.slice(0, -1);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user