mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
fix loader
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
<!-- {{ NotificationsService.active }} -->
|
||||
<ion-content class="height-100 container-wrapper">
|
||||
<!-- <ion-refresher slot="fixed" (ionRefresh)="doRefresh($event)">
|
||||
<ion-refresher slot="fixed" (ionRefresh)="doRefresh($event)" *ngIf="refresh">
|
||||
<ion-refresher-content>
|
||||
</ion-refresher-content>
|
||||
</ion-refresher> -->
|
||||
</ion-refresher>
|
||||
|
||||
<div class="main-content d-flex height-100 border-t-radius">
|
||||
|
||||
<!-- Aside left -->
|
||||
<div class="aside-wrapper d-flex flex-column width-md-40 flex-grow-1">
|
||||
<ion-progress-bar type="indeterminate" *ngIf="TaskService.showLoader"></ion-progress-bar>
|
||||
<div class="title-container">
|
||||
<div class="title-container" >
|
||||
<div class="title d-flex justify-center">
|
||||
<ion-label *ngIf="hideRefreshBtn">Gabinete Digital</ion-label>
|
||||
<div class="d-flex align-center cursor" *ngIf="!hideRefreshBtn && segmentVista == 'listview' ">
|
||||
@@ -147,7 +147,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div [ngSwitch]="segmentVista" class="overflow-y-auto">
|
||||
<div #scroll [ngSwitch]="segmentVista" class="overflow-y-auto">
|
||||
<!-- This is the list view -->
|
||||
<div *ngSwitchCase="'listview'">
|
||||
|
||||
@@ -258,7 +258,7 @@
|
||||
</div>
|
||||
|
||||
<!-- This is the box view -->
|
||||
<div *ngSwitchCase="'boxview'" class="aside overflow-y-auto d-flex flex-wrap width-100 height-100">
|
||||
<div *ngSwitchCase="'boxview'" class="aside d-flex flex-wrap width-100 height-100">
|
||||
<div *ngIf="TaskService.loadCount" class="center-box">
|
||||
|
||||
<!-- List -->
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { Component, ElementRef, OnInit, ViewChild } from '@angular/core';
|
||||
import { ProcessesService } from 'src/app/services/processes.service';
|
||||
import { ModalController } from '@ionic/angular';
|
||||
import {NavigationEnd, NavigationExtras, Router } from '@angular/router';
|
||||
@@ -102,6 +102,11 @@ export class GabineteDigitalPage implements OnInit {
|
||||
AllProcess = []
|
||||
ordinance: string = 'old'
|
||||
|
||||
|
||||
refresh = true
|
||||
|
||||
@ViewChild('scroll') scroll: ElementRef;
|
||||
|
||||
constructor(
|
||||
private processesbackend: ProcessesService,
|
||||
private modalController: ModalController,
|
||||
@@ -191,7 +196,7 @@ export class GabineteDigitalPage implements OnInit {
|
||||
|
||||
|
||||
reorderList(orderBy: string) {
|
||||
|
||||
this.changeTab()
|
||||
this.ordinance = orderBy;
|
||||
|
||||
this.dynamicSearch();
|
||||
@@ -256,9 +261,31 @@ export class GabineteDigitalPage implements OnInit {
|
||||
});
|
||||
|
||||
this.hideRefreshButton();
|
||||
|
||||
// console.log(' this.scroll', this.scroll)
|
||||
// this.scroll.nativeElement.addEventListener("scroll", ()=> {
|
||||
// console.log('123')
|
||||
// });
|
||||
|
||||
}
|
||||
|
||||
ngAfterViewInit(): void {
|
||||
// We can access the TestComponent now that this portion of the view tree has been initiated.
|
||||
const element = this.scroll.nativeElement
|
||||
this.scroll.nativeElement.addEventListener("scroll", (e)=> {
|
||||
this.changeTab()
|
||||
});
|
||||
}
|
||||
|
||||
changeTab() {
|
||||
const element = this.scroll.nativeElement
|
||||
if(element.scrollTop == 0 ) {
|
||||
this.refresh = true
|
||||
} else {
|
||||
this.refresh = false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
checkFilter() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user