Refacturation of the notifications route

This commit is contained in:
Eudes Inácio
2021-02-03 15:13:23 +01:00
parent ee949e5a41
commit 71bc6f9dcc
599 changed files with 172410 additions and 74251 deletions
@@ -18,6 +18,7 @@ export class ViewPublicationsPage implements OnInit {
publicationList: Publication[];
item: PublicationFolder;
folderId:string;
constructor(
private loadingController: LoadingService,
@@ -25,27 +26,38 @@ export class ViewPublicationsPage implements OnInit {
private publications: PublicationsService,
private navParams: NavParams,
) {
this.item = this.navParams.get('item');
this.item = new PublicationFolder();
this.folderId = this.navParams.get('folderId');
}
ngOnInit() {
this.getPublications()
console.log(this.folderId);
this.getPublications();
this.getPublicationDetail();
}
doRefresh(event) {
this.getPublications();
setTimeout(() => {
this.getPublications();
this.getPublicationDetail();
event.target.complete();
}, 3000);
}
close(){
this.modalController.dismiss();
}
getPublicationDetail(){
this.publications.GetPublicationFolderById(this.folderId).subscribe(res=>{
console.log(res);
this.item = res;
});
}
getPublications(){
this.showLoader = true;
this.publications.GetPublications(this.item.ProcessId).subscribe(res=>{
this.publications.GetPublications(this.folderId).subscribe(res=>{
this.publicationList = new Array();
console.log(res);
res.forEach(element => {