mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 13:26:08 +00:00
Fix on route change event
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user