mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
Fix
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
|
||||
import { NavigationEnd, NavigationExtras, Router } from '@angular/router';
|
||||
import { NavigationEnd, NavigationExtras, NavigationStart, Router } from '@angular/router';
|
||||
import { CalendarComponent } from 'ionic2-calendar';
|
||||
|
||||
import { DailyWorkTask, tasksList } from '../../../models/dailyworktask.model';
|
||||
@@ -49,20 +49,19 @@ export class PedidosPage implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.LoadList();
|
||||
|
||||
setTimeout(()=>{
|
||||
// update list
|
||||
const location = window.location
|
||||
const pathname = location.pathname + location.search
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
if (event instanceof NavigationEnd && event.url.startsWith(pathname)) {
|
||||
this.LoadList();
|
||||
}
|
||||
});
|
||||
}, 10)
|
||||
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)
|
||||
) {
|
||||
this.doRefresh()
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
segmentChanged(ev: any) {
|
||||
@@ -153,9 +152,9 @@ export class PedidosPage implements OnInit {
|
||||
}
|
||||
|
||||
doRefresh() {
|
||||
this.LoadList();
|
||||
setTimeout(() => {
|
||||
}, 2000);
|
||||
this.LoadList();
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
goToPedido(serialNumber:any) {
|
||||
|
||||
Reference in New Issue
Block a user