This commit is contained in:
tiago.kayaya
2021-07-30 11:45:18 +01:00
parent 9fc2ea9ce6
commit c77c845490
3 changed files with 17 additions and 15 deletions
@@ -41,7 +41,7 @@ export class ViewPublicationsPage implements OnInit {
private loadingController: LoadingService,
private modalController: ModalController,
private publications: PublicationsService,
) {
) {
this.item = new PublicationFolder();
}
@@ -51,7 +51,7 @@ export class ViewPublicationsPage implements OnInit {
if(typeof(this.folderId) == 'object') {
this.folderId = this.folderId['ProcessId']
}
this.getPublications();
this.getPublicationDetail();
}
@@ -67,7 +67,7 @@ export class ViewPublicationsPage implements OnInit {
this.getPublicationDetail();
}, 100)
}
doRefresh(event) {
@@ -82,20 +82,22 @@ export class ViewPublicationsPage implements OnInit {
close() {
this.closeDesktopComponent.emit();
}
getPublicationDetail() {
let allActions = this.publicationEventFolderStorage.list.concat(this.publicationTravelFolderService.list)
this.item = allActions.find((e)=> e.ProcessId == this.folderId)
this.item = allActions.find((e)=> e.ProcessId == this.folderId);
}
getPublications() {
this.showLoader = true;
const folderId = this.folderId
this.publications.GetPublications(folderId).subscribe(res=> {
console.log(res);
this.publicationList = new Array();
res.forEach(element => {
@@ -118,7 +120,7 @@ export class ViewPublicationsPage implements OnInit {
}
this.publicationList.push(item);
});
this.publicationListStorage.add(folderId, this.publicationList)
this.showLoader = false;
@@ -130,7 +132,7 @@ export class ViewPublicationsPage implements OnInit {
}
this.showLoader = false;
})
}