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;
QutationAnalysisRes: any;
activeSegment: any = "line_details";
lines_note_limit: number = 24;
lines_note_limit: number = 19;
notiActionBtnMore: any = [];
demoeAttach: any = [];
orgNote: any;

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

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

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

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

@ -47,7 +47,7 @@
<div class="grid-container">
<ion-row>
<ion-row *ngIf="isData">
<ion-col size="6" *ngFor="let item of offersData" (click)="openDetails(item)">
<ion-card class="offers-discount-card">
<ion-card-header>
@ -78,7 +78,19 @@
</ion-card-content>
</ion-card>
</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>
</div>
</div>

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

Loading…
Cancel
Save