mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 13:26:08 +00:00
fix issue 27
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user