fixed loading div in worklist

enad-Q3
enadhilal 4 years ago
parent 44585ad9bd
commit eee3f27cec

@ -40,8 +40,7 @@
<ion-grid> <ion-grid>
<ion-row> <ion-row>
<ion-col> <ion-col>
<div *ngIf="pInformation && pInformation != '' " class="tipsPadding">{{pInformation}} <div *ngIf="pInformation && pInformation != '' " class="tipsPadding">{{pInformation}}</div>
</div>
</ion-col> </ion-col>
</ion-row> </ion-row>
@ -49,10 +48,16 @@
<!-- NOT ADDRESS & BASIC_DETAILS --> <!-- NOT ADDRESS & BASIC_DETAILS -->
<ion-col <ion-col
*ngIf="getPassNotificationDetails?.REQUEST_TYPE != 'ADDRESS' && getPassNotificationDetails?.REQUEST_TYPE != 'BASIC_DETAILS' "> *ngIf="getPassNotificationDetails?.REQUEST_TYPE != 'ADDRESS' && getPassNotificationDetails?.REQUEST_TYPE != 'BASIC_DETAILS' ">
<div *ngIf="notificationBodyRes?.length <= 0 ">
<div *ngIf="showInformation">
<p>{{'worklist, loading'| translate}} <img style="width: 3%;" src="../assets/icon/progress-loading.gif"/></p> <p>{{'worklist, loading'| translate}} <img style="width: 3%;" src="../assets/icon/progress-loading.gif"/></p>
</div> </div>
<div *ngIf="notificationBodyRes?.length > 0 ">
<div class="no-data-div" *ngIf="notificationBodyRes?.length === 0 && !showInformation">
<p>{{ 'general, empty' | translate}}</p>
</div>
<div *ngIf="notificationBodyRes?.length > 0">
<ion-card *ngFor="let item of notificationBodyRes;let i=index; " <ion-card *ngFor="let item of notificationBodyRes;let i=index; "
style="width: 91%;"> style="width: 91%;">
<ion-card-content *ngIf="item.Collection_Notification.length > 0"> <ion-card-content *ngIf="item.Collection_Notification.length > 0">
@ -126,6 +131,13 @@
<!-- IF BASIC_DETAILS --> <!-- IF BASIC_DETAILS -->
<ion-col *ngIf="getPassNotificationDetails?.REQUEST_TYPE == 'BASIC_DETAILS' || <ion-col *ngIf="getPassNotificationDetails?.REQUEST_TYPE == 'BASIC_DETAILS' ||
getPassNotificationDetails?.REQUEST_TYPE == 'ADDRESS'"> getPassNotificationDetails?.REQUEST_TYPE == 'ADDRESS'">
<div *ngIf="showInformation">
<p>{{'worklist, loading'| translate}} <img style="width: 3%;" src="../assets/icon/progress-loading.gif"/></p>
</div>
<div class="no-data-div" *ngIf="notificationBodyRes?.length === 0 && !showInformation">
<p>{{ 'general, empty' | translate}}</p>
</div>
<div *ngIf='notificationBodyRes.length > 0'> <div *ngIf='notificationBodyRes.length > 0'>
<ion-card style="width: 91%;"> <ion-card style="width: 91%;">
<ion-card-content> <ion-card-content>

@ -137,6 +137,15 @@
border-radius: 10px; border-radius: 10px;
margin: 10px; margin: 10px;
} }
.no-data-div{
background: #ffffff;
height: 100%;
text-align: center;
padding-top: 1px;
border-radius: 10px;
margin: 10px;
}
.container { .container {
font-size: 14px; font-size: 14px;

@ -108,6 +108,7 @@ export class WorklistMainComponent implements OnInit {
closeDis: boolean = false; closeDis: boolean = false;
public selectedFilter: string; public selectedFilter: string;
public arr_hr_req_only = []; public arr_hr_req_only = [];
public showInformation = true;
constructor( constructor(
public worklistService: WorklistService, public worklistService: WorklistService,
@ -337,6 +338,7 @@ export class WorklistMainComponent implements OnInit {
} }
handleWorkListBodyResult(result, Type) { handleWorkListBodyResult(result, Type) {
this.showInformation = false;
if (this.common.validResponse(result)) { if (this.common.validResponse(result)) {
this.pInformation = result.P_INFORMATION; this.pInformation = result.P_INFORMATION;
this.pQuestion = result.P_QUESTION; this.pQuestion = result.P_QUESTION;
@ -1148,7 +1150,6 @@ export class WorklistMainComponent implements OnInit {
} }
@ -1157,4 +1158,12 @@ export class WorklistMainComponent implements OnInit {
return this.locale[lang].month_names_short[month]; return this.locale[lang].month_names_short[month];
} }
showLoading( notificationList ) {
if (notificationList.length < 0) {
return true;
} else if (notificationList === []){
return false;
} else {return true;}
}
} }

Loading…
Cancel
Save