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
@@ -2,7 +2,7 @@
<div class="title">
<div class="thetitle"><ion-label >Pedidos</ion-label></div>
<div class="theicon">
<button class="btn-no-color" (click)="doRefresh($event)">
<button class="btn-no-color" (click)="doRefresh()">
<ion-icon slot="end" class="title-icon" name="reload-circle"></ion-icon>
</button>
</div>
@@ -19,7 +19,7 @@
</ion-toolbar>
</ion-header>
<ion-content>
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh()">
<ion-refresher-content
pullingIcon="chevron-down-circle-outline"
pullingText="deslize para actualizar"
@@ -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);
}