From f926dc5708689184717c63a394623a5c7e4b77d2 Mon Sep 17 00:00:00 2001 From: enadhilal Date: Tue, 31 Aug 2021 12:02:47 +0300 Subject: [PATCH] fixing show more in worklist and added no data if there is no data --- .../worklist-main-ic.component.ts | 2 +- .../worklist-main-mr.component.ts | 2 +- .../worklist-main-po.component.ts | 2 +- .../worklist-main-pr.component.ts | 2 +- .../worklist-main/worklist-main.component.ts | 2 +- .../app/offersdiscount/home/home.component.html | 16 ++++++++++++++-- .../app/offersdiscount/home/home.component.ts | 11 +++++++++-- 7 files changed, 28 insertions(+), 9 deletions(-) diff --git a/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.ts b/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.ts index 85c9c3f3..d590dc23 100644 --- a/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.ts +++ b/Mohem/src/app/notification/worklist-main-ic/worklist-main-ic.component.ts @@ -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; diff --git a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.ts b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.ts index 0c9b4b66..bcf11eb4 100644 --- a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.ts +++ b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.ts @@ -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; diff --git a/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.ts b/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.ts index bc0a9746..7972c17d 100644 --- a/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.ts +++ b/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.ts @@ -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; diff --git a/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.ts b/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.ts index a89f4826..a71e0492 100644 --- a/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.ts +++ b/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.ts @@ -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; diff --git a/Mohem/src/app/notification/worklist-main/worklist-main.component.ts b/Mohem/src/app/notification/worklist-main/worklist-main.component.ts index d12c5fb4..ac9e5438 100644 --- a/Mohem/src/app/notification/worklist-main/worklist-main.component.ts +++ b/Mohem/src/app/notification/worklist-main/worklist-main.component.ts @@ -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; diff --git a/Mohem/src/app/offersdiscount/home/home.component.html b/Mohem/src/app/offersdiscount/home/home.component.html index 95508a9c..c95b9e3e 100644 --- a/Mohem/src/app/offersdiscount/home/home.component.html +++ b/Mohem/src/app/offersdiscount/home/home.component.html @@ -47,7 +47,7 @@
- + @@ -78,7 +78,19 @@ - + + + +
+ + +

+ {{ts.trPK('general','empty')}} +

+
+
+
+
diff --git a/Mohem/src/app/offersdiscount/home/home.component.ts b/Mohem/src/app/offersdiscount/home/home.component.ts index 3290aa8c..5761a81e 100644 --- a/Mohem/src/app/offersdiscount/home/home.component.ts +++ b/Mohem/src/app/offersdiscount/home/home.component.ts @@ -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;} }); }