fixed loading div in worklist

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

@ -40,8 +40,7 @@
<ion-grid>
<ion-row>
<ion-col>
<div *ngIf="pInformation && pInformation != '' " class="tipsPadding">{{pInformation}}
</div>
<div *ngIf="pInformation && pInformation != '' " class="tipsPadding">{{pInformation}}</div>
</ion-col>
</ion-row>
@ -49,10 +48,16 @@
<!-- NOT ADDRESS & BASIC_DETAILS -->
<ion-col
*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>
</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; "
style="width: 91%;">
<ion-card-content *ngIf="item.Collection_Notification.length > 0">
@ -126,6 +131,13 @@
<!-- IF BASIC_DETAILS -->
<ion-col *ngIf="getPassNotificationDetails?.REQUEST_TYPE == 'BASIC_DETAILS' ||
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'>
<ion-card style="width: 91%;">
<ion-card-content>

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

@ -108,6 +108,7 @@ export class WorklistMainComponent implements OnInit {
closeDis: boolean = false;
public selectedFilter: string;
public arr_hr_req_only = [];
public showInformation = true;
constructor(
public worklistService: WorklistService,
@ -337,6 +338,7 @@ export class WorklistMainComponent implements OnInit {
}
handleWorkListBodyResult(result, Type) {
this.showInformation = false;
if (this.common.validResponse(result)) {
this.pInformation = result.P_INFORMATION;
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];
}
showLoading( notificationList ) {
if (notificationList.length < 0) {
return true;
} else if (notificationList === []){
return false;
} else {return true;}
}
}

Loading…
Cancel
Save