mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
Fix on route change event
This commit is contained in:
@@ -66,11 +66,9 @@ export class DespachosPrPage implements OnInit {
|
||||
//Inicializar segment
|
||||
this.segment = "despachos";
|
||||
|
||||
const location = window.location
|
||||
const pathname = location.pathname + location.search
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
if (event instanceof NavigationEnd && event.url.startsWith(pathname)) {
|
||||
if (event instanceof NavigationEnd &&
|
||||
event.url.startsWith('/home/gabinete-digital?despachospr=true')) {
|
||||
this.LoadList();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -23,39 +23,40 @@
|
||||
</ion-refresher>
|
||||
|
||||
<div *ngIf="despachoList.length >= 1" class="main-container width-100 overflow-y-auto height-100">
|
||||
<ion-list>
|
||||
<ion-item
|
||||
class="expediente ion-no-padding cursor-pointer"
|
||||
*ngFor = "let task of despachoList; let i = index"
|
||||
(click)="goToDespacho(task.SerialNumber)"
|
||||
>
|
||||
<!-- [routerLink]="['/home/gabinete-digital/expediente',task.SerialNumber]" -->
|
||||
<div class="item width-100">
|
||||
<div class="exp-top-detail">
|
||||
<div class="exp-date">
|
||||
<ion-label>{{ task.CreateDate | date: 'dd-MM-yy' }}</ion-label>
|
||||
</div>
|
||||
<div class="exp-remetente">
|
||||
<ion-label>{{task.Senders}}</ion-label>
|
||||
</div>
|
||||
<div class="exp-workflow">
|
||||
<span class="label">{{task.activityInstanceName}}</span>
|
||||
</div>
|
||||
<div class="exp-icon d-flex align-center">
|
||||
<ion-icon src="assets/images/icons-expediente-attachment.svg"></ion-icon>
|
||||
<label>{{task.DocumentsQty}}</label>
|
||||
|
||||
<!-- <ion-menu-button (click)="docIndex(i)" style="width: 35px; height: 41px;" autoHide="false">
|
||||
<ion-icon src="assets/images/icons-expediente-attachment.svg"></ion-icon>
|
||||
</ion-menu-button> -->
|
||||
</div>
|
||||
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
|
||||
<ion-list>
|
||||
<ion-item
|
||||
class="expediente ion-no-padding cursor-pointer"
|
||||
*ngFor = "let task of despachoList; let i = index"
|
||||
(click)="goToDespacho(task.SerialNumber)"
|
||||
>
|
||||
<!-- [routerLink]="['/home/gabinete-digital/expediente',task.SerialNumber]" -->
|
||||
<div class="item width-100">
|
||||
<div class="exp-top-detail">
|
||||
<div class="exp-date">
|
||||
<ion-label>{{ task.CreateDate | date: 'dd-MM-yy' }}</ion-label>
|
||||
</div>
|
||||
<div class="exp-bottom-detail">
|
||||
<ion-label>{{ task.Folio }}</ion-label>
|
||||
<div class="exp-remetente">
|
||||
<ion-label>{{task.Senders}}</ion-label>
|
||||
</div>
|
||||
<div class="exp-workflow">
|
||||
<span class="label">{{task.activityInstanceName}}</span>
|
||||
</div>
|
||||
<div class="exp-icon d-flex align-center">
|
||||
<ion-icon src="assets/images/icons-expediente-attachment.svg"></ion-icon>
|
||||
<label>{{task.DocumentsQty}}</label>
|
||||
|
||||
<!-- <ion-menu-button (click)="docIndex(i)" style="width: 35px; height: 41px;" autoHide="false">
|
||||
<ion-icon src="assets/images/icons-expediente-attachment.svg"></ion-icon>
|
||||
</ion-menu-button> -->
|
||||
</div>
|
||||
</div>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
<div class="exp-bottom-detail">
|
||||
<ion-label>{{ task.Folio }}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</div>
|
||||
<div *ngIf="skeletonLoader && despachoList.length == 0" class="overflow-y-auto height-100">
|
||||
|
||||
|
||||
@@ -65,15 +65,18 @@ ngOnInit() {
|
||||
//Inicializar segment
|
||||
this.segment = "despachos";
|
||||
|
||||
// update list
|
||||
const location = window.location
|
||||
const pathname = location.pathname + location.search
|
||||
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();
|
||||
}
|
||||
});
|
||||
this.router.events.forEach((event) => {
|
||||
if (event instanceof NavigationEnd &&
|
||||
event.url.startsWith('/home/gabinete-digital?despachospr=true')) {
|
||||
this.LoadList();
|
||||
}
|
||||
});
|
||||
}, 10)
|
||||
|
||||
}
|
||||
segmentChanged(ev: any) {
|
||||
|
||||
@@ -17,9 +17,12 @@
|
||||
refreshingSpinner="circles"
|
||||
refreshingText="A actualizar...">
|
||||
</ion-refresher-content>
|
||||
|
||||
</ion-refresher>
|
||||
|
||||
<div class="overflow-y-auto height-100 width-100">
|
||||
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
|
||||
|
||||
<div >
|
||||
<ion-list part="divo">
|
||||
<ion-item
|
||||
|
||||
@@ -68,13 +68,9 @@ export class DespachosPage implements OnInit {
|
||||
//Inicializar segment
|
||||
this.segment = "despachos";
|
||||
|
||||
// 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)) {
|
||||
console.log('update', pathname)
|
||||
if (event instanceof NavigationEnd &&
|
||||
event.url.startsWith('/home/gabinete-digital?despachos=true')) {
|
||||
this.LoadList();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
|
||||
<div class="width-100 overflow-y-auto height-100">
|
||||
<div *ngIf="diplomasList.length >= 1">
|
||||
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
|
||||
|
||||
<ion-list >
|
||||
<!-- *ngFor = "let task of parecerList; let i = index"
|
||||
(click)="viewExpedientDetail(task.SerialNumber)" -->
|
||||
|
||||
@@ -33,14 +33,17 @@ skeletonLoader = true
|
||||
|
||||
ngOnInit() {
|
||||
// update list
|
||||
const location = window.location
|
||||
const pathname = location.pathname + location.search
|
||||
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();
|
||||
}
|
||||
});
|
||||
this.router.events.forEach((event) => {
|
||||
if (event instanceof NavigationEnd && event.url.startsWith(pathname)) {
|
||||
this.LoadList();
|
||||
}
|
||||
});
|
||||
}, 10)
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
</ion-header>
|
||||
<ion-content>
|
||||
<div class="width-100 overflow-y-auto height-100" [ngSwitch]="segment">
|
||||
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
|
||||
|
||||
<div *ngIf="diplomasList">
|
||||
<ion-list *ngSwitchCase="'validar'">
|
||||
<ion-item
|
||||
|
||||
@@ -36,11 +36,18 @@ constructor(
|
||||
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();
|
||||
}
|
||||
});
|
||||
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)
|
||||
|
||||
}
|
||||
|
||||
segmentChanged(ev: any) {
|
||||
|
||||
@@ -36,15 +36,10 @@ export class EventsToApprovePage implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
this.segment = this.loggeduser.Profile;
|
||||
console.log(this.segment);
|
||||
|
||||
|
||||
// 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)) {
|
||||
if (event instanceof NavigationEnd &&
|
||||
event.url.startsWith('/home/gabinete-digital?eventos=true')) {
|
||||
this.LoadToApproveEvents();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
<ion-content>
|
||||
|
||||
<div class="width-100 overflow-y-auto height-100" *ngIf="taskslist.length >= 1">
|
||||
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
|
||||
<ion-list>
|
||||
<ion-item
|
||||
class="expediente ion-no-padding cursor-pointer"
|
||||
|
||||
@@ -22,7 +22,7 @@ export class ExpedientesPrPage implements OnInit {
|
||||
|
||||
taskslist:DailyWorkTask[] = [];
|
||||
serialNumber:string;
|
||||
skeletonLoader:boolean;
|
||||
skeletonLoader = true;
|
||||
|
||||
loggeduser: User;
|
||||
@Output() openExpedientDetail:EventEmitter<any> = new EventEmitter<any>();
|
||||
@@ -39,12 +39,9 @@ export class ExpedientesPrPage implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
// 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)) {
|
||||
if (event instanceof NavigationEnd &&
|
||||
event.url.startsWith('/home/gabinete-digital?expedientespr=true')) {
|
||||
this.LoadList();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
</ion-refresher>
|
||||
|
||||
<div class="width-100 overflow-y-auto height-100" *ngIf="taskslist">
|
||||
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
|
||||
|
||||
<ion-list>
|
||||
<ion-item
|
||||
class="expediente ion-no-padding cursor-pointer"
|
||||
|
||||
@@ -42,16 +42,14 @@ export class ExpedientsPage implements OnInit {
|
||||
//Inicializar segment
|
||||
this.segment = "expedientes";
|
||||
|
||||
// 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)) {
|
||||
if (event instanceof NavigationEnd &&
|
||||
event.url.startsWith('/home/gabinete-digital?pendentes=true')) {
|
||||
this.LoadList();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
segmentChanged(){
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
</ion-refresher>
|
||||
|
||||
<div class="width-100 overflow-y-auto height-100" [ngSwitch]="segment">
|
||||
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
|
||||
<div *ngIf="parecerList">
|
||||
<ion-list *ngSwitchCase="'parecer'">
|
||||
<!-- *ngFor = "let task of parecerList; let i = index"
|
||||
|
||||
@@ -51,15 +51,18 @@ export class PedidosPage implements OnInit {
|
||||
ngOnInit() {
|
||||
this.LoadList();
|
||||
|
||||
// update list
|
||||
const location = window.location
|
||||
const pathname = location.pathname + location.search
|
||||
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 NavigationEnd && event.url.startsWith(pathname)) {
|
||||
this.LoadList();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
segmentChanged(ev: any) {
|
||||
|
||||
@@ -10,44 +10,45 @@
|
||||
</ion-header>
|
||||
<ion-content>
|
||||
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh()">
|
||||
<ion-refresher-content
|
||||
<ion-refresher-content
|
||||
pullingIcon="chevron-down-circle-outline"
|
||||
pullingText="deslize para actualizar"
|
||||
refreshingSpinner="circles"
|
||||
refreshingText="A actualizar...">
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
|
||||
<div *ngIf="pendentesList.length >= 1" class="width-100 overflow-y-auto height-100">
|
||||
<ion-list>
|
||||
<ion-item
|
||||
class="expediente ion-no-padding cursor-pointer"
|
||||
*ngFor = "let task of pendentesList"
|
||||
(click)="viewTaskDetails(task.SerialNumber, task.WorkflowName)"
|
||||
>
|
||||
<!-- [routerLink]="['/home/gabinete-digital/expediente',task.SerialNumber]" -->
|
||||
<div class="item width-100">
|
||||
<div class="exp-top-detail">
|
||||
<div class="exp-date">
|
||||
<ion-label>{{ task.CreateDate | date: 'dd-MM-yy' }}</ion-label>
|
||||
</div>
|
||||
<div class="exp-remetente">
|
||||
<ion-label>{{task.Senders}}</ion-label>
|
||||
</div>
|
||||
<div class="exp-workflow">
|
||||
<span class="label">{{task.activityInstanceName}}</span>
|
||||
</div>
|
||||
<div class="exp-icon">
|
||||
<ion-icon src="assets/images/icons-expediente-attachment.svg"></ion-icon>
|
||||
<label *ngIf="task.DocumentsQty != 0">{{task.DocumentsQty}}</label>
|
||||
</div>
|
||||
<ion-progress-bar type="indeterminate" *ngIf="skeletonLoader"></ion-progress-bar>
|
||||
<ion-list>
|
||||
<ion-item
|
||||
class="expediente ion-no-padding cursor-pointer"
|
||||
*ngFor = "let task of pendentesList"
|
||||
(click)="viewTaskDetails(task.SerialNumber, task.WorkflowName)"
|
||||
>
|
||||
<!-- [routerLink]="['/home/gabinete-digital/expediente',task.SerialNumber]" -->
|
||||
<div class="item width-100">
|
||||
<div class="exp-top-detail">
|
||||
<div class="exp-date">
|
||||
<ion-label>{{ task.CreateDate | date: 'dd-MM-yy' }}</ion-label>
|
||||
</div>
|
||||
<div class="exp-bottom-detail">
|
||||
<ion-label>{{ task.Folio }}</ion-label>
|
||||
<div class="exp-remetente">
|
||||
<ion-label>{{task.Senders}}</ion-label>
|
||||
</div>
|
||||
<div class="exp-workflow">
|
||||
<span class="label">{{task.activityInstanceName}}</span>
|
||||
</div>
|
||||
<div class="exp-icon">
|
||||
<ion-icon src="assets/images/icons-expediente-attachment.svg"></ion-icon>
|
||||
<label *ngIf="task.DocumentsQty != 0">{{task.DocumentsQty}}</label>
|
||||
</div>
|
||||
</div>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
<div class="exp-bottom-detail">
|
||||
<ion-label>{{ task.Folio }}</ion-label>
|
||||
</div>
|
||||
</div>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</div>
|
||||
<div *ngIf="skeletonLoader && pendentesList.length == 0">
|
||||
|
||||
|
||||
@@ -42,11 +42,9 @@ export class PendentesPage implements OnInit {
|
||||
//Inicializar segment
|
||||
this.segment = "despachos";
|
||||
// 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)) {
|
||||
if (event instanceof NavigationEnd &&
|
||||
event.url.startsWith('/home/gabinete-digital?pendentes=true')) {
|
||||
this.LoadList();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user