mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Bug solved on pedidos route
This commit is contained in:
@@ -6,7 +6,7 @@ import { Event } from '../models/event.model';
|
|||||||
import { ProcessesService } from '../services/processes.service';
|
import { ProcessesService } from '../services/processes.service';
|
||||||
import { NotificationsService } from '../services/notifications.service';
|
import { NotificationsService } from '../services/notifications.service';
|
||||||
import { ModalController, AlertController, AnimationController, Platform } from '@ionic/angular';
|
import { ModalController, AlertController, AnimationController, Platform } from '@ionic/angular';
|
||||||
import { NavigationExtras,Router } from '@angular/router';
|
import { NavigationExtras,Router,ActivatedRoute } from '@angular/router';
|
||||||
import { ToastService } from '../services/toast.service';
|
import { ToastService } from '../services/toast.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@@ -53,7 +53,8 @@ export class HomePage implements OnInit {
|
|||||||
private toastService: ToastService,
|
private toastService: ToastService,
|
||||||
private animationController: AnimationController,
|
private animationController: AnimationController,
|
||||||
private notificatinsservice: NotificationsService,
|
private notificatinsservice: NotificationsService,
|
||||||
private platform: Platform) {
|
private platform: Platform,
|
||||||
|
private activeroute: ActivatedRoute) {
|
||||||
|
|
||||||
router.events.subscribe((val) => {
|
router.events.subscribe((val) => {
|
||||||
document.querySelectorAll('ion-modal').forEach((e) => e.remove())
|
document.querySelectorAll('ion-modal').forEach((e) => e.remove())
|
||||||
@@ -66,6 +67,7 @@ export class HomePage implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
console.log('Active route ',this.router.url)
|
||||||
if(this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
if(this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||||
console.log('Notifications not supported')
|
console.log('Notifications not supported')
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -77,7 +77,7 @@
|
|||||||
<ion-item
|
<ion-item
|
||||||
class="expediente ion-no-padding"
|
class="expediente ion-no-padding"
|
||||||
*ngFor = "let task of deferimentoList"
|
*ngFor = "let task of deferimentoList"
|
||||||
(click)="viewPedidoDetail(task.SerialNumber)"
|
(click)="goToPedido(task.SerialNumber)"
|
||||||
>
|
>
|
||||||
<!-- (click)="viewExpedientDetail(task.SerialNumber)" -->
|
<!-- (click)="viewExpedientDetail(task.SerialNumber)" -->
|
||||||
<!-- [routerLink]="['/home/gabinete-digital/expediente',task.SerialNumber]" -->
|
<!-- [routerLink]="['/home/gabinete-digital/expediente',task.SerialNumber]" -->
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
///<reference path="../../../plugins/cordova-plugin-mfp-push/typings/mfppush.d.ts" />
|
///<reference path="../../../plugins/cordova-plugin-mfp-push/typings/mfppush.d.ts" />
|
||||||
import { Injectable, NgZone } from '@angular/core';
|
import { Injectable, NgZone } from '@angular/core';
|
||||||
|
import { ActivatedRoute } from '@angular/router'
|
||||||
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
|
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
|
||||||
import { environment } from 'src/environments/environment';
|
import { environment } from 'src/environments/environment';
|
||||||
import { StorageService } from 'src/app/services/storage.service';
|
import { StorageService } from 'src/app/services/storage.service';
|
||||||
@@ -26,7 +27,8 @@ export class NotificationsService {
|
|||||||
private platform: Platform,
|
private platform: Platform,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private toastService: ToastService,
|
private toastService: ToastService,
|
||||||
private zone: NgZone) { }
|
private zone: NgZone,
|
||||||
|
private activeroute: ActivatedRoute) { }
|
||||||
|
|
||||||
getTokenByUserIdAndId(user, userID) {
|
getTokenByUserIdAndId(user, userID) {
|
||||||
const geturl = environment.apiURL + 'notifications/user/' + userID;
|
const geturl = environment.apiURL + 'notifications/user/' + userID;
|
||||||
@@ -135,25 +137,15 @@ export class NotificationsService {
|
|||||||
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/event-list/approve-event',data.IdObject, 'gabinete-digital']));
|
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/event-list/approve-event',data.IdObject, 'gabinete-digital']));
|
||||||
}else if (data.Service === "gabinete-digital" && data.Object === "despachos") {
|
}else if (data.Service === "gabinete-digital" && data.Object === "despachos") {
|
||||||
|
|
||||||
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/despachos',data.IdObject,'gabinete-digital']));
|
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/despachos',data.IdObject,'gabinete-digital'],{replaceUrl: true}));
|
||||||
}
|
}
|
||||||
else if (data.Service === "gabinete-digital" && data.Object === "parecer") {
|
else if (data.Service === "gabinete-digital" && data.Object === "parecer") {
|
||||||
let navigationExtras: NavigationExtras = {
|
|
||||||
queryParams: {
|
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/pedidos',data.IdObject,'gabinete-digital']));
|
||||||
enterAnimation: "",
|
|
||||||
serialNumber: data.IdObject,
|
|
||||||
}
|
|
||||||
};
|
|
||||||
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/pedidos/pedido'], navigationExtras));
|
|
||||||
}
|
}
|
||||||
else if (data.Service === "gabinete-digital" && data.Object === "deferimento") {
|
else if (data.Service === "gabinete-digital" && data.Object === "deferimento") {
|
||||||
let navigationExtras: NavigationExtras = {
|
|
||||||
queryParams: {
|
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/pedidos',data.IdObject,'gabinete-digital']));
|
||||||
enterAnimation: "",
|
|
||||||
serialNumber: data.IdObject,
|
|
||||||
}
|
|
||||||
};
|
|
||||||
this.zone.run(() => this.router.navigate(['/home/gabinete-digital/pedidos/pedido'], navigationExtras));
|
|
||||||
}
|
}
|
||||||
else if (data.Service === "gabinete-digital" && data.Object === "despachos-pr") {
|
else if (data.Service === "gabinete-digital" && data.Object === "despachos-pr") {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user