From 53746fc95f804fdd542493ed7d097fc411e6cc70 Mon Sep 17 00:00:00 2001 From: ashwaq Date: Tue, 7 Jan 2020 08:33:33 +0300 Subject: [PATCH] add infinite Scroll --- .../item-history/item-history.component.html | 4 +- .../qutation-analysis.component.ts | 9 +- .../worklist-main-mr.component.html | 616 +++++++++--------- .../worklist-main-mr.component.scss | 8 + .../worklist-main-mr.component.ts | 113 ++++ .../worklist-main-po.component.html | 441 +++++++------ .../worklist-main-po.component.ts | 104 ++- .../worklist-main-pr.component.html | 15 +- .../worklist-main-pr.component.scss | 314 +-------- .../worklist-main-pr.component.ts | 73 +++ .../src/app/payslip/home/home.component.html | 13 +- Mohem/src/app/payslip/home/home.component.ts | 103 ++- Mohem/src/app/payslip/model/deductionReq.ts | 9 + .../vacation-rule/home/home.component.html | 4 + .../app/vacation-rule/home/home.component.ts | 38 +- Mohem/src/assets/localization/i18n.json | 6 + Mohem/src/theme/styles.scss | 7 +- Mohem/src/theme/worklist.scss | 2 +- 18 files changed, 1014 insertions(+), 865 deletions(-) create mode 100644 Mohem/src/app/payslip/model/deductionReq.ts diff --git a/Mohem/src/app/notification/item-history/item-history.component.html b/Mohem/src/app/notification/item-history/item-history.component.html index 7f71778a..c68df82b 100644 --- a/Mohem/src/app/notification/item-history/item-history.component.html +++ b/Mohem/src/app/notification/item-history/item-history.component.html @@ -37,8 +37,8 @@ - + {{itemHistory.OU_NAME}}--> + diff --git a/Mohem/src/app/notification/qutation-analysis/qutation-analysis.component.ts b/Mohem/src/app/notification/qutation-analysis/qutation-analysis.component.ts index ed1946e0..1dcb6722 100644 --- a/Mohem/src/app/notification/qutation-analysis/qutation-analysis.component.ts +++ b/Mohem/src/app/notification/qutation-analysis/qutation-analysis.component.ts @@ -30,9 +30,9 @@ export class QutationAnalysisComponent implements OnInit { private ts: TranslatorService, private modalCtrl: ModalController, public worklistService: WorklistService) { - this.getPassPOItemID = this.cs.sharedService.getSharedData('passPOInfo'); - this.getPassPOHeaderID = this.cs.sharedService.getSharedData('passPOHeader'); - this.getPassItemHistoreyList = this.cs.sharedService.getSharedData('passItemHisList'); + this.getPassPOItemID = this.cs.sharedService.getSharedData('passPOInfo',false); + this.getPassPOHeaderID = this.cs.sharedService.getSharedData('passPOHeader',false); + this.getPassItemHistoreyList = this.cs.sharedService.getSharedData('passItemHisList',false); //itemHistoryRes console.log("getPassPOItemID: "+this.getPassPOItemID); console.log("getPassPOItemID: "+this.getPassPOHeaderID); @@ -92,10 +92,9 @@ console.log("getPassPOItemID: "+this.getPassPOHeaderID); doInfinite(infiniteScroll) { - console.log("hello"); if (!this.IsReachEnd) { this.getQutationAnalysis.P_PAGE_NUM = this.P_PAGE_NUM; - this.worklistService.getActionHistory(this.getQutationAnalysis). + this.worklistMainService.getQutationAnalysis(this.getQutationAnalysis). subscribe((result: any) => { if (this.cs.validResponse(result)) { if (result.GetQuotationAnalysisList != undefined) { diff --git a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.html b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.html index 3ce0bf61..886bf8d7 100644 --- a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.html +++ b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.html @@ -6,7 +6,7 @@ - + @@ -34,152 +34,151 @@ - - - -
{{pInformation}}
+ +
{{pInformation}}
- - - - - - - -
- - -
-
- - - - -
+ + + + + - + +
+
- - - -
+ + + +
- - -
-
- - - -
- - - -
-
- - - -
- - - -
-
- - - -
- - - -
-
+ +
+
- - - -
+ + + +
- - -
-
+ +
+
+ + + +
- + + +
+
+ + + +
-
+ + + + + + + +
- - + + +
+
+ - +
- + +
-
-
+ +
+ + - -
- - -
{{totalH}}
-
{{valueH}}
- -
- -
{{taxH}}
-
{{taxvalueH}}
+ + +
+
-
+
+ + + +
+ + +
{{totalH}}
+
{{valueH}}
+
+ +
{{taxH}}
+
{{taxvalueH}}
- +
+
- +
+
- -
-
-
+ + -
- -
- - + + + + - -
-

{{ 'general, empty' | translate}}

-
- +
+

{{ 'general, empty' | translate}}

+
+ + -
- - -
+ + +
- - - - - - - - - - -
- - {{notificationList.ITEM_CODE}} -
- - - - -
- - {{notificationList.UOM}} -
-
- + {{notificationList.UOM}} + + + - - - -
- - {{notificationList.QUANTITY}} + {{notificationList.QUANTITY}} -
- + +
{{notificationList.DATE_REQUIRED}}
-
- + + + - - - - -
- - {{notificationList.LINE_STATUS}} -
+ {{notificationList.LINE_STATUS}} + - + -
- - {{notificationList.STATUS_DATE}} -
+ {{notificationList.STATUS_DATE}} +
-
+ - - + - - -
- - {{notificationList.TRANSACTION_TYPE_NAME}} -
+ {{notificationList.TRANSACTION_TYPE_NAME}} + - +
- {{notificationList.ORGANIZATION_NAME}} -
-
- - - + {{notificationList.ORGANIZATION_NAME}} + + + + - - + + +
- {{notificationList.FROM_LOCATOR}} -
- + {{notificationList.FROM_LOCATOR}} +
+ + +
+ + - - - - - +
- {{notificationList.TO_LOCATOR}} -
- + {{notificationList.TO_LOCATOR}} +
-
- + - + - - + + + +
+ + + + - - -
-

{{ 'general, empty' | translate}}

-
-
- -
- + + -
- - +
+

{{ 'general, empty' | translate}}

+
+
+ +
+ -
+
+ + - -
- + -
--> + +
+ - [ngClass]="{'bg-blue-dot' : actionHistory.ACTION === 'Submitted' || actionHistory.ACTION === 'Submit' ,'bg-orange-dot' : actionHistory.ACTION === 'Pending' ,'bg-red-dot' : actionHistory.ACTION === 'Rejected','bg-green-dot' : actionHistory.ACTION != 'Pending' && actionHistory.ACTION != 'Rejected' && actionHistory.ACTION != 'Submitted' && actionHistory.ACTION != 'Submit'}" - class="timeline-thumb timeline-icon"> +
+
-
- - {{actionHistory.ACTION}} - {{actionHistory.NAME}} - + + {{actionHistory.ACTION}} + {{actionHistory.NAME}} + + + {{actionHistory.NOTIFICATION_DATE| dateString }} + + +
+ +
- {{actionHistory.NOTIFICATION_DATE| dateString }} - -
-
-
-
-
-
+ + +
+ - - -
-

{{ 'general, notAttch' | translate}}

-
-
- - -
- - -
- -
-
-
-
- -
-
- -
- - {{attachList.SEQ_NUM }}. {{attachList.FILE_NAME}} -
- -
-
+ +
- - -
- - - +
+ + + + + + + + + + + + diff --git a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.scss b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.scss index e69de29b..db039aed 100644 --- a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.scss +++ b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.scss @@ -0,0 +1,8 @@ +.itemHISBtn{ + padding: 5px; + color: var(--light); + background: var(--darkgray); + border-radius: 3px; + width: 85%; + height: 40px; +} \ No newline at end of file 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 14423f3c..67e07287 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 @@ -697,6 +697,8 @@ export class WorklistMainMRComponent implements OnInit { } doInfinite(infiniteScroll) { + console.log("doInfinite action history MR"); + if (!this.IsReachEnd) { this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM; this.worklistService.getActionHistory(this.WorkListActionHistoryObj). @@ -776,4 +778,115 @@ export class WorklistMainMRComponent implements OnInit { } + + + doInfiniteNotificationBody(infiniteScroll) { + console.log("doInfiniteNotificationBody MR"); + if (!this.IsReachEnd) { + this.WorkListBodyObj.P_PAGE_NUM = this.P_PAGE_NUM; + this.worklistMainService.getMONotificationBody(this.WorkListActionHistoryObj). + subscribe((result: any) => { + if (this.common.validResponse(result)) { + if (result.GetMoNotificationBodyList != undefined) { + this.P_PAGE_NUM++; + (result.GetMoNotificationBodyList).forEach(element => { + if (element.ROW_NUM == element.NO_OF_ROWS) { + this.IsReachEnd = true; + } else { + this.IsReachEnd = false; + } + this.notificationBodyRes.push(element); + }, (Error) => console.log(Error), () => infiniteScroll.target.complete()); + }// if list length >0 + else { + this.IsReachEnd = true; + } + }// if response == 1 + //this.pageNum++; + infiniteScroll.target.complete(); + + }); + } else { + if (infiniteScroll) + infiniteScroll.target.complete(); + } + }//end infiniteScroll + + + + + loadMoreNotificationBody() { + console.log("loadMoreNotificationBody MR"); + if (!this.IsReachEnd) { + console.log("this.IsReachEnd"+ this.IsReachEnd); + + this.WorkListBodyObj.P_PAGE_NUM = this.P_PAGE_NUM; + this.worklistMainService.getMONotificationBody(this.WorkListBodyObj). + subscribe((result: any) => { + if (this.common.validResponse(result)) { + if (result.GetMoNotificationBodyList != undefined) { + this.P_PAGE_NUM++; + (result.GetMoNotificationBodyList).forEach(element => { + if (element.ROW_NUM == element.NO_OF_ROWS) { + this.IsReachEnd = true; + } else { + this.IsReachEnd = false; + } + this.notificationBodyRes.push(element); + }, (Error) => console.log(Error), () => + //infiniteScroll.target.complete() + console.log("test") + ); + }// if list length >0 + else { + this.IsReachEnd = true; + } + }// if response == 1 + //this.pageNum++; + // infiniteScroll.target.complete(); + + }); + } else { + // if (infiniteScroll) + // infiniteScroll.target.complete(); + } + }//end infiniteScroll + loadMoreActionHistory() { + console.log("doInfinite action history MR"); + + if (!this.IsReachEnd) { + this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM; + this.worklistService.getActionHistory(this.WorkListActionHistoryObj). + subscribe((result: any) => { + if (this.common.validResponse(result)) { + if (result.GetActionHistoryList != undefined) { + this.P_PAGE_NUM++; + (result.GetActionHistoryList).forEach(element => { + if (element.ROW_NUM == element.NO_OF_ROWS) { + this.IsReachEnd = true; + } else { + this.IsReachEnd = false; + } + this.actionHistoryRes.push(element); + }, (Error) => console.log(Error), () => + //infiniteScroll.target.complete() + console.log("TEST")); + }// if list length >0 + else { + this.IsReachEnd = true; + } + }// if response == 1 + //this.pageNum++; + // infiniteScroll.target.complete(); + + }); + } else { + //if (infiniteScroll) + //infiniteScroll.target.complete(); + } + }//end infiniteScroll + + + + } diff --git a/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.html b/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.html index a8a2ce33..b29116a2 100644 --- a/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.html +++ b/Mohem/src/app/notification/worklist-main-po/worklist-main-po.component.html @@ -6,13 +6,13 @@ - + {{ts.trPK('worklistMain','info')}} - {{ts.trPK('worklistMain','itemReq')}} + {{ts.trPK('worklistMain','line_details')}} @@ -42,13 +42,13 @@ - + + + @@ -56,7 +56,7 @@
- +
@@ -77,7 +77,7 @@
- + @@ -114,7 +114,7 @@
- + @@ -122,145 +122,150 @@
- +
- +
-
- - - -
- - -
-
+ + + + +
+ + +
+
- - -
+ + +
- -
+ +

- +
-
+
- +
-
- - - -
- - -
-
- - - -
- - -
-
- - - -
- - -
-
- - - -
- - -
-
- - - -
- - -
-
- - - -
- - -
-
- - - -
- - -
-
- - - -
- - -
-
- - - -
- - -
-
+ + + + +
- - - -
- - -
-
- - - -
- - -
-
- - - -
- - -
-
- - - - - -
- - -
-
- - - - -
- - -
-
- + + @@ -334,7 +344,7 @@
- + @@ -344,22 +354,22 @@ -
-

{{ 'general, empty' | translate}}

-
- +
+

{{ 'general, empty' | translate}}

+
+ + +
+ -
- + +
- -
- - + @@ -367,56 +377,58 @@
- + {{Lines.ITEM_CODE}}

- + {{Lines.MFG}} *
- - + + - +
- + {{Lines.LINE_TYPE}}

- + {{Lines.UOM}}
- - + +

- + {{Lines.UNIT_PRICE}}
- +
- + {{Lines.LINE_AMOUNT}}
- - + +
@@ -424,20 +436,20 @@
- + {{Lines.QUANTITY}}

- + {{Lines.LINE_DISC_PERCENTAGE}}
- - + +
@@ -445,41 +457,43 @@
- + {{Lines.NEED_BY_DATE}}
- +
- + {{Lines.PROMISED_DATE}}
- - + +
- +
- + {{Lines.DELIVER_TO_LOCATION}}

- + {{Lines.PR_NUM}}
- - + +
@@ -488,7 +502,7 @@
- + {{Lines.REQUESTOR}} @@ -499,9 +513,9 @@ --> - - + +
@@ -511,8 +525,9 @@
-
- - + +
-
+ - -
- - + + @@ -580,15 +597,14 @@
-
+
{{actionHistory.ACTION}} + [ngClass]="{'bg-blue-txt' : actionHistory.ACTION === 'Submitted' || actionHistory.ACTION === 'Submit' ,'bg-orange-txt' : actionHistory.ACTION === 'Pending' ,'bg-red-txt' : actionHistory.ACTION === 'Rejected','bg-green-txt' : actionHistory.ACTION != 'Pending' && actionHistory.ACTION != 'Rejected' && actionHistory.ACTION != 'Submitted' && actionHistory.ACTION != 'Submit'}" + class=""> {{actionHistory.ACTION}} {{actionHistory.NAME}} @@ -598,10 +614,13 @@
+ +
-
+
+ @@ -609,7 +628,7 @@

{{ 'general, notAttch' | translate}}

- +
@@ -632,12 +651,12 @@ {{attachList.SEQ_NUM }}. {{attachList.FILE_NAME}} - +
- +
@@ -647,7 +666,7 @@
- +
@@ -663,7 +682,7 @@ - + {{'actionHis, action' | translate}} 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 430383fe..edbf93fc 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 @@ -722,6 +722,7 @@ export class WorklistMainPoComponent implements OnInit { } doInfinite(infiniteScroll) { + console.log("doInfinite action history"); if (!this.IsReachEnd) { this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM; this.worklistService.getActionHistory(this.WorkListActionHistoryObj). @@ -785,28 +786,24 @@ export class WorklistMainPoComponent implements OnInit { WorklistMainPoComponent.PASS_PO_INFO ); //open page - this.common.openItemHistoryPage(); - //this.handleItemHistoryResult(result); + // this.common.openItemHistoryPage(); + this.handleItemHistoryResult(result); }); } handleItemHistoryResult(result) { if (this.common.validResponse(result)) { - if (this.common.hasData(result.GetItemHistoryList)) { - this.itemHistoryRes = result.GetItemHistoryList; - this.P_PAGE_NUM++; - let lastItemIndex = this.itemHistoryRes.length - 1; - if (result.GetItemHistoryList[lastItemIndex]) { - let lastitem = result.GetItemHistoryList[lastItemIndex]; - if (lastitem.NO_OF_ROWS == lastitem.ROW_NUM) { - this.IsReachEnd = true; - } else { - this.IsReachEnd = false; - } - } + if (this.common.hasData(result.GetPoItemHistoryList)) { + this.common.openItemHistoryPage(); + } } + else{ + this.common.presentAlert( + this.ts.trPK("general", "empty") + ); } + } getQutationAnalysis(headerID,itemID) { @@ -858,12 +855,85 @@ export class WorklistMainPoComponent implements OnInit { // } }//hasData else{ - alert("No DATA") - } + this.common.presentAlert( + this.ts.trPK("general", "empty") + ); } } } -//infinite scrolling + loadMoreNotificationBody() { + console.log("loadMoreNotificationBody PO"); + if (!this.IsReachEnd) { + console.log("this.IsReachEnd"+ this.IsReachEnd); + + this.WorkListBodyObj.P_PAGE_NUM = this.P_PAGE_NUM; + this.worklistMainService.getPONotificationBody(this.WorkListBodyObj). + subscribe((result: any) => { + if (this.common.validResponse(result)) { + if (result.GetPoNotificationBodyList != undefined) { + this.P_PAGE_NUM++; + (result.GetPoNotificationBodyList).forEach(element => { + if (element.ROW_NUM == element.NO_OF_ROWS) { + this.IsReachEnd = true; + } else { + this.IsReachEnd = false; + } + this.notificationBodyRes.push(element); + }, (Error) => console.log(Error), () => + //infiniteScroll.target.complete() + console.log("test") + ); + }// if list length >0 + else { + this.IsReachEnd = true; + } + }// if response == 1 + //this.pageNum++; + // infiniteScroll.target.complete(); + + }); + } else { + // if (infiniteScroll) + // infiniteScroll.target.complete(); + } + }//end infiniteScroll + loadMoreActionHistory() { + console.log("doInfinite action history MR"); + + if (!this.IsReachEnd) { + this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM; + this.worklistService.getActionHistory(this.WorkListActionHistoryObj). + subscribe((result: any) => { + if (this.common.validResponse(result)) { + if (result.GetActionHistoryList != undefined) { + this.P_PAGE_NUM++; + (result.GetActionHistoryList).forEach(element => { + if (element.ROW_NUM == element.NO_OF_ROWS) { + this.IsReachEnd = true; + } else { + this.IsReachEnd = false; + } + this.actionHistoryRes.push(element); + }, (Error) => console.log(Error), () => + //infiniteScroll.target.complete() + console.log("TEST")); + }// if list length >0 + else { + this.IsReachEnd = true; + } + }// if response == 1 + //this.pageNum++; + // infiniteScroll.target.complete(); + + }); + } else { + //if (infiniteScroll) + //infiniteScroll.target.complete(); + } + }//end infiniteScroll + + + } diff --git a/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.html b/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.html index ebf8c840..d3b32a89 100644 --- a/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.html +++ b/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.html @@ -6,7 +6,7 @@
- + @@ -168,6 +168,7 @@ + @@ -324,15 +325,14 @@ -
+
{{actionHistory.ACTION}} + [ngClass]="{'bg-blue-txt' : actionHistory.ACTION === 'Submitted' || actionHistory.ACTION === 'Submit' ,'bg-orange-txt' : actionHistory.ACTION === 'Pending' ,'bg-red-txt' : actionHistory.ACTION === 'Rejected','bg-green-txt' : actionHistory.ACTION != 'Pending' && actionHistory.ACTION != 'Rejected' && actionHistory.ACTION != 'Submitted' && actionHistory.ACTION != 'Submit'}" + class=""> {{actionHistory.ACTION}} {{actionHistory.NAME}} @@ -342,6 +342,9 @@ + + + diff --git a/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.scss b/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.scss index a1d96baf..db039aed 100644 --- a/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.scss +++ b/Mohem/src/app/notification/worklist-main-pr/worklist-main-pr.component.scss @@ -1,306 +1,8 @@ -// .colorBG{ -// --background: #f0efef; -// } -// .footerSearchBtn{ -// padding: 0px !important; -// background: #f0efef !important; -// } - -// .actionList{ -// // position: fixed; -// // bottom: 0px; -// width: 215px; -// border-top-left-radius: 7px; -// border-top-right-radius: 7px -// } -// .cardContent{ -// width:100%; -// margin-top: 33px -// } -// .colItemReq{ -// color: var(--dark); -// font-weight: bold; -// font-size: 15px; -// text-align: left; - -// } - -// .colItemReqHeader{ -// text-align: left; -// color: var(--primary); -// font-weight: bold; -// } -// .labelTotal{ -// color: var(--danger); -// font-weight: bold; -// font-size: 17px; - - -// } -// .labelAction{ -// color:var(--customnavy) !important; -// font-weight:bold; -// } - -// .segmentPR{ - -// // --background-hover: rgba(var(--ion-color-contrast-rgb),0.04); -// // --background-activated: var(--danger); -// // --color: rgba(--primary); -// --color-checked: var(--dark); -// --indicator-color-checked: var(--secondary); -// --background: #f0efef; -// --background-activated: #f0efef; -// --background-hover:#f0efef; -// --background-activated:#f0efef; -// --background-checked:#f0efef; - - - -// } - -// .ion-modal#ion-overlay-1 { -// width: 90%; -// height: 50%; -// top: 20%; -// left: 5%; -// right: 5%; -// bottom: 5%; -// border: solid 1px red; - -// } - -// // .swiper-pagination.swiper-pagination-bullets{ -// // top: 6px; -// // bottom: inherit; -// // } - - - -// // .swiper-pagination.swiper-pagination-bullets { -// // top: 6px !important; -// // bottom: 0px !important; -// // } - -// // .swiper-pagination { -// // top: 6px; -// // } - - -// .bar-stable { -// background-color: var(--cusgray) !important; -// } -// .tabs{ -// background-color: var(--cusgray) !important; -// } -// .icon-size-lg { -// font-size: 40px; -// } - -// /*Timeline*/ - -// .pos-absolute-right { -// position: absolute; -// right: 8px; -// } - -// .timeline { -// position: relative; -// margin: 15px 0 0 0; -// } - -// .timeline:before { - -// content: ''; -// position: absolute; -// top: 0; -// bottom: 0; -// width: 4px; -// background: #e4e4e4; -// z-index: 1; -// left: 66px; -// /* margin-left: -10px; */ -// /* z-index: 1; */ -// } - -// .timeline .timeline-thumb { - -// border-radius: 500px; -// width: 40px !important; -// z-index: 2; -// position: absolute; -// left: 48px; -// // :root[dir="ltr"]{ -// // left: 37px; -// // } -// // :root[dir="rtl"]{ -// // right: 37px; -// // } -// float: right; -// top: 9px; -// } - -// .timeline .timeline-thumb.timeline-icon { -// height: 40px; -// // text-align: center; -// // color: white; -// // border: 5px solid #CBD0D3; -// // transform: scale(0.2); -// } - - - -// .timeline .timeline-item { -// width: 50px; - -// } - -// .timeline .timeline-stats { -// position: relative; -// font-size: 12px; -// color: var(--darkgray); - -// } - - -// .divider-title { -// background: #e4e4e4; -// padding: 5px 15px; -// } - - -// .color-red { -// color: var(--danger) !important; -// } - -// .bg-color-dot { - -// background: var(--gray); - -// /* background: linear-gradient(45deg, var(--primary) 0%, #19a163 36%, var(--secondary) 59%, var(--customnavy) 100%); */ -// // border: var(--secondary) solid 1px; -// // background-color: #ff3b30 !important; -// // background: var(--primary); -// //background: -moz-linear-gradient(45deg, var(--primary) 0%, var(--secondary) 36%,var(--secondary) 59%, var(--customnavy) 100%); -// //background: -webkit-linear-gradient(45deg, var(--primary) 0%, var(--secondary) 36%,var(--secondary) 59%, var(--customnavy) 100%); -// //background: linear-gradient(45deg, var(--primary) 0%, var(--secondary) 36%,var(--secondary) 59%, var(--customnavy) 100%); - - -// } - -// .bg-blue-dot { - -// border: var(--blue) solid 1px; -// background: var(--gray); - -// } -// .bg-orange-dot { - -// border: var(--orange) solid 1px; -// background: var(--gray); -// } -// .bg-red-dot { - -// border: var(--red) solid 1px; -// background: var(--gray); - -// } -// .bg-green-dot { - -// border: var(--green) solid 1px; -// background: var(--gray); -// } - - -// .bg-blue-txt { - -// color: var(--blue) !important; -// font-weight:bold; - -// } -// .bg-orange-txt { -// font-weight:bold; - -// color: var(--orange) !important; -// } -// .bg-red-txt { -// font-weight:bold; - -// color: var(--red) !important; - - -// } -// .bg-green-txt { -// font-weight:bold; - -// color: var(--green) !important; -// } - - - - - -// .notification-list{ -// ion-item{ -// // margin-top: 5px; -// // margin-bottom: 5px; - -// background-color: transparent; -// .item-date{ -// width: 55px; -// font-size: 14px; -// font-weight: bold; - -// text-align: center; -// padding: 0; -// margin: 0; - -// position: absolute; -// left: 0; -// top: 0; -// } -// ion-label , [item-end]{ - -// white-space: normal; -// font-size: 14px; -// // :root[dir="ltr"]{ -// // margin-left: 10px; -// // } -// // :root[dir="rtl"]{ -// // margin-right: 10px; -// // } - -// } - -// } -// } -// .input-wrapper { -// --flex:none; -// } -// ion-input ,ion-datetime{ -// border-bottom: #dedede 1px solid; -// } -// .left { -// .timeline:before{ -// left: 66px; -// } -// .notification-list ion-item{ -// padding-left: 3px; -// } -// .timeline-thumb{ -// left: 37px; -// } -// } -// .right { -// .timeline:before{ -// right: 62px; -// } -// .notification-list ion-item{ -// padding-right: 3px; -// } -// .timeline-thumb{ -// right: 37px; -// } -// } - - +.itemHISBtn{ + padding: 5px; + color: var(--light); + background: var(--darkgray); + border-radius: 3px; + width: 85%; + height: 40px; +} \ No newline at end of file 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 884f5521..4c7f8fd1 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 @@ -804,6 +804,79 @@ export class WorklistMainPRComponent implements OnInit { } + + loadMoreNotificationBody() { + console.log("loadMoreNotificationBody PR"); + if (!this.IsReachEnd) { + console.log("this.IsReachEnd"+ this.IsReachEnd); + + this.WorkListBodyObj.P_PAGE_NUM = this.P_PAGE_NUM; + this.worklistMainService.getPRNotificationBody(this.WorkListBodyObj). + subscribe((result: any) => { + if (this.common.validResponse(result)) { + if (result.GetPrNotificationBodyList != undefined) { + this.P_PAGE_NUM++; + (result.GetPrNotificationBodyList).forEach(element => { + if (element.ROW_NUM == element.NO_OF_ROWS) { + this.IsReachEnd = true; + } else { + this.IsReachEnd = false; + } + this.notificationBodyRes.push(element); + }, (Error) => console.log(Error), () => + //infiniteScroll.target.complete() + console.log("test") + ); + }// if list length >0 + else { + this.IsReachEnd = true; + } + }// if response == 1 + //this.pageNum++; + // infiniteScroll.target.complete(); + + }); + } else { + // if (infiniteScroll) + // infiniteScroll.target.complete(); + } + }//end infiniteScroll + loadMoreActionHistory() { + console.log("doInfinite action history MR"); + + if (!this.IsReachEnd) { + this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM; + this.worklistService.getActionHistory(this.WorkListActionHistoryObj). + subscribe((result: any) => { + if (this.common.validResponse(result)) { + if (result.GetActionHistoryList != undefined) { + this.P_PAGE_NUM++; + (result.GetActionHistoryList).forEach(element => { + if (element.ROW_NUM == element.NO_OF_ROWS) { + this.IsReachEnd = true; + } else { + this.IsReachEnd = false; + } + this.actionHistoryRes.push(element); + }, (Error) => console.log(Error), () => + //infiniteScroll.target.complete() + console.log("TEST")); + }// if list length >0 + else { + this.IsReachEnd = true; + } + }// if response == 1 + //this.pageNum++; + // infiniteScroll.target.complete(); + + }); + } else { + //if (infiniteScroll) + //infiniteScroll.target.complete(); + } + }//end infiniteScroll + + } diff --git a/Mohem/src/app/payslip/home/home.component.html b/Mohem/src/app/payslip/home/home.component.html index b6e25a7a..c06b7c72 100644 --- a/Mohem/src/app/payslip/home/home.component.html +++ b/Mohem/src/app/payslip/home/home.component.html @@ -26,7 +26,7 @@ PERIOD END DATE{{showPaySlip.PERIOD_END_DATE}} --> - +
@@ -242,7 +242,10 @@ - + + @@ -288,6 +291,10 @@ + + @@ -365,7 +372,7 @@ - +