This commit is contained in:
tiago.kayaya
2021-06-08 15:11:44 +01:00
parent bb1dfd5df2
commit 175dec0c35
17 changed files with 211 additions and 172 deletions
@@ -1,5 +1,5 @@
import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core';
import { NavigationExtras, Router } from '@angular/router';
import { NavigationEnd, NavigationExtras, Router } from '@angular/router';
import { CalendarComponent } from 'ionic2-calendar';
import { DailyWorkTask, tasksList } from '../../../models/dailyworktask.model';
@@ -49,6 +49,11 @@ export class PedidosPage implements OnInit {
ngOnInit() {
this.LoadList();
this.router.events.forEach((event) => {
if(event instanceof NavigationEnd && event.url == this.router.url) {
this.doRefresh();
}
});
}
segmentChanged(ev: any) {
@@ -134,10 +139,9 @@ export class PedidosPage implements OnInit {
console.log(this.taskType);
}
doRefresh(event) {
doRefresh() {
this.LoadList();
setTimeout(() => {
event.target.complete();
}, 2000);
}