mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 13:55:51 +00:00
add new endpoint to save and get draft
This commit is contained in:
@@ -166,7 +166,7 @@ export class DespachoPage implements OnInit {
|
||||
// this.updateProcessOnDB(res);
|
||||
this.fulltask = res;
|
||||
|
||||
this.getDocumentPdf(this.fulltask.Documents)
|
||||
this.getDocumentPdf({FolderID: res.workflowInstanceDataFields.FolderID})
|
||||
|
||||
console.log('All', this.mergedArray)
|
||||
|
||||
@@ -200,53 +200,59 @@ export class DespachoPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
// getDocumentPdf({FolderID}) {
|
||||
// this.agendaService.getDraftListByProcessId({
|
||||
// processId: FolderID
|
||||
// }).then(( draftList => {
|
||||
getDocumentPdf({FolderID}) {
|
||||
this.agendaService.getDraftListByProcessId({
|
||||
processId: FolderID
|
||||
}).then(( draftList => {
|
||||
|
||||
// if(draftList.isOk()) {
|
||||
// const docObject = draftList.value.data.map((e) => ({
|
||||
// "ApplicationId": "",
|
||||
// "Assunto": e.description,
|
||||
// "DocDate": e.createdAt,
|
||||
// "DocId": "",
|
||||
// "DocNumber": "element.DocNumber",
|
||||
// "FolderId": e.folderId,
|
||||
// "Sender": "uuid",
|
||||
// "SourceDocId": "element.SourceDocId",
|
||||
// "content": "",
|
||||
// "path": "",
|
||||
// "ownerId": "",
|
||||
// "status": "",
|
||||
// }))
|
||||
if(draftList.isOk()) {
|
||||
const docObject = draftList.value.data.map((e) => ({
|
||||
"id": e.id,
|
||||
"ownerId": e.ownerId,
|
||||
"path": e.path,
|
||||
"description":e.description,
|
||||
"ApplicationId": "",
|
||||
"Assunto": e.description,
|
||||
"DocDate": e.createdAt,
|
||||
"DocId": "",
|
||||
"DocNumber": "element.DocNumber",
|
||||
"FolderId": e.folderId,
|
||||
"content": e.content,
|
||||
"Sender": "uuid",
|
||||
"SourceDocId": "element.SourceDocId",
|
||||
"status": e.status,
|
||||
}))
|
||||
|
||||
// this.mergedArray.push(docObject);
|
||||
// }
|
||||
// }));
|
||||
// }
|
||||
for(const file of docObject) {
|
||||
this.mergedArray.push(file);
|
||||
}
|
||||
|
||||
getDocumentPdf(Documents: any) {
|
||||
|
||||
Documents.forEach(element => {
|
||||
let docObject = {
|
||||
"ApplicationId": element.ApplicationId,
|
||||
"Assunto": element.Assunto,
|
||||
"DocDate": element.DocDate,
|
||||
"DocId": element.DocId,
|
||||
"DocNumber": element.DocNumber,
|
||||
"FolderId": element.FolderId,
|
||||
"Sender": element.Sender,
|
||||
"SourceDocId": element.SourceDocId,
|
||||
"content": "",
|
||||
"path": "",
|
||||
"ownerId": "",
|
||||
"status": "",
|
||||
}
|
||||
this.mergedArray.push(docObject);
|
||||
});
|
||||
}));
|
||||
}
|
||||
|
||||
// getDocumentPdf(Documents: any) {
|
||||
|
||||
// Documents.forEach(element => {
|
||||
// let docObject = {
|
||||
// "ApplicationId": element.ApplicationId,
|
||||
// "Assunto": element.Assunto,
|
||||
// "DocDate": element.DocDate,
|
||||
// "DocId": element.DocId,
|
||||
// "DocNumber": element.DocNumber,
|
||||
// "FolderId": element.FolderId,
|
||||
// "Sender": element.Sender,
|
||||
// "SourceDocId": element.SourceDocId,
|
||||
// "content": "",
|
||||
// "path": "",
|
||||
// "ownerId": "",
|
||||
// "status": "",
|
||||
// }
|
||||
// this.mergedArray.push(docObject);
|
||||
// });
|
||||
// }
|
||||
|
||||
@XTracerAsync({name:'task/getDraft', bugPrint: true})
|
||||
getDraft(split_stringDraft: string[], tracing?: TracingType) {
|
||||
split_stringDraft.forEach(element => {
|
||||
|
||||
Reference in New Issue
Block a user