This commit is contained in:
Peter Maquiran
2021-07-17 19:12:13 +01:00
parent 6664dfed73
commit 841a0967a9
3 changed files with 9 additions and 5 deletions
@@ -87,8 +87,8 @@ export class DespachoPage implements OnInit {
else {
let navigationExtras: NavigationExtras = {
queryParams: {
"pendentes": true,
}
"pendentes": true,
}
}
this.router.navigate(['/home/gabinete-digital'], navigationExtras);
}
@@ -157,6 +157,7 @@ export class PedidoPage implements OnInit {
try {
this.toastService.badRequest('Processo não encontrado')
this.goBack()
this.close()
} catch (e) {
window.history.back();
}
@@ -495,7 +496,7 @@ export class PedidoPage implements OnInit {
}
else {
if (window.innerWidth <= 800) {
this.router.navigate(['/home/gabinete-digital/pedidos']);
this.router.navigate(['/home/gabinete-digital/pedidos']);
}
else {
@@ -1,5 +1,5 @@
import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
import { NavigationEnd, Router } from '@angular/router';
import { NavigationEnd, NavigationStart, Router } from '@angular/router';
import { CalendarComponent } from 'ionic2-calendar';
import { removeDuplicate } from 'src/plugin/removeDuplicate.js'
import { DailyWorkTask } from '../../../models/dailyworktask.model';
@@ -44,14 +44,17 @@ export class PendentesPage implements OnInit {
this.LoadList();
this.router.events.forEach((event) => {
if (event instanceof NavigationEnd &&
if (event instanceof NavigationStart &&
event.url.startsWith('/home/gabinete-digital?pendentes=true')) {
if(window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {
this.doRefresh()
} else {
this.LoadList()
}
}
});
}