{{ message }}
+ + +diff --git a/src/app/home/home.page.ts b/src/app/home/home.page.ts index 4dc6795b5..b67b1f9a0 100644 --- a/src/app/home/home.page.ts +++ b/src/app/home/home.page.ts @@ -182,7 +182,7 @@ export class HomePage implements OnInit { if(message.actionName){ this.notificatinsRoutes(data); } else { - this.toastService.successMessage(message.alert); + this.toastService.notificationMessage(message.alert,this.notificatinsRoutes, data); } } @@ -194,7 +194,7 @@ export class HomePage implements OnInit { } - notificatinsRoutes(data) { + notificatinsRoutes = (data) => { if (data.Service === "agenda") { //this.router.navigate(['/home/', service, IdObject, 'home']); //this.router.navigate(['/home/agenda', data.IdObject, 'agenda']); @@ -212,7 +212,7 @@ export class HomePage implements OnInit { this.zone.run(() => this.viewPublications(data.IdObject)); } else if (data.Service === "accoes" && data.Object === "publicacao") { - this.viewPublicationDetail(data.IdObject) + this.zone.run(() => this.viewPublicationDetail(data.FolderId,data.IdObject)); } } @@ -234,20 +234,8 @@ export class HomePage implements OnInit { this.router.navigate(['/home/gabinete-digital/expediente',serialNumber,'gabinete-digital']); } - async viewPublicationDetail(publicationId: string) { - const modal = await this.modalController.create({ - component: PublicationDetailPage, - componentProps: { - publicationId: publicationId, - folderId: this.folderId, - }, - cssClass: 'publication-detail modal modal-desktop', - //backdropDismiss: false - }); - await modal.present(); - modal.onDidDismiss().then(() => { - - }); + async viewPublicationDetail(FolderId: string, publicationId: string ) { + this.router.navigate(['/home/publications/view-publications', FolderId, publicationId]); } diff --git a/src/app/services/toast.service.ts b/src/app/services/toast.service.ts index 4db70b56c..1cc5da449 100644 --- a/src/app/services/toast.service.ts +++ b/src/app/services/toast.service.ts @@ -86,4 +86,41 @@ export class ToastService { } + + async notificationMessage(message?: any, callback?: any,data?: any) { + + let notification = document.createElement('div') + notification.className = 'notificationPush' + notification.innerHTML = ` + +
{{ message }}
+ + +