mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 05:45:50 +00:00
Refacturation of the notifications route
This commit is contained in:
@@ -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 => {
|
||||
|
||||
Reference in New Issue
Block a user