mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
Click notification route method added
This commit is contained in:
@@ -33,11 +33,14 @@
|
||||
<ion-label>{{notificationdata.length}} novas notificações</ion-label>
|
||||
<ion-list>
|
||||
<div class="item cursor-pointer ion-no-padding ion-no-margin" lines="none"
|
||||
*ngFor = "let item of notificationdata; let i = index">
|
||||
*ngFor = "let item of notificationdata; let i = index"
|
||||
(click)="notificatinsRoutes(item.Service,item.Object,item.IdObject,item.FolderId)"
|
||||
>
|
||||
<div class="item-content width-100">
|
||||
<div class="notification-item">
|
||||
<img class="notification-icon" slot="end" *ngIf = "item.Service == 'agenda'" src="assets/images/icons-default-agenda.svg" >
|
||||
<img class="notification-icon" slot="end" *ngIf = "item.Service == 'gabinete-digital'" src="assets/images/icons-correspondencias.svg" >
|
||||
<img class="notification-icon" slot="end" *ngIf = "item.Service == 'accoes'" src="assets/images/icons-nav-actions.svg" >
|
||||
</div>
|
||||
<div class="approve-event-time">
|
||||
<p>{{item.dateInit}}</p>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
///<reference path="../../../../plugins/cordova-plugin-mfp/typings/worklight.d.ts" />
|
||||
///<reference path="../../../../plugins/cordova-plugin-mfp-jsonstore/typings/jsonstore.d.ts" />
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { Component, OnInit,NgZone } from '@angular/core';
|
||||
import { Router,NavigationExtras } from '@angular/router';
|
||||
import { AnimationController, ModalController } from '@ionic/angular';
|
||||
import { User } from 'src/app/models/user.model';
|
||||
import { AuthService } from 'src/app/services/auth.service';
|
||||
@@ -30,7 +30,8 @@ export class ProfilePage implements OnInit {
|
||||
private router: Router,
|
||||
private localstoreService: LocalstoreService,
|
||||
private jsonstore: JsonStore,
|
||||
private storageservice: StorageService
|
||||
private storageservice: StorageService,
|
||||
private zone: NgZone,
|
||||
) {
|
||||
|
||||
this.loggeduser = authService.ValidatedUser;
|
||||
@@ -76,6 +77,58 @@ export class ProfilePage implements OnInit {
|
||||
|
||||
notImplemented() { }
|
||||
|
||||
notificatinsRoutes = (Service,Object,IdObject,FolderId) => {
|
||||
if (Service === "agenda") {
|
||||
this.zone.run(() => this.router.navigate(['/home/agenda', IdObject, 'agenda']));
|
||||
}
|
||||
else if (Service === "gabinete-digital" && Object === "expediente") {
|
||||
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/expediente',IdObject,'gabinete-digital']));
|
||||
}
|
||||
else if (Service === "gabinete-digital" && Object === "event-list") {
|
||||
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/event-list/approve-event',IdObject, 'gabinete-digital']));
|
||||
}else if (Service === "gabinete-digital" && Object === "despachos") {
|
||||
|
||||
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/despachos',IdObject,'gabinete-digital'],{replaceUrl: true}));
|
||||
}
|
||||
else if (Service === "gabinete-digital" && Object === "parecer") {
|
||||
|
||||
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/pedidos',IdObject,'gabinete-digital']));
|
||||
}
|
||||
else if (Service === "gabinete-digital" && Object === "deferimento") {
|
||||
|
||||
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/pedidos',IdObject,'gabinete-digital']));
|
||||
}
|
||||
else if (Service === "gabinete-digital" && Object === "despachos-pr") {
|
||||
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"serialNumber": IdObject,
|
||||
}
|
||||
};
|
||||
this.zone.run(() =>this.router.navigate(['/home/gabinete-digital/despachos-pr/despacho-pr'], navigationExtras));
|
||||
}
|
||||
else if (Service === "accoes" && Object === "accao") {
|
||||
this.zone.run(() => this.router.navigate(['/home/publications',IdObject]));
|
||||
}
|
||||
else if (Service === "accoes" && Object === "publicacao") {
|
||||
this.zone.run(() => this.router.navigate(['/home/publications/view-publications',FolderId,IdObject]));
|
||||
}
|
||||
else if (Service === "gabinete-digital" && Object === "diplomas") {
|
||||
this.zone.run(() =>this.router.navigate(['/home/gabinete-digital/diplomas', IdObject, 'gabinete-digital']));
|
||||
}
|
||||
else if (Service === "gabinete-digital" && Object === "diplomas-assinar") {
|
||||
let navigationExtras: NavigationExtras = {
|
||||
queryParams: {
|
||||
"serialNumber": IdObject,
|
||||
}
|
||||
};
|
||||
this.zone.run(() =>this.router.navigate(['/home/gabinete-digital/diplomas-assinar/diploma-assinar'], navigationExtras));
|
||||
}
|
||||
else if (Service === "gabinete-digital" && Object === "expedientes-pr") {
|
||||
this.zone.run(() =>this.router.navigate(['/home/gabinete-digital/expedientes-pr',IdObject,'gabinete-digital']));
|
||||
}
|
||||
}
|
||||
|
||||
logout() {
|
||||
// clear local storage
|
||||
window.localStorage.clear();
|
||||
|
||||
Reference in New Issue
Block a user