mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
Refacturation of the notifications route
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
<div class="item"
|
||||
*ngFor="let viagem of publicationsTravelFolderList"
|
||||
|
||||
(click)="viewPublications(viagem)">
|
||||
(click)="viewPublications(viagem.ProcessId)">
|
||||
<div class="item-icon">
|
||||
<ion-icon slot="end" src='assets/images/icons-plane-active.svg'></ion-icon>
|
||||
</div>
|
||||
|
||||
@@ -112,7 +112,8 @@ export class PublicationsPage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
async viewPublications(folder: PublicationFolder) {
|
||||
async viewPublications(folderId: string) {
|
||||
console.log('FOLDER', folderId)
|
||||
|
||||
/* const enterAnimation = (baseEl: any) => {
|
||||
const backdropAnimation = this.animationController.create()
|
||||
@@ -145,7 +146,7 @@ export class PublicationsPage implements OnInit {
|
||||
/* enterAnimation,
|
||||
leaveAnimation, */
|
||||
componentProps:{
|
||||
item:folder,
|
||||
folderId:folderId,
|
||||
},
|
||||
cssClass: 'new-action',
|
||||
backdropDismiss: false
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ export class PublicationDetailPage implements OnInit {
|
||||
this.showLoader = true;
|
||||
console.log(this.publicationId);
|
||||
console.log(this.folderId);
|
||||
this.publications.GetPublicationById(this.folderId,this.publicationId).subscribe(res=>{
|
||||
this.publications.GetPublicationById(this.publicationId).subscribe(res=>{
|
||||
console.log(res);
|
||||
/* this.publication = res; */
|
||||
this.publication = {
|
||||
|
||||
@@ -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