mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
Push notification event-list route added
This commit is contained in:
@@ -68,19 +68,6 @@ const routes: Routes = [
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'agenda',
|
||||
children: [
|
||||
{
|
||||
path:'evento',
|
||||
loadChildren: ()=> import('../pages/gabinete-digital/event-list/event-list.page').then(m => m.EventListPage)
|
||||
},
|
||||
{
|
||||
path:':eventId/:caller',
|
||||
loadChildren: ()=> import('../pages/gabinete-digital/event-list/approve-event-modal/approve-event-modal.page').then(m => m.ApproveEventModalPage),
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'gabinete-digital',
|
||||
children: [
|
||||
@@ -112,6 +99,10 @@ const routes: Routes = [
|
||||
path:'',
|
||||
loadChildren: ()=> import('../pages/gabinete-digital/event-list/event-list.module').then(m => m.EventListPageModule)
|
||||
},
|
||||
{
|
||||
path:':serialNumber',
|
||||
loadChildren: ()=> import('../pages/gabinete-digital/event-list/approve-event/approve-event.module').then(m => m.ApproveEventPageModule),
|
||||
}
|
||||
]
|
||||
},
|
||||
]
|
||||
|
||||
+12
-11
@@ -1,4 +1,4 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Component, OnInit, NgZone } from '@angular/core';
|
||||
import { EventsService } from '../services/events.service';
|
||||
import { formatDate } from '@angular/common';
|
||||
import { Event } from '../models/event.model';
|
||||
@@ -9,7 +9,7 @@ import { PublicationDetailPage } from '../../app/pages/publications/view-publica
|
||||
import { ViewPublicationsPage } from '../../app/pages/publications/view-publications/view-publications.page';
|
||||
import { ExpedienteDetailPage } from '../../app/pages/gabinete-digital/expediente/expediente-detail/expediente-detail.page'
|
||||
import { ViewEventPage } from '../../app/pages/agenda/view-event/view-event.page'
|
||||
import { ApproveEventModalPage } from '../pages/gabinete-digital/event-list/approve-event-modal/approve-event-modal.page'
|
||||
import { ApproveEventModalPage } from '../../app/pages/gabinete-digital/event-list/approve-event-modal/approve-event-modal.page';
|
||||
|
||||
import { Plugins, PushNotification, PushNotificationToken, PushNotificationActionPerformed, Modals } from '@capacitor/core';
|
||||
import { Router } from '@angular/router';
|
||||
@@ -31,7 +31,7 @@ export class HomePage implements OnInit {
|
||||
totalExpediente = 0;
|
||||
profile: string;
|
||||
|
||||
constructor(private eventService: EventsService, private processesbackend: ProcessesService, private router: Router, private modalController: ModalController,) { }
|
||||
constructor(private ngZone: NgZone,private eventService: EventsService, private processesbackend: ProcessesService, private router: Router, private modalController: ModalController,) { }
|
||||
|
||||
ngOnInit() {
|
||||
//Initialize profile as mdgpr
|
||||
@@ -119,16 +119,17 @@ export class HomePage implements OnInit {
|
||||
|
||||
service = "agenda" ? this.router.navigate(['/home/', service, idObject, 'home']) : */
|
||||
|
||||
if (service === "agenda" && object != "evento") {
|
||||
if (service === "agenda") {
|
||||
//this.router.navigate(['/home/', service, idObject, 'home']);
|
||||
this.viewEventDetail(idObject)
|
||||
} else if (service === "agenda" && object === "evento") {
|
||||
this.router.navigate(['/home/', service, idObject, 'home']);
|
||||
} else if (service === "gabinete-digital" && object != "expediente") {
|
||||
this.router.navigate(['/home/', service]);
|
||||
} else if (service === "gabinete-digital" && object != "expediente" || object != "event-list") {
|
||||
this.router.navigate(['/home/gabinete-digital']);
|
||||
} else if (service === "gabinete-digital" && object === "expediente") {
|
||||
this.viewExpedientDetail(idObject)
|
||||
} else if (service === "accoes" && object === "accao") {
|
||||
} else if (service === "gabinete-digital" && object === "event-list") {
|
||||
/* this.ngZone.run(() => {this.router.navigate(['/home/gabinete-digital/event-list', idObject])}) */
|
||||
this.openApproveModal(idObject);
|
||||
} else if (service === "accoes" && object === "accao") {
|
||||
this.viewPublications(idObject)
|
||||
} else if (service === "accoes" && object === "publicacao") {
|
||||
this.viewPublicationDetail(idObject)
|
||||
@@ -191,7 +192,7 @@ export class HomePage implements OnInit {
|
||||
});
|
||||
}
|
||||
|
||||
async openApproveModal(eventSerialNumber){
|
||||
async openApproveModal(eventSerialNumber){
|
||||
const modal = await this.modalController.create({
|
||||
component: ApproveEventModalPage,
|
||||
componentProps:{
|
||||
@@ -204,7 +205,7 @@ export class HomePage implements OnInit {
|
||||
await modal.present();
|
||||
|
||||
modal.onDidDismiss();
|
||||
}
|
||||
}
|
||||
|
||||
async viewEventDetail(eventId:any) {
|
||||
console.log(this.profile);
|
||||
|
||||
Reference in New Issue
Block a user