fixing show more in worklist and added no data if there is no data

MOHEMM-SFH-COLORS
enadhilal 4 years ago
parent 622dccee66
commit f926dc5708

@ -107,7 +107,7 @@ export class WorklistMainIcComponent implements OnInit {
itemHistoryRes: any; itemHistoryRes: any;
QutationAnalysisRes: any; QutationAnalysisRes: any;
activeSegment: any = "line_details"; activeSegment: any = "line_details";
lines_note_limit: number = 24; lines_note_limit: number = 19;
notiActionBtnMore: any = []; notiActionBtnMore: any = [];
demoeAttach: any = []; demoeAttach: any = [];
orgNote: any; orgNote: any;

@ -94,7 +94,7 @@ export class WorklistMainMRComponent implements OnInit {
delMsg: string; delMsg: string;
closeMsg: string; closeMsg: string;
activeSegment: any = 'info'; activeSegment: any = 'info';
lines_note_limit: any = 24; lines_note_limit: any = 19;
orgNote: string; orgNote: string;
truncating: boolean; truncating: boolean;
selectedIndex: any; selectedIndex: any;

@ -107,7 +107,7 @@ export class WorklistMainPoComponent implements OnInit {
itemHistoryRes: any; itemHistoryRes: any;
QutationAnalysisRes: any; QutationAnalysisRes: any;
activeSegment: any = "line_details"; activeSegment: any = "line_details";
lines_note_limit: number = 24; lines_note_limit: number = 19;
notiActionBtnMore: any = []; notiActionBtnMore: any = [];
demoeAttach: any = []; demoeAttach: any = [];
orgNote: any; orgNote: any;

@ -95,7 +95,7 @@ export class WorklistMainPRComponent implements OnInit {
closeMsg: string; closeMsg: string;
truncating: boolean; truncating: boolean;
orgNote: any; orgNote: any;
lines_note_limit: any = 24; lines_note_limit: any = 19;
selectedIndex: any; selectedIndex: any;
showLessBtn: boolean; showLessBtn: boolean;
showMoreBtn: boolean; showMoreBtn: boolean;

@ -78,7 +78,7 @@ export class WorklistMainComponent implements OnInit {
P_PAGE_LIMIT: number = 100; P_PAGE_LIMIT: number = 100;
notificationCount: any; notificationCount: any;
activeSegment: any = 'info'; activeSegment: any = 'info';
lines_note_limit: any = 24; lines_note_limit: any = 19;
attachmentRes: any = []; attachmentRes: any = [];
private WorkListActionHistoryObj: WorkListActionHistoryRequest; private WorkListActionHistoryObj: WorkListActionHistoryRequest;
IsReachEnd: boolean = true; IsReachEnd: boolean = true;

@ -47,7 +47,7 @@
<div class="grid-container"> <div class="grid-container">
<ion-row> <ion-row *ngIf="isData">
<ion-col size="6" *ngFor="let item of offersData" (click)="openDetails(item)"> <ion-col size="6" *ngFor="let item of offersData" (click)="openDetails(item)">
<ion-card class="offers-discount-card"> <ion-card class="offers-discount-card">
<ion-card-header> <ion-card-header>
@ -78,7 +78,19 @@
</ion-card-content> </ion-card-content>
</ion-card> </ion-card>
</ion-col> </ion-col>
</ion-row>
<ion-row *ngIf="!isData">
<ion-col>
<div>
<ion-item lines="none" style="border-radius: 0px !important; --background:#f5f5f5 !important">
<ion-label>
<p style="text-align: center;">
{{ts.trPK('general','empty')}}
</p>
</ion-label>
</ion-item>
</div>
</ion-col>
</ion-row> </ion-row>
</div> </div>
</div> </div>

@ -25,6 +25,7 @@ export class HomeComponent implements AfterViewInit {
direction: any; direction: any;
itemCounter = 1; itemCounter = 1;
itemType: any; itemType: any;
isData = true;
// categories:any = []; // categories:any = [];
constructor( constructor(
public ts: TranslatorService, public ts: TranslatorService,
@ -77,15 +78,21 @@ export class HomeComponent implements AfterViewInit {
this.offersService.getOffers({}, () => { }, this.ts.trPK('general', 'retry'),pageNo, categoryId).subscribe((res) => { this.offersService.getOffers({}, () => { }, this.ts.trPK('general', 'retry'),pageNo, categoryId).subscribe((res) => {
var data = JSON.parse(res['Mohemm_ITG_ResponseItem']); var data = JSON.parse(res['Mohemm_ITG_ResponseItem']);
this.cs.stopLoading(); this.cs.stopLoading();
if (data['result']) if (data['result']) {
this.displayOffers(data['result']); this.displayOffers(data['result']);
this.isData = true;
}else{
this.isData = false;
}
}); });
} else { } else {
this.offersService.getOffers({}, () => { }, this.ts.trPK('general', 'retry')).subscribe((res) => { this.offersService.getOffers({}, () => { }, this.ts.trPK('general', 'retry')).subscribe((res) => {
var data = JSON.parse(res['Mohemm_ITG_ResponseItem']); var data = JSON.parse(res['Mohemm_ITG_ResponseItem']);
this.cs.stopLoading(); this.cs.stopLoading();
if (data['result']) if (data['result']){
this.displayOffers(data['result']); this.displayOffers(data['result']);
this.isData = true;
} else{this.isData = false;}
}); });
} }

Loading…
Cancel
Save