mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
save
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
<ion-content>
|
||||
|
||||
<div class="main-content width-100 overflow-y-auto height-100">
|
||||
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="doRefresh($event)">
|
||||
<ion-refresher name="refresher" slot="fixed" (ionRefresh)="segmentChanged($event)">
|
||||
<ion-refresher-content
|
||||
pullingIcon="chevron-down-circle-outline"
|
||||
pullingText="deslize para actualizar"
|
||||
@@ -35,15 +35,15 @@
|
||||
refreshingText="A actualizar...">
|
||||
</ion-refresher-content>
|
||||
</ion-refresher>
|
||||
|
||||
|
||||
<div class="width-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"
|
||||
(click)="viewExpedientDetail(task.SerialNumber)" -->
|
||||
<div
|
||||
class="expediente ion-no-padding ion-no-margin cursor-pointer"
|
||||
<div
|
||||
class="expediente ion-no-padding ion-no-margin cursor-pointer"
|
||||
*ngFor = "let task of parecerList"
|
||||
(click)="goToPedido(task.SerialNumber)"
|
||||
>
|
||||
@@ -75,12 +75,12 @@
|
||||
</div>
|
||||
</div>
|
||||
</ion-list>
|
||||
|
||||
|
||||
</div>
|
||||
<div *ngIf="deferimentoList">
|
||||
<ion-list *ngSwitchCase="'deferimento'">
|
||||
<div
|
||||
class="expediente ion-no-padding ion-no-margin cursor-pointer"
|
||||
class="expediente ion-no-padding ion-no-margin cursor-pointer"
|
||||
*ngFor = "let task of deferimentoList"
|
||||
(click)="goToPedido(task.SerialNumber)"
|
||||
>
|
||||
@@ -115,10 +115,10 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div [ngSwitch]="segment">
|
||||
<div *ngSwitchCase="'parecer'" class="d-flex height-100 align-center justify-content-center" >
|
||||
<div
|
||||
*ngIf="!skeletonLoader && parecerList.length == 0"
|
||||
<div
|
||||
*ngIf="!skeletonLoader && parecerList.length == 0"
|
||||
class="empty-list d-flex height-100 align-center justify-content-center"
|
||||
>
|
||||
<span>Lista vazia</span>
|
||||
@@ -126,16 +126,17 @@
|
||||
</div>
|
||||
|
||||
<div *ngSwitchCase="'deferimento'" class="d-flex height-100 align-center justify-content-center">
|
||||
<div
|
||||
*ngIf="!skeletonLoader && deferimentoList.length == 0"
|
||||
<div
|
||||
*ngIf="!skeletonLoader && deferimentoList.length == 0"
|
||||
class="empty-list d-flex height-100 align-center justify-content-center"
|
||||
>
|
||||
<span>Lista vazia</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div *ngIf="skeletonLoader && deferimentoList.length == 0 && skeletonLoader && parecerList.length == 0">
|
||||
|
||||
|
||||
<ion-list>
|
||||
<ion-item>
|
||||
<ion-thumbnail slot="end">
|
||||
|
||||
@@ -26,7 +26,7 @@ export class PedidosPage implements OnInit {
|
||||
serialNumber:string;
|
||||
skeletonLoader = true
|
||||
|
||||
@Input() segment:string;
|
||||
segment:string;
|
||||
@Output() openExpedientDetail:EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
constructor(
|
||||
@@ -54,10 +54,10 @@ export class PedidosPage implements OnInit {
|
||||
this.LoadList();
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
if(event instanceof NavigationStart && '/home/gabinete-digital/pedidos?parecer=true'.startsWith(event.url) ||
|
||||
if(event instanceof NavigationStart && '/home/gabinete-digital/pedidos?parecer=true'.startsWith(event.url) ||
|
||||
event instanceof NavigationStart && '/home/gabinete-digital/pedidos?deferimento=true'.startsWith(event.url)
|
||||
) {
|
||||
|
||||
|
||||
if(window.location.pathname.split('/').length >= 4 && window.location.pathname.startsWith('/home/gabinete-digital')) {
|
||||
this.refreshing()
|
||||
} else {
|
||||
@@ -71,7 +71,7 @@ export class PedidosPage implements OnInit {
|
||||
this.router.navigate(['/home/gabinete-digital']);
|
||||
}
|
||||
|
||||
segmentChanged(ev: any) {
|
||||
/* segmentChanged(ev: any) {
|
||||
|
||||
let navigationExtras: NavigationExtras;
|
||||
|
||||
@@ -84,7 +84,7 @@ export class PedidosPage implements OnInit {
|
||||
this.router.navigate(['/home/gabinete-digital/pedidos'], navigationExtras);
|
||||
|
||||
// this.LoadList();
|
||||
}
|
||||
} */
|
||||
|
||||
goToPedido(serialNumber:any){
|
||||
this.router.navigate(['/home/gabinete-digital/pedidos',serialNumber,'gabinete-digital']);
|
||||
@@ -111,7 +111,7 @@ export class PedidosPage implements OnInit {
|
||||
this.skeletonLoader = false
|
||||
|
||||
let allParecer = parecer.concat(parecerPr).reverse().filter(data => data.workflowInstanceDataFields.Status == "Active")
|
||||
|
||||
|
||||
this.parecerList =[];
|
||||
|
||||
allParecer.filter(data => data.workflowInstanceDataFields.Status == "Active").forEach(element => {
|
||||
@@ -139,7 +139,7 @@ export class PedidosPage implements OnInit {
|
||||
else if(this.segment == 'deferimento') {
|
||||
this.taskType = "Pedido de Deferimento";
|
||||
this.processes.GetTasksList("Pedido de Deferimento", false).subscribe(result => {
|
||||
|
||||
|
||||
this.skeletonLoader = false
|
||||
|
||||
console.log(result);
|
||||
@@ -170,8 +170,8 @@ export class PedidosPage implements OnInit {
|
||||
if(element.workflowInstanceDataFields.Status == "Active") {
|
||||
this.deferimentoList.push(task);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
@@ -179,6 +179,10 @@ export class PedidosPage implements OnInit {
|
||||
|
||||
}
|
||||
|
||||
segmentChanged(ev: any) {
|
||||
this.LoadList();
|
||||
}
|
||||
|
||||
refreshing() {
|
||||
setTimeout(() => {
|
||||
this.LoadList();
|
||||
|
||||
Reference in New Issue
Block a user