mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Fix
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
|
||||
import { ActivatedRoute, NavigationEnd, NavigationExtras, Router } from '@angular/router';
|
||||
import { ActivatedRoute, NavigationEnd, NavigationExtras, NavigationStart, Router } from '@angular/router';
|
||||
import { CalendarComponent } from 'ionic2-calendar';
|
||||
import { DailyWorkTask, tasksList } from '../../../models/dailyworktask.model';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
@@ -50,12 +50,15 @@ export class PedidosPage implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
const location = window.location
|
||||
const pathname = location.pathname + location.search
|
||||
|
||||
|
||||
this.LoadList();
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
if (event instanceof NavigationEnd && event.url.startsWith(pathname)) {
|
||||
this.LoadList();
|
||||
if(event instanceof NavigationStart && '/home/gabinete-digital/pedidos?parecer=true'.startsWith(event.url) ||
|
||||
event instanceof NavigationStart && '/home/gabinete-digital/pedidos?deferimento=true'.startsWith(event.url)
|
||||
) {
|
||||
alert('resfresh')
|
||||
this.refreshing()
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -76,7 +79,7 @@ export class PedidosPage implements OnInit {
|
||||
|
||||
this.router.navigate(['/home/gabinete-digital/pedidos'], navigationExtras);
|
||||
|
||||
this.LoadList();
|
||||
// this.LoadList();
|
||||
}
|
||||
|
||||
goToPedido(serialNumber:any){
|
||||
|
||||
@@ -54,8 +54,8 @@ export class PedidosPage implements OnInit {
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
if(event instanceof NavigationStart && '/home/gabinete-digital?parecer=true'.startsWith(event.url) ||
|
||||
event instanceof NavigationEnd && '/home/gabinete-digital?deferimento=true'.startsWith(event.url) ||
|
||||
event instanceof NavigationEnd && '/home/gabinete-digital?pedidos=true'.startsWith(event.url)
|
||||
event instanceof NavigationStart && '/home/gabinete-digital?deferimento=true'.startsWith(event.url) ||
|
||||
event instanceof NavigationStart && '/home/gabinete-digital?pedidos=true'.startsWith(event.url)
|
||||
) {
|
||||
this.doRefresh()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user