fix infiniteScroll payslip

master
ashwaq 6 years ago
parent 8a4ab39623
commit bdab18c114

@ -182,7 +182,7 @@ getEarings(ActionContextID){
P_PAGE_NUM:1, P_PAGE_NUM:1,
P_PAGE_LIMIT:100 P_PAGE_LIMIT:100
} }
this.doinfinitEarReq=request;
this.payslipService.getEarings(request, ()=> {} , this.ts.trPK('general', 'retry')).subscribe((result)=> this.payslipService.getEarings(request, ()=> {} , this.ts.trPK('general', 'retry')).subscribe((result)=>
{ {
this.handleGetEaringsResult(result); this.handleGetEaringsResult(result);
@ -209,7 +209,7 @@ getDeduction(ActionContextID){
// this.deductionReq.P_ACTION_CONTEXT_ID=ActionContextID; // this.deductionReq.P_ACTION_CONTEXT_ID=ActionContextID;
// this.deductionReq.P_PAGE_NUM=1; // this.deductionReq.P_PAGE_NUM=1;
// this.deductionReq.P_PAGE_LIMIT=100; // this.deductionReq.P_PAGE_LIMIT=100;
this.doinfiniteDedReq=request;
this.payslipService.getDeduction(request, ()=> {} , this.ts.trPK('general', 'retry')).subscribe((result)=> this.payslipService.getDeduction(request, ()=> {} , this.ts.trPK('general', 'retry')).subscribe((result)=>
{ {
@ -229,10 +229,10 @@ getDeduction(ActionContextID){
//this.pageNum= this.pageNum + 1; //this.pageNum= this.pageNum + 1;
if (!this.IsReachEnd) { if (!this.IsReachEnd) {
this.payslipService.getDeduction(this.doinfiniteReq).subscribe( this.payslipService.getDeduction(this.doinfiniteDedReq).subscribe(
(result: any) => { (result: any) => {
if (this.common.validResponse(result)) { if (this.common.validResponse(result)) {
this.doinfiniteReq.P_PAGE_NUM++; this.doinfiniteDedReq.P_PAGE_NUM++;
if (this.common.hasData(result.GetDeductionsList)) { if (this.common.hasData(result.GetDeductionsList)) {
result.GetDeductionsList.forEach(element => { result.GetDeductionsList.forEach(element => {
if (element.ROW_NUM == element.NO_OF_ROWS) { if (element.ROW_NUM == element.NO_OF_ROWS) {
@ -261,10 +261,10 @@ getDeduction(ActionContextID){
//this.pageNum= this.pageNum + 1; //this.pageNum= this.pageNum + 1;
if (!this.IsReachEnd) { if (!this.IsReachEnd) {
this.payslipService.getEarings(this.deductionReq).subscribe( this.payslipService.getEarings(this.doinfinitEarReq).subscribe(
(result: any) => { (result: any) => {
if (this.common.validResponse(result)) { if (this.common.validResponse(result)) {
this.deductionReq.P_PAGE_NUM++; this.doinfinitEarReq.P_PAGE_NUM++;
if (this.common.hasData(result.GetEarningsList)) { if (this.common.hasData(result.GetEarningsList)) {
result.GetEarningsList.forEach(element => { result.GetEarningsList.forEach(element => {
if (element.ROW_NUM == element.NO_OF_ROWS) { if (element.ROW_NUM == element.NO_OF_ROWS) {

Loading…
Cancel
Save