Fix multiples API calls and methods

This commit is contained in:
Tiago Kayaya
2020-11-25 11:25:08 +01:00
parent 029d1e3e28
commit d1214e0313
7 changed files with 41 additions and 19 deletions
@@ -57,7 +57,7 @@ export class ExpedienteDetailPage implements OnInit {
"DocumentURL": result.formURL
}
this.fulltask = result;
console.log(result);
/* console.log(result); */
});
}
@@ -66,14 +66,15 @@ export class ExpedienteDetailPage implements OnInit {
{
if (this.eventsList == null)
{
this.attachments.getAttachments(2, serial).subscribe(result => {
result.forEach(att =>{
if (this.eventsList == null)
{
this.attachments.getAttachmentsBySerial(serial).subscribe(res => {
console.log(res);
res.forEach(att =>{
if (this.eventsList == null){
this.eventsList = new Array();
}
this.events.getEvent(att.ParentId).subscribe(event => {
this.eventsList.push(event);
console.log(this.eventsList);
});
});
});