diff --git a/src/app/home/home.page.ts b/src/app/home/home.page.ts index 4e002cd0e..fa577c46b 100644 --- a/src/app/home/home.page.ts +++ b/src/app/home/home.page.ts @@ -209,8 +209,7 @@ export class HomePage implements OnInit { this.zone.run(() =>this.openApproveModal(data.IdObject)); } else if (data.Service === "accoes" && data.Object === "accao") { - this.viewPublications(data.IdObject) - alert(data.IdObject) + this.zone.run(() => this.viewPublications(data.IdObject)); } else if (data.Service === "accoes" && data.Object === "publicacao") { this.viewPublicationDetail(data.IdObject) @@ -254,41 +253,7 @@ export class HomePage implements OnInit { async viewPublications(folderId) { - const enterAnimation = (baseEl: any) => { - const backdropAnimation = this.animationController.create() - .addElement(baseEl.querySelector('ion-backdrop')!) - .fromTo('opacity', '0.01', 'var(--backdrop-opacity)'); - - const wrapperAnimation = this.animationController.create() - .addElement(baseEl.querySelector('.modal-wrapper')!) - .keyframes([ - { offset: 0, opacity: '0', transform: 'scale(0)' }, - { offset: 1, opacity: '0.99', transform: 'scale(1)' } - ]); - - return this.animationController.create() - .addElement(baseEl) - .easing('ease-out') - .duration(500) - .addAnimation([backdropAnimation, wrapperAnimation]); - } - - const leaveAnimation = (baseEl: any) => { - return enterAnimation(baseEl).direction('reverse'); - } - - const modal = await this.modalController.create({ - component: ViewPublicationsPage, - enterAnimation, - leaveAnimation, - componentProps: { - folderId: folderId, - }, - cssClass: 'new-action', - backdropDismiss: false - }); - await modal.present(); - modal.onDidDismiss(); + this.router.navigate(['/home/publications',folderId]); }