This commit is contained in:
Peter Maquiran
2022-02-16 15:55:29 +01:00
15 changed files with 100 additions and 227 deletions
@@ -53,7 +53,7 @@ export class ViewPublicationsPage implements OnInit {
this.folderId = this.folderId['ProcessId']
}
this.getPublications();
this.getPublicationsIds();
this.getPublicationDetail();
window['app-view-publications-page-doRefresh'] = this.doRefresh
@@ -67,15 +67,16 @@ export class ViewPublicationsPage implements OnInit {
console.log('change view to ',this.folderId)
//setTimeout(()=>{
this.getPublications();
this.getPublicationDetail();
this.getPublicationsIds();
//}, 100)
}
doRefresh =(event) => {
this.getPublications();
this.getPublicationsIds();
setTimeout(() => {
this.getPublicationDetail();
@@ -97,22 +98,22 @@ export class ViewPublicationsPage implements OnInit {
this.showLoader = true;
const folderId = this.folderId
this.getFromDB()
//this.getFromDB()
this.publications.GetPublicationsImages(this.folderId).subscribe(res => {
console.log('publications ids', res)
this.publicationList = new Array();
for(let i = 0; i < res.length; i++) {
/* for(let i = 0; i < res.length; i++) {
this.publications.GetPublicationById(res[i]).subscribe(ress => {
console.log('publications by ids', ress)
let item: Publication = this.publicationPipe.itemList(ress)
console.log('publications by ids 2', item)
this.publicationList.push(item);
})
}
} */
/* res.forEach(element => {
res.forEach(element => {
console.log('publications elements', element)
this.publications.GetPublicationById(element).subscribe(ress => {
console.log('publications by ids', ress)
@@ -121,7 +122,7 @@ export class ViewPublicationsPage implements OnInit {
this.publicationList.push(item);
})
}); */
});
console.log('PUBLICATIONS IMAGEs',this.publicationList)
this.storage.remove('view_publications');
this.storage.set('view_publications', this.publicationList);
@@ -129,6 +130,8 @@ export class ViewPublicationsPage implements OnInit {
this.getpublication = this.publicationList;
this.showLoader = false;
},() => {
this.getFromDB();
});
}
@@ -142,7 +145,7 @@ export class ViewPublicationsPage implements OnInit {
this.showLoader = true;
const folderId = this.folderId
this.publicationList = new Array();
this.getFromDB();
//this.getFromDB();
this.publications.GetPublications(folderId).subscribe(async res=> {
res.forEach(element => {