fix issue 27

This commit is contained in:
Peter Maquiran
2023-07-25 16:49:51 +01:00
parent 2628bc91e8
commit 9e8bb92b96
3 changed files with 38 additions and 33 deletions
@@ -44,6 +44,10 @@ export class DiplomaPage implements OnInit {
customDate: any;
mergedArray: any = [];
DraftNames = ""
DraftIds = ""
constructor(
private processes: ProcessesService,
public popoverController: PopoverController,
@@ -520,29 +524,34 @@ export class DiplomaPage 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);
}
+1 -5
View File
@@ -276,10 +276,6 @@ export class ProcessesService {
CompleteTask(body:Excludetask) {
if(!body.dataFields.DraftIds) {
body.dataFields.DraftIds = ""
}
// double check
const geturl = environment.apiURL + 'Tasks/CompleteTask';
@@ -289,7 +285,7 @@ export class ProcessesService {
return this.http.post<any>(`${geturl}`, body, options)
}
CompleteParecerPrTask(body:any){
CompleteParecerPrTask(body:any) {
const geturl = environment.apiURL + 'Tasks/CompleteTaskParecerPr';
let options = {