add infinite Scroll

Dashbored
ashwaq 6 years ago
parent ee7ac90c18
commit 53746fc95f

@ -37,8 +37,8 @@
<!-- <label for="">{{ts.trPK('worklistMain','description')}}
</label> -->
<!-- </ion-col>
<ion-col> -->
<label for="">{{i+1}}. {{itemHistory.OU_NAME}} </label>
<ion-col> {{itemHistory.OU_NAME}}-->
<label for="">{{i+1}}. </label>
</ion-col>
</ion-row>
<ion-row>

@ -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) {

@ -6,7 +6,7 @@
</ion-buttons>
</ion-toolbar>
<ion-toolbar>
<ion-toolbar class="slideToolBar">
<ion-segment class="segmentPR" scrollable>
<ion-segment-button value="0" checked>
<!-- <ion-icon name="call">arrowRight</ion-icon> -->
@ -34,152 +34,151 @@
<ion-content class="colorBG">
<ion-slides pager="true" class="slides-gray-bullets">
<ion-slide class="slide-1">
<div *ngIf="pInformation && pInformation != '' " class="tipsPadding">{{pInformation}}</div>
<ion-slide class="slide-1">
<div *ngIf="pInformation && pInformation != '' " class="tipsPadding">{{pInformation}}</div>
<ion-card class="cardContent">
<!-- <ion-card-header class="boxHdr">
<ion-card class="cardContent">
<!-- <ion-card-header class="boxHdr">
<div class="hrTitle"> {{ts.trPK('worklistMain','info')}} </div>
</ion-card-header> -->
<ion-card-content>
<ion-grid style="text-align: left">
<ion-row>
<ion-col>
<label class="colItemReq" for=""> {{ts.trPK('worklistMain','from')}}
</label>
<br />
<!-- </ion-col>
<ion-col> -->
<label for="">{{getPassNotificationDetails.FROM_USER}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','to')}}
</label>
<br />
<ion-card-content>
<ion-grid style="text-align: left">
<ion-row>
<ion-col>
<label class="colItemReq" for=""> {{ts.trPK('worklistMain','from')}}
<!-- </ion-col>
</label>
<br />
<!-- </ion-col>
<ion-col> -->
<label for=""> {{getPassNotificationDetails.TO_USER}}</label>
</ion-col>
</ion-row>
<label for="">{{getPassNotificationDetails.FROM_USER}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','sent')}}
</label>
<br />
<ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','to')}}
</label>
<br />
<!-- </ion-col>
<ion-col> -->
<label for="">{{getPassNotificationDetails.BEGIN_DATE}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','closed')}}
</label>
<br />
<!-- </ion-col>
<!-- </ion-col>
<ion-col> -->
<label for="">{{getPassNotificationDetails.END_DATE}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','id')}}
</label>
<br />
<!-- </ion-col>
<ion-col> -->
<label for="">{{getPassNotificationDetails.NOTIFICATION_ID}}</label>
</ion-col>
</ion-row>
<ion-row *ngIf=" getPassNotificationDetails.RESPONDER != '' ">
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','responder')}}
</label>
<br />
<!-- </ion-col>
<ion-col> -->
<label for="">{{getPassNotificationDetails.RESPONDER}} </label>
</ion-col>
</ion-row>
<label for=""> {{getPassNotificationDetails.TO_USER}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','subject')}} </label>
<br />
<ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','sent')}}
</label>
<br />
<!-- </ion-col>
<!-- </ion-col>
<ion-col> -->
<label for="">{{getPassNotificationDetails.SUBJECT}} </label>
</ion-col>
</ion-row>
<label for="">{{getPassNotificationDetails.BEGIN_DATE}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','closed')}}
</label>
<br />
<!-- notificationBodyRes -->
<!-- </ion-col>
<ion-col> -->
<label for="">{{getPassNotificationDetails.END_DATE}}</label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','id')}}
</label>
<br />
<div *ngFor="let header of PRHeader">
<!-- </ion-col>
<ion-col> -->
<label for="">{{getPassNotificationDetails.NOTIFICATION_ID}}</label>
</ion-col>
</ion-row>
<ion-row *ngIf=" getPassNotificationDetails.RESPONDER != '' ">
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','responder')}}
</label>
<br />
<ion-row
*ngIf="header.HDR_ATTRIBUTE_NAME != 'Requisition Total' && header.HDR_ATTRIBUTE_NAME != 'Non-Recoverable Tax'">
<!-- *ngIf="header.HDR_ATTRIBUTE_NAME != 'Requisition Total' && header.HDR_ATTRIBUTE_NAME != 'Non-Recoverable Tax'"> -->
<!-- </ion-col>
<ion-col> -->
<label for="">{{getPassNotificationDetails.RESPONDER}} </label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<label class="colItemReq" for="">{{header.HDR_ATTRIBUTE_NAME}} </label>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','subject')}} </label>
<br />
<label for="">{{header.HDR_ATTRIBUTE_VALUE}} </label>
<!-- </ion-col>
<ion-col> -->
<label for="">{{getPassNotificationDetails.SUBJECT}} </label>
</ion-col>
</ion-row>
</div>
<br />
<!-- notificationBodyRes -->
<div *ngFor="let header of PRHeader">
<ion-row
*ngIf="header.HDR_ATTRIBUTE_NAME != 'Requisition Total' && header.HDR_ATTRIBUTE_NAME != 'Non-Recoverable Tax'">
<!-- *ngIf="header.HDR_ATTRIBUTE_NAME != 'Requisition Total' && header.HDR_ATTRIBUTE_NAME != 'Non-Recoverable Tax'"> -->
<ion-grid>
<div>
<ion-row style="text-align: center !important">
<ion-col *ngIf="totalH">
<div class="colItemReq" style="text-align: center !important">{{totalH}}</div>
<div class="labelTotal">{{valueH}}</div>
</ion-col>
<ion-col *ngIf="taxH ">
<div class="colItemReq" style="text-align: center !important">{{taxH}}</div>
<div class="labelTotal">{{taxvalueH}}</div>
<ion-col>
<label class="colItemReq" for="">{{header.HDR_ATTRIBUTE_NAME}} </label>
<br />
<label for="">{{header.HDR_ATTRIBUTE_VALUE}} </label>
</ion-col>
</ion-row>
</div>
</ion-grid>
<br />
<ion-grid>
<div>
<ion-row style="text-align: center !important">
<ion-col *ngIf="totalH">
<div class="colItemReq" style="text-align: center !important">{{totalH}}</div>
<div class="labelTotal">{{valueH}}</div>
</ion-col>
<ion-col *ngIf="taxH ">
<div class="colItemReq" style="text-align: center !important">{{taxH}}</div>
<div class="labelTotal">{{taxvalueH}}</div>
</ion-grid>
</ion-col>
</ion-row>
</ion-card-content>
</div>
</ion-grid>
<ion-card-content>
<div>
<div id="notificationDynamicFields1">
</div>
</ion-grid>
<button ion-button [hidden]="IsReachEnd" class="itemHISBtn" (click)="loadMoreNotificationBody()">Load More</button>
</div>
<!-- <ion-item *ngIf="notificationButtonRes?.length >0" class="requiredItem">
</ion-card-content>
<ion-card-content>
<div>
<div id="notificationDynamicFields1">
</div>
</div>
<!-- <ion-item *ngIf="notificationButtonRes?.length >0" class="requiredItem">
<ion-label class="boldTxtNav">{{'actionHis, action' | translate}} </ion-label>
<ion-select okText="{{ts.trPK('general','ok')}}" cancelText="{{ts.trPK('general','cancel')}}"
[(ngModel)]="actionType" required>
@ -188,121 +187,122 @@
{{notificationButtons.BUTTON_LABEL}}</ion-select-option>
</ion-select>
</ion-item> -->
</ion-card-content>
</ion-card>
</ion-card-content>
</ion-card>
</ion-slide>
<ion-slide>
<!-- <ion-card class="cardContent">
<!-- <ion-card class="cardContent">
<ion-card-header class="boxHdr">
<div class="hrTitle"> {{ts.trPK('worklistMain','info')}} </div>
</ion-card-header>
<ion-card-content> -->
<div [hidden]="notificationBodyRes && notificationBodyRes.length > 0">
<p>{{ 'general, empty' | translate}}</p>
</div>
<ion-list class="itemReqList" *ngIf="notificationBodyRes && notificationBodyRes.length > 0 ">
<div [hidden]="notificationBodyRes && notificationBodyRes.length > 0">
<p>{{ 'general, empty' | translate}}</p>
</div>
<ion-list class="itemReqList" *ngIf="notificationBodyRes && notificationBodyRes.length > 0 ">
<div>
<ion-grid class="gridItemReq">
<ion-item class="itemReqContent" *ngFor="let notificationList of notificationBodyRes; let i=index; " >
<div class="itemReqDiv">
<ion-item class="itemReqContent" *ngFor="let notificationList of notificationBodyRes; let i=index; ">
<div class="itemReqDiv">
<ion-row>
<ion-col class="colItemReqHeader">
<!-- <label for="">{{ts.trPK('worklistMain','description')}}
<ion-row>
<ion-col class="colItemReqHeader">
<!-- <label for="">{{ts.trPK('worklistMain','description')}}
</label> -->
<!-- </ion-col>
<!-- </ion-col>
<ion-col> -->
<label for="">{{i+1}}. {{notificationList.DESCRIPTION}} </label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','code')}}
</label>
<br />
<!-- </ion-col>
<label for="">{{i+1}}. {{notificationList.DESCRIPTION}} </label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','code')}}
</label>
<br />
<!-- </ion-col>
<ion-col> -->
<ion-label class="labelValue" for="">{{notificationList.ITEM_CODE}} </ion-label>
</ion-col>
<!-- </ion-row>
<ion-label class="labelValue" for="">{{notificationList.ITEM_CODE}} </ion-label>
</ion-col>
<!-- </ion-row>
<ion-row> -->
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','unit')}} </label>
<br />
<!-- </ion-col>
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','unit')}} </label>
<br />
<!-- </ion-col>
<ion-col> -->
<ion-label class="labelValue" for="">{{notificationList.UOM}} </ion-label>
</ion-col>
</ion-row>
<ion-row>
<ion-label class="labelValue" for="">{{notificationList.UOM}} </ion-label>
</ion-col>
</ion-row>
<ion-row>
<!-- </ion-row>
<!-- </ion-row>
<ion-row> -->
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','quantity')}} </label>
<br />
<!-- </ion-col>
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','quantity')}} </label>
<br />
<!-- </ion-col>
<ion-col> -->
<ion-label class="labelValue" for="">{{notificationList.QUANTITY}} </ion-label>
<ion-label class="labelValue" for="">{{notificationList.QUANTITY}} </ion-label>
</ion-col>
<ion-col class="colItems">
</ion-col>
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','Date_Req')}} </label>
<br />
<!-- </ion-col>
<ion-col> -->
<ion-label class="labelValue" for="">{{notificationList.DATE_REQUIRED}} </ion-label>
</ion-col>
</ion-row>
<ion-row>
</ion-row>
<ion-row>
<!-- </ion-row>
<!-- </ion-row>
<ion-row> -->
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','line_status')}} </label>
<br />
<!-- </ion-col>
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','line_status')}} </label>
<br />
<!-- </ion-col>
<ion-col> -->
<ion-label class="labelValue" for="">{{notificationList.LINE_STATUS}} </ion-label>
</ion-col>
<ion-label class="labelValue" for="">{{notificationList.LINE_STATUS}} </ion-label>
</ion-col>
<ion-col class="colItems">
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','date_status')}} </label>
<br />
<!-- </ion-col>
<br />
<!-- </ion-col>
<ion-col> -->
<ion-label class="labelValue" for="">{{notificationList.STATUS_DATE}} </ion-label>
</ion-col>
<ion-label class="labelValue" for="">{{notificationList.STATUS_DATE}} </ion-label>
</ion-col>
</ion-row>
</ion-row>
<ion-row>
<ion-row>
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','trans_type')}} </label>
<br />
<!-- </ion-col>
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','trans_type')}} </label>
<br />
<!-- </ion-col>
<ion-col> -->
<ion-label class="labelValue" for="">{{notificationList.TRANSACTION_TYPE_NAME}} </ion-label>
</ion-col>
<ion-label class="labelValue" for="">{{notificationList.TRANSACTION_TYPE_NAME}} </ion-label>
</ion-col>
<ion-col class="colItems">
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','operating_unit')}} </label>
<br />
<!-- </ion-col>
@ -310,14 +310,14 @@
<ion-label class="labelValue" for="">{{notificationList.OPERATING_UNIT}} </ion-label>
</ion-col>
</ion-row>
<ion-row>
</ion-row>
<ion-row>
<ion-col class="colItems">
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','organization_code')}} </label>
<br />
<!-- </ion-col>
@ -326,20 +326,20 @@
</ion-col>
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','organization')}} </label>
<br />
<!-- </ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','organization')}} </label>
<br />
<!-- </ion-col>
<ion-col> -->
<ion-label class="labelValue" for="">{{notificationList.ORGANIZATION_NAME}} </ion-label>
</ion-col>
</ion-row>
<ion-row>
<ion-label class="labelValue" for="">{{notificationList.ORGANIZATION_NAME}} </ion-label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colItems">
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','from_subinventory')}} </label>
<br />
<!-- </ion-col>
@ -348,22 +348,22 @@
</ion-col>
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','from_locator')}} </label>
<br />
<!-- </ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','from_locator')}} </label>
<br />
<!-- </ion-col>
<ion-col> -->
<ion-label class="labelValue" for="">{{notificationList.FROM_LOCATOR}} </ion-label>
</ion-col>
<ion-label class="labelValue" for="">{{notificationList.FROM_LOCATOR}} </ion-label>
</ion-col>
</ion-row>
<ion-row>
</ion-row>
<ion-row>
<ion-col class="colItems">
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','to_subinventory')}} </label>
<br />
<!-- </ion-col>
@ -372,22 +372,22 @@
</ion-col>
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','to_locator')}} </label>
<br />
<!-- </ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','to_locator')}} </label>
<br />
<!-- </ion-col>
<ion-col> -->
<ion-label class="labelValue" for="">{{notificationList.TO_LOCATOR}} </ion-label>
</ion-col>
<ion-label class="labelValue" for="">{{notificationList.TO_LOCATOR}} </ion-label>
</ion-col>
</ion-row>
<ion-row>
</ion-row>
<ion-row>
<ion-col class="colItems">
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','ShipToLocation')}} </label>
<br />
<!-- </ion-col>
@ -395,131 +395,149 @@
<ion-label class="labelValue" for="">{{notificationList.SHIP_TO_LOCATION}} </ion-label>
</ion-col>
</ion-row>
</ion-row>
</div>
</ion-item>
</div>
</ion-item>
</ion-grid>
</div>
</ion-list>
</ion-list>
<!-- </ion-card-content>
</ion-card> -->
<!-- <ion-infinite-scroll (ionInfinite)="doInfiniteNotificationBody($event)">
<ion-infinite-scroll-content></ion-infinite-scroll-content>
</ion-infinite-scroll> -->
</ion-slide>
<ion-slide>
<ion-card class="cardContent">
<ion-card-content>
<div [hidden]="actionHistoryRes && actionHistoryRes.length > 0">
<p>{{ 'general, empty' | translate}}</p>
</div>
<div *ngIf="actionHistoryRes && actionHistoryRes.length > 0 ">
<ion-list class="notification-list ">
<div class="timeline">
<ion-item *ngFor="let actionHistory of actionHistoryRes">
<ion-card class="cardContent">
<ion-card-content>
<div class="timeline-item" slot="start">
<!-- <div class="item-date"> {{notificationList.BEGIN_DATE }} </div> -->
<!-- [hidden]="actionHistory.NOTE == '' || actionHistory.NOTE == null"> -->
<div [hidden]="actionHistoryRes && actionHistoryRes.length > 0">
<p>{{ 'general, empty' | translate}}</p>
</div>
<div *ngIf="actionHistoryRes && actionHistoryRes.length > 0 ">
<ion-list class="notification-list ">
<div class="timeline">
<ion-item *ngFor="let actionHistory of actionHistoryRes">
<div>
<div class="timeline-item" slot="start">
<!-- <div class="item-date"> {{notificationList.BEGIN_DATE }} </div> -->
<!-- [hidden]="actionHistory.NOTE == '' || actionHistory.NOTE == null"> -->
<button ion-button (click)="openNoteDetail(actionHistory.NOTE ,actionHistory.NAME)"
[hidden]="actionHistory.NOTE == '' || actionHistory.NOTE == null"
style=" background: none;width: 60%;">
<div>
<img src="../assets/imgs/noteSmall.png">
<button ion-button (click)="openNoteDetail(actionHistory.NOTE ,actionHistory.NAME)"
[hidden]="actionHistory.NOTE == '' || actionHistory.NOTE == null"
style=" background: none;width: 60%;">
<!-- <ion-icon name="bookmark"></ion-icon> -->
</button>
</div>
<!-- [ngClass]="{'bg-blue-dot' : actionHistory.ACTION === 'Submitted' ,'statusGreanColor' :appointmentsArrive.Status != 1 && appointmentsArrive.Status != 2, 'statusRedColor' :appointmentsArrive.Status === 2}" -->
<img src="../assets/imgs/noteSmall.png">
<div
<!-- <ion-icon name="bookmark"></ion-icon> -->
</button>
</div>
<!-- [ngClass]="{'bg-blue-dot' : actionHistory.ACTION === 'Submitted' ,'statusGreanColor' :appointmentsArrive.Status != 1 && appointmentsArrive.Status != 2, 'statusRedColor' :appointmentsArrive.Status === 2}" -->
[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">
<div
[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">
</div>
</div>
</div>
<ion-col>
<ion-label
[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}}</ion-label>
<ion-label> {{actionHistory.NAME}}
</ion-label>
<ion-col>
<ion-label
[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}}</ion-label>
<ion-label> {{actionHistory.NAME}}
</ion-label>
<ion-label> {{actionHistory.NOTIFICATION_DATE| dateString }} </ion-label>
</ion-col>
</ion-item>
</div>
</ion-list>
</div>
<ion-label> {{actionHistory.NOTIFICATION_DATE| dateString }} </ion-label>
</ion-col>
</ion-item>
</div>
</ion-list>
</div>
</ion-card-content>
</ion-card>
<button ion-button [hidden]="IsReachEnd" class="itemHISBtn" (click)="loadMoreActionHistory()">Load More</button>
</ion-card-content>
</ion-card>
</ion-slide>
<ion-slide>
<ion-card class="cardContent">
<ion-card-content>
<div [hidden]="attachmentRes && attachmentRes.length > 0">
<p>{{ 'general, notAttch' | translate}}</p>
</div>
<div *ngIf="attachmentRes && attachmentRes.length > 0 ">
<!-- <ion-card>
<ion-card class="cardContent">
<ion-card-content>
<div [hidden]="attachmentRes && attachmentRes.length > 0">
<p>{{ 'general, notAttch' | translate}}</p>
</div>
<div *ngIf="attachmentRes && attachmentRes.length > 0 ">
<!-- <ion-card>
<ion-card-header class="boxHdr">
<div class="hrTitle">{{'worklistMain, suppDoc' | translate}}</div>
</ion-card-header>
<ion-card-content>
-->
<ion-grid>
<div *ngFor="let attachList of attachmentRes">
<ion-row (click)="OpenAttachFiles(attachList.FILE_DATA,attachList.FILE_CONTENT_TYPE)">
<ion-col col-12>
<div *ngIf="attachList.FILE_CONTENT_TYPE === 'pdf' || attachList.FILE_CONTENT_TYPE === 'PDF'">
<img float-start class="attachImg" src="../assets/imgs/pdf.png">
</div>
<div *ngIf="attachList.FILE_CONTENT_TYPE === 'txt'"> <img float-start class="attachImg"
src="../assets/imgs/doc.png">
</div>
<div
*ngIf="attachList.FILE_CONTENT_TYPE != 'txt' && attachList.FILE_CONTENT_TYPE != 'PDF' && attachList.FILE_CONTENT_TYPE != 'pdf' && attachList.FILE_CONTENT_TYPE != 'png' && attachList.FILE_CONTENT_TYPE != 'jpeg' && attachList.FILE_CONTENT_TYPE != 'jpg' && attachList.FILE_CONTENT_TYPE != 'PNG' && attachList.FILE_CONTENT_TYPE != 'JPEG' && attachList.FILE_CONTENT_TYPE != 'JPG'">
<img float-start class="attachImg" src="../assets/imgs/nonfile.png">
</div>
<div
*ngIf="attachList.FILE_CONTENT_TYPE === 'png' || attachList.FILE_CONTENT_TYPE === 'jpeg' || attachList.FILE_CONTENT_TYPE === 'jpg'|| attachList.FILE_CONTENT_TYPE === 'PNG' || attachList.FILE_CONTENT_TYPE === 'JPEG'|| attachList.FILE_CONTENT_TYPE === 'JPG'">
<img float-start class="attachImg" src="../assets/imgs/img.png">
</div>
<ion-label>
{{attachList.SEQ_NUM }}. {{attachList.FILE_NAME}} </ion-label>
</ion-col>
<!-- <ion-col col-2>
<ion-grid>
<div *ngFor="let attachList of attachmentRes">
<ion-row (click)="OpenAttachFiles(attachList.FILE_DATA,attachList.FILE_CONTENT_TYPE)">
<ion-col col-12>
<div *ngIf="attachList.FILE_CONTENT_TYPE === 'pdf' || attachList.FILE_CONTENT_TYPE === 'PDF'">
<img float-start class="attachImg" src="../assets/imgs/pdf.png">
</div>
<div *ngIf="attachList.FILE_CONTENT_TYPE === 'txt'"> <img float-start class="attachImg"
src="../assets/imgs/doc.png">
</div>
<div
*ngIf="attachList.FILE_CONTENT_TYPE != 'txt' && attachList.FILE_CONTENT_TYPE != 'PDF' && attachList.FILE_CONTENT_TYPE != 'pdf' && attachList.FILE_CONTENT_TYPE != 'png' && attachList.FILE_CONTENT_TYPE != 'jpeg' && attachList.FILE_CONTENT_TYPE != 'jpg' && attachList.FILE_CONTENT_TYPE != 'PNG' && attachList.FILE_CONTENT_TYPE != 'JPEG' && attachList.FILE_CONTENT_TYPE != 'JPG'">
<img float-start class="attachImg" src="../assets/imgs/nonfile.png">
</div>
<div
*ngIf="attachList.FILE_CONTENT_TYPE === 'png' || attachList.FILE_CONTENT_TYPE === 'jpeg' || attachList.FILE_CONTENT_TYPE === 'jpg'|| attachList.FILE_CONTENT_TYPE === 'PNG' || attachList.FILE_CONTENT_TYPE === 'JPEG'|| attachList.FILE_CONTENT_TYPE === 'JPG'">
<img float-start class="attachImg" src="../assets/imgs/img.png">
</div>
<ion-label>
{{attachList.SEQ_NUM }}. {{attachList.FILE_NAME}} </ion-label>
</ion-col>
<!-- <ion-col col-2>
<button float-end class="attachImgBtn"
(click)="OpenAttachFiles(attachList.FILE_DATA,attachList.FILE_CONTENT_TYPE)">
<img class="attachImg" src="../assets/imgs/view.png">
</button>
</ion-col> -->
</ion-row>
</div>
</ion-row>
</div>
</ion-grid>
<!-- </ion-card-content>
</ion-grid>
<!-- </ion-card-content>
</ion-card> -->
</div>
</ion-card-content>
</ion-card>
</ion-slide>
</div>
</ion-card-content>
</ion-card>
</ion-slide>
</ion-slides>
<!-- <div id="notificationDynamicFields">
</div> -->
</ion-content>
<ion-footer class="footerSearchBtn">

@ -0,0 +1,8 @@
.itemHISBtn{
padding: 5px;
color: var(--light);
background: var(--darkgray);
border-radius: 3px;
width: 85%;
height: 40px;
}

@ -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
}

@ -6,13 +6,13 @@
</ion-buttons>
</ion-toolbar>
<ion-toolbar>
<ion-toolbar class="slideToolBar">
<ion-segment class="segmentPR" scrollable>
<ion-segment-button value="0" checked>
<ion-label> {{ts.trPK('worklistMain','info')}}</ion-label>
</ion-segment-button>
<ion-segment-button value="1">
<ion-label> {{ts.trPK('worklistMain','itemReq')}}</ion-label>
<ion-label> {{ts.trPK('worklistMain','line_details')}}</ion-label>
</ion-segment-button>
<ion-segment-button value="2">
<ion-label>
@ -42,13 +42,13 @@
<ion-grid style="text-align: left">
<ion-row>
<ion-col>
<label class="colItemReq" for=""> {{ts.trPK('worklistMain','description')}}
<label class="colItemReq" for=""> {{ts.trPK('worklistMain','description')}}
</label>
<br />
<label for=""> {{ts.trPK('worklistMain','des-PO')}} {{PO_NUMBER}} </label>
</ion-col>
<label for=""> {{ts.trPK('worklistMain','des-PO')}} {{PO_NUMBER}} </label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
@ -56,7 +56,7 @@
</label>
<br />
<label for="">{{getPassNotificationDetails.FROM_USER}}</label>
</ion-col>
</ion-row>
@ -77,7 +77,7 @@
</label>
<br />
<label for="">{{getPassNotificationDetails.BEGIN_DATE}}</label>
</ion-col>
</ion-row>
@ -114,7 +114,7 @@
<label class="colItemReq" for="">{{ts.trPK('worklistMain','subject')}} </label>
<br />
<label for="">{{getPassNotificationDetails.SUBJECT}} </label>
</ion-col>
</ion-row>
@ -122,145 +122,150 @@
<div *ngFor="let header of POHeader">
<ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','Supplier')}} </label>
<br />
<label for="">{{header.VENDOR_NAME}} </label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','Site')}} </label>
<br />
<label for="">{{header.VENDOR_SITE_CODE}} </label>
</ion-col>
</ion-row>
</ion-row>
<ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','Site')}} </label>
<br />
<label for="">{{header.VENDOR_SITE_CODE}} </label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','Buyer')}} </label>
<br />
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','Buyer')}} </label>
<br />
<label for="">{{header.BUYER}} </label>
</ion-col>
<label for="">{{header.BUYER}} </label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','Preparer')}} </label>
<br />
<label for="">{{header.PREPARER}} </label>
</ion-col>
</ion-row>
</ion-row>
<ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','CreationDate')}}</label>
<br />
<label for="">{{header.CREATION_DATE}} </label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','ShipToLocation')}} </label>
<br />
<label for="">{{header.SHIP_TO_LOCATION_NAME}} </label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','QuotationNumber')}} </label>
<br />
<label for="">{{header.QUOTATION_NUMBER}} </label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','QuotationDate')}} </label>
<br />
<label for="">{{header.QUOTATION_DATE}} </label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','PaymentTerms')}} </label>
<br />
<label for="">{{header.PAYMENT_TERMS}} </label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','Currency')}} </label>
<br />
<label for="">{{header.CURRENCY_NAME}} - {{header.LOC_CUR}} </label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','GrossAmount')}} </label>
<br />
<label for="">{{header.GROSS_AMOUNT}} </label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','DiscountAmount')}} </label>
<br />
<label for="">{{header.DISCOUNT_AMOUNT}} </label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','TotalPODiscount')}}</label>
<br />
<label for="">{{header.TOTAL_PO_DISCOUNT}} </label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','VATAmount')}} </label>
<br />
<label for="">{{header.SALES_TAX}} </label>
</ion-col>
</ion-row>
</ion-row>
<ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','ShipToLocation')}}
</label>
<br />
<ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','CustomDuty')}} </label>
<br />
<label for="">{{header.CUSTOM_DUTY}} </label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','ShipHandle')}} </label>
<br />
<label for="">{{header.SHIP_HANDLE}} </label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','OtherCharges')}}</label>
<br />
<label for="">{{header.OTHER_CHARGES}} </label>
</ion-col>
</ion-row>
<!-- <ion-row>
<label for="">{{header.SHIP_TO_LOCATION_NAME}} </label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','QuotationNumber')}}
</label>
<br />
<label for="">{{header.QUOTATION_NUMBER}} </label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','QuotationDate')}}
</label>
<br />
<label for="">{{header.QUOTATION_DATE}} </label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','PaymentTerms')}} </label>
<br />
<label for="">{{header.PAYMENT_TERMS}} </label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','Currency')}} </label>
<br />
<label for="">{{header.CURRENCY_NAME}} - {{header.LOC_CUR}} </label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','GrossAmount')}} </label>
<br />
<label for="">{{header.GROSS_AMOUNT}} </label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','DiscountAmount')}}
</label>
<br />
<label for="">{{header.DISCOUNT_AMOUNT}} </label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<label class="colItemReq"
for="">{{ts.trPK('worklistMain','TotalPODiscount')}}</label>
<br />
<label for="">{{header.TOTAL_PO_DISCOUNT}} </label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','VATAmount')}} </label>
<br />
<label for="">{{header.SALES_TAX}} </label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','CustomDuty')}} </label>
<br />
<label for="">{{header.CUSTOM_DUTY}} </label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','ShipHandle')}} </label>
<br />
<label for="">{{header.SHIP_HANDLE}} </label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','OtherCharges')}}</label>
<br />
<label for="">{{header.OTHER_CHARGES}} </label>
</ion-col>
</ion-row>
<!-- <ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','Currency')}} </label>
<br />
@ -270,25 +275,27 @@
</ion-row>
<ion-row> -->
<ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','TotalPOAmountWithVAT')}} </label>
<br />
<label for="">{{header.TOT_PO_AMT}} </label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','TotalPOAmountInWords')}} </label>
<br />
<label for="">{{header.TOT_PO_AMT_WORD}} </label>
</ion-col>
</ion-row>
<!-- <ion-row>
<ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','TotalPOAmountWithVAT')}}
</label>
<br />
<label for="">{{header.TOT_PO_AMT}} </label>
</ion-col>
</ion-row>
<ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','TotalPOAmountInWords')}}
</label>
<br />
<label for="">{{header.TOT_PO_AMT_WORD}} </label>
</ion-col>
</ion-row>
<!-- <ion-row>
<ion-col>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','PONumber')}} </label>
<br />
@ -323,6 +330,9 @@
</ion-grid>
<!-- -->
<button ion-button [hidden]="IsReachEnd" class="itemHISBtn" (click)="loadMoreNotificationBody()">Load More</button>
</ion-card-content>
@ -334,7 +344,7 @@
</div>
</div>
</ion-card-content>
</ion-card>
@ -344,22 +354,22 @@
<!-- <ion-card class="cardContent">
<ion-card-content> -->
<div [hidden]="POLines && POLines.length > 0">
<p>{{ 'general, empty' | translate}}</p>
</div>
<ion-list class="itemReqList" *ngIf="POLines && POLines.length > 0 ">
<div [hidden]="POLines && POLines.length > 0">
<p>{{ 'general, empty' | translate}}</p>
</div>
<ion-list class="itemReqList" *ngIf="POLines && POLines.length > 0 ">
<div>
<ion-grid class="gridItemReq">
<div >
<ion-grid class="gridItemReq">
<ion-item class="itemReqContent" *ngFor="let Lines of POLines; let i=index;">
<div class="itemReqDiv">
<ion-item class="itemReqContent" *ngFor="let Lines of POLines; let i=index;" >
<div class="itemReqDiv">
<ion-row>
<ion-col class="colItemReqHeader">
<label for="">{{i+1}}. {{Lines.ITEM_DESCRIPTION}} </label>
</ion-col>
</ion-row>
@ -367,56 +377,58 @@
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','code')}} </label>
<br />
<ion-label class="labelValue" for="">{{Lines.ITEM_CODE}} </ion-label>
</ion-col>
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','MFG')}}
</label>
<br />
<ion-label class="labelValue" for="">{{Lines.MFG}} *</ion-label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','LINE_TYPE')}} </label>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','LINE_TYPE')}}
</label>
<br />
<ion-label class="labelValue" for="">{{Lines.LINE_TYPE}} </ion-label>
</ion-col>
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','unit')}} </label>
<br />
<ion-label class="labelValue" for="">{{Lines.UOM}} </ion-label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','price')}} </label>
<br />
<ion-label class="labelValue" for="">{{Lines.UNIT_PRICE}} </ion-label>
</ion-col>
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','LINE_AMOUNT')}} </label>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','LINE_AMOUNT')}}
</label>
<br />
<ion-label class="labelValue" for="">{{Lines.LINE_AMOUNT}} </ion-label>
</ion-col>
</ion-row>
<ion-row>
@ -424,20 +436,20 @@
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','quantity')}} </label>
<br />
<ion-label class="labelValue" for="">{{Lines.QUANTITY}} </ion-label>
</ion-col>
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','LINE_DIS')}} </label>
<br />
<ion-label class="labelValue" for="">{{Lines.LINE_DISC_PERCENTAGE}} </ion-label>
</ion-col>
</ion-row>
<ion-row>
@ -445,41 +457,43 @@
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','NEED_TO')}} </label>
<br />
<ion-label class="labelValue" for="">{{Lines.NEED_BY_DATE}} </ion-label>
</ion-col>
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','PROMISED_DATE')}} </label>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','PROMISED_DATE')}}
</label>
<br />
<ion-label class="labelValue" for="">{{Lines.PROMISED_DATE}} </ion-label>
</ion-col>
</ion-row>
<ion-row>
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','DELIVER_TO')}} </label>
<label class="colItemReq" for="">{{ts.trPK('worklistMain','DELIVER_TO')}}
</label>
<br />
<ion-label class="labelValue" for="">{{Lines.DELIVER_TO_LOCATION}} </ion-label>
</ion-col>
<ion-col class="colItems">
<label class="colItemReq" for="">{{ts.trPK('worklistMain','PR_NO')}} </label>
<br />
<ion-label class="labelValue" for="">{{Lines.PR_NUM}} </ion-label>
</ion-col>
</ion-row>
<ion-row>
@ -488,7 +502,7 @@
<label class="colItemReq" for="">{{ts.trPK('worklistMain','REQUEST')}} </label>
<br />
<ion-label class="labelValue" for="">{{Lines.REQUESTOR}} </ion-label>
</ion-col>
@ -499,9 +513,9 @@
<label for="">{{Item History}} </label>
</ion-col> -->
</ion-row>
@ -511,8 +525,9 @@
<div style="text-align: center">
<button ion-button class="itemHISBtn" (click)="getItemHistory(Lines.ITEM_ID)">
{{ts.trPK('worklistMain','ITEM_HIS')}}
<button ion-button class="itemHISBtn"
(click)="getItemHistory(Lines.ITEM_ID)">
{{ts.trPK('worklistMain','ITEM_HIS')}}
<!-- (click)="openNoteDetail(actionHistory.NOTE ,actionHistory.NAME)"
[hidden]="actionHistory.NOTE == '' || actionHistory.NOTE == null"
style=" background: none;width: 60%;">
@ -523,38 +538,40 @@
</div>
<!-- <label class="colItemReq" for="">{{ts.trPK('worklistMain','ITEM_HIS')}} </label> -->
<!-- <br /> -->
<!-- <label for="">{{Lines.REQUESTOR}} </label> -->
</ion-col>
<ion-col>
<ion-col>
<div style="text-align: center">
<button ion-button class="itemHISBtn"
(click)="getQutationAnalysis(Lines.PO_HEADER_ID ,Lines.ITEM_ID)">
{{ts.trPK('worklistMain','QUOTATION_ANALYSIS')}}
(click)="getQutationAnalysis(Lines.PO_HEADER_ID ,Lines.ITEM_ID)">
{{ts.trPK('worklistMain','QUOTATION_ANALYSIS')}}
<!-- (click)="getQutationAnalysis(Lines.PO_HEADER_ID ,Lines.ITEM_CODE)"
[hidden]="actionHistory.NOTE == '' || actionHistory.NOTE == null"
style=" background: none;width: 60%;">
<img src="../assets/imgs/noteSmall.png"> -->
</button>
</div>
</ion-col>
</ion-col>
</ion-row>
</div>
</ion-item>
</ion-item>
</ion-grid>
</div>
</ion-list>
<!-- </ion-card-content>
</ion-grid>
</div>
</ion-list>
<!-- </ion-card-content>
</ion-card> -->
</ion-slide>
<ion-slide>
<ion-card class="cardContent">
<ion-card-content>
@ -580,15 +597,14 @@
</button>
</div>
<div
[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">
<div [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">
</div>
</div>
<ion-col>
<ion-label
[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}}</ion-label>
[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}}</ion-label>
<ion-label> {{actionHistory.NAME}}
</ion-label>
@ -598,10 +614,13 @@
</div>
</ion-list>
</div>
<button ion-button [hidden]="IsReachEnd" class="itemHISBtn" (click)="loadMoreActionHistory()">Load More</button>
</ion-card-content>
</ion-card>
</ion-card>
</ion-slide>
<ion-slide>
<ion-card class="cardContent">
<ion-card-content>
@ -609,7 +628,7 @@
<p>{{ 'general, notAttch' | translate}}</p>
</div>
<div *ngIf="attachmentRes && attachmentRes.length > 0 ">
<ion-grid>
<div *ngFor="let attachList of attachmentRes">
<ion-row (click)="OpenAttachFiles(attachList.FILE_DATA,attachList.FILE_CONTENT_TYPE)">
@ -632,12 +651,12 @@
<ion-label>
{{attachList.SEQ_NUM }}. {{attachList.FILE_NAME}} </ion-label>
</ion-col>
</ion-row>
</div>
</ion-grid>
</div>
</ion-card-content>
@ -647,7 +666,7 @@
</ion-slides>
</ion-content>
<ion-footer class="footerSearchBtn">
@ -663,7 +682,7 @@
</ion-col>
<ion-col col-8>
<ion-item *ngIf="notificationButtonRes?.length >0" class="requiredItem actionList">
<ion-label class="boldTxtNav">{{'actionHis, action' | translate}} </ion-label>

@ -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
}

@ -6,7 +6,7 @@
</ion-buttons>
</ion-toolbar>
<ion-toolbar>
<ion-toolbar class="slideToolBar">
<ion-segment class="segmentPR" scrollable>
<ion-segment-button value="0" checked>
<!-- <ion-icon name="call">arrowRight</ion-icon> -->
@ -168,6 +168,7 @@
</ion-grid>
<button [hidden]="IsReachEnd" ion-button class="itemHISBtn" (click)="loadMoreNotificationBody()">Load More</button>
</ion-card-content>
@ -324,15 +325,14 @@
</div>
<!-- [ngClass]="{'bg-blue-dot' : actionHistory.ACTION === 'Submitted' ,'statusGreanColor' :appointmentsArrive.Status != 1 && appointmentsArrive.Status != 2, 'statusRedColor' :appointmentsArrive.Status === 2}" -->
<div
[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">
<div [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">
</div>
</div>
<ion-col>
<ion-label
[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}}</ion-label>
[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}}</ion-label>
<ion-label> {{actionHistory.NAME}}
</ion-label>
@ -342,6 +342,9 @@
</div>
</ion-list>
</div>
<button ion-button [hidden]="IsReachEnd" class="itemHISBtn" (click)="loadMoreActionHistory()">Load More</button>
</ion-card-content>
</ion-card>

@ -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;
}

@ -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
}

@ -26,7 +26,7 @@
<ion-row> <ion-label>PERIOD END DATE</ion-label><ion-label>{{showPaySlip.PERIOD_END_DATE}}</ion-label> </ion-row>
</ion-item>
</ion-list> -->
<div *ngIf="showPaySlip !=''">
<accordin-custom >
<accordin-tab-custom [header]="'payslip,payroll-info' | translate " >
<!-- special results -->
@ -242,7 +242,10 @@
<!-- </ion-card-content>
</ion-card> -->
<!-- <ion-infinite-scroll (ionInfinite)="doInfiniteEarning($event)">
<ion-infinite-scroll-content></ion-infinite-scroll-content>
</ion-infinite-scroll> -->
</accordin-tab-custom>
</accordin-custom >
@ -288,6 +291,10 @@
<!-- </ion-card-content>
</ion-card> -->
<!-- <ion-infinite-scroll (ionInfinite)="doInfiniteDeduction($event)">
<ion-infinite-scroll-content></ion-infinite-scroll-content>
</ion-infinite-scroll> -->
</accordin-tab-custom>
</accordin-custom >
@ -365,7 +372,7 @@
</accordin-tab-custom>
</accordin-custom >
</div>
<!-- <ion-row *ngIf="showPaySlip !=''" style="text-align: center;">
<ion-col class="greenTxt" col-6>

@ -1,9 +1,11 @@
import { Component, OnInit } from '@angular/core';
import { Component, OnInit, ViewChild } from '@angular/core';
import {PayslipService} from '../service/payslip.service'
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response';
import { SharedDataService } from 'src/app/hmg-common/services/shared-data-service/shared-data.service';
import { DeductionRequest } from '../model/deductionReq';
import { IonInfiniteScroll } from '@ionic/angular';
@Component({
selector: 'app-home',
@ -24,6 +26,11 @@ export class HomeComponent implements OnInit {
GetDeductionsList: any='';
earingTotal: any;
deductionTotal: any;
firstPayslip: any;
defultSelected: any;
IsReachEnd: any;
private deductionReq: DeductionRequest;
@ViewChild(IonInfiniteScroll) infiniteScroll: IonInfiniteScroll;
constructor(
public payslipService:PayslipService,
@ -90,7 +97,8 @@ export class HomeComponent implements OnInit {
if (result.GetPayslipList != null) {
this.GetPayslipList = result.GetPayslipList;
this.firstPayslip= this.GetPayslipList[0]
this.defultSelected=this.firstPayslip.PAYSLIP_CHOICE
}
}
@ -158,11 +166,16 @@ openDeductions(){
}
getEarings(ActionContextID){
const request = {
P_ACTION_CONTEXT_ID: ActionContextID,
P_PAGE_NUM: 1,
P_PAGE_LIMIT: 1000
};
console.log("getEarings");
// this.deductionReq.P_ACTION_CONTEXT_ID=ActionContextID;
// this.deductionReq.P_PAGE_NUM=1;
// this.deductionReq.P_PAGE_LIMIT=100;
const request ={
P_ACTION_CONTEXT_ID:ActionContextID,
P_PAGE_NUM:1,
P_PAGE_LIMIT:100
}
this.payslipService.getEarings(request, ()=> {} , this.ts.trPK('general', 'retry')).subscribe((result)=>
{
@ -181,11 +194,16 @@ handleGetEaringsResult(result){
}
getDeduction(ActionContextID){
const request = {
P_ACTION_CONTEXT_ID: ActionContextID,
P_PAGE_NUM: 1,
P_PAGE_LIMIT: 1000
};
console.log("getDeduction");
const request ={
P_ACTION_CONTEXT_ID:ActionContextID,
P_PAGE_NUM:1,
P_PAGE_LIMIT:100
}
// this.deductionReq.P_ACTION_CONTEXT_ID=ActionContextID;
// this.deductionReq.P_PAGE_NUM=1;
// this.deductionReq.P_PAGE_LIMIT=100;
this.payslipService.getDeduction(request, ()=> {} , this.ts.trPK('general', 'retry')).subscribe((result)=>
{
@ -201,8 +219,69 @@ getDeduction(ActionContextID){
}
doInfiniteDeduction(infiniteScroll) {
//this.pageNum= this.pageNum + 1;
if (!this.IsReachEnd) {
this.payslipService.getDeduction(this.deductionReq).subscribe(
(result: any) => {
if (this.common.validResponse(result)) {
this.deductionReq.P_PAGE_NUM++;
if (this.common.hasData(result.GetDeductionsList)) {
result.GetDeductionsList.forEach(element => {
if (element.ROW_NUM == element.NO_OF_ROWS) {
this.IsReachEnd = true;
} else {
this.IsReachEnd = false;
}
this.GetDeductionsList.push(element);
});
} // if list length >0
else {
this.IsReachEnd = true;
}
} // if response == 1
//this.pageNum++;
this.infiniteScroll.complete();
}
);
} else {
if (this.infiniteScroll) this.infiniteScroll.complete();
}
} //end infiniteScroll
doInfiniteEarning(infiniteScroll) {
//this.pageNum= this.pageNum + 1;
if (!this.IsReachEnd) {
this.payslipService.getEarings(this.deductionReq).subscribe(
(result: any) => {
if (this.common.validResponse(result)) {
this.deductionReq.P_PAGE_NUM++;
if (this.common.hasData(result.GetEarningsList)) {
result.GetEarningsList.forEach(element => {
if (element.ROW_NUM == element.NO_OF_ROWS) {
this.IsReachEnd = true;
} else {
this.IsReachEnd = false;
}
this.GetEarningsList.push(element);
});
} // if list length >0
else {
this.IsReachEnd = true;
}
} // if response == 1
//this.pageNum++;
this.infiniteScroll.complete();
}
);
} else {
if (this.infiniteScroll) this.infiniteScroll.complete();
}
} //end infiniteScroll
}

@ -0,0 +1,9 @@
import { Request } from 'src/app/hmg-common/services/models/request';
export class DeductionRequest extends Request{
//public static SHARED_DATA = '';
public P_ACTION_CONTEXT_ID :any;
public P_PAGE_NUM:number ;//number
public P_PAGE_LIMIT:number;//number
}

@ -78,6 +78,10 @@
</ion-card-content>
</ion-card>
<ion-infinite-scroll (ionInfinite)="doInfinite($event)">
<ion-infinite-scroll-content></ion-infinite-scroll-content>
</ion-infinite-scroll>
</ion-content>
<ion-footer>

@ -4,10 +4,11 @@ import { DeleteVacationRuleRequest } from './../model/deleteVacationRule.Request
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
import { VacationRuleServiceService } from './../service/vacation-rule-service.service';
import { VacationRuleRequest } from './../model/VacationRuleRequest';
import { Component, OnInit } from '@angular/core';
import { Component, OnInit, ViewChild } from '@angular/core';
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
import { Router } from '@angular/router';
import { ButtonInput } from 'src/app/uI-elements/button.input';
import { IonInfiniteScroll } from '@ionic/angular';
@Component({
selector: 'app-home',
@ -15,6 +16,7 @@ import { ButtonInput } from 'src/app/uI-elements/button.input';
styleUrls: ['./home.component.scss'],
})
export class HomeComponent implements OnInit {
@ViewChild(IonInfiniteScroll) infiniteScroll: IonInfiniteScroll;
userName: any;
P_PAGE_NUM: number;
@ -162,5 +164,39 @@ export class HomeComponent implements OnInit {
}
}
doInfinite(infiniteScroll) {
let request: VacationRuleRequest = new VacationRuleRequest();
request.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
request.P_PAGE_NUM = this.P_PAGE_NUM;
if (!this.IsReachEnd) {
this.vacationRuleService.getVacationRule(request, () => {
// this.getVacationRules();
}, this.ts.trPK('general', 'retry')).subscribe((result) => {
if (this.cs.validResponse(result)) {
request.P_PAGE_NUM++;
if (this.cs.hasData(result.GetVacationRulesList)) {
result.GetVacationRulesList.forEach(element => {
if (element.ROW_NUM == element.NO_OF_ROWS) {
this.IsReachEnd = true;
} else {
this.IsReachEnd = false;
}
this.GetVacationRulesList.push(element);
});
} // if list length >0
else {
this.IsReachEnd = true;
}
} // if response == 1
//this.pageNum++;
this.infiniteScroll.complete();
}
);
} else {
if (this.infiniteScroll) this.infiniteScroll.complete();
}
} //end infiniteScroll
}

@ -1988,7 +1988,13 @@
"RFQ_UOM":{
"en": "RFQ UOM",
"ar":"RFQ UOM"
},
"line_details":{
"en": "Line Details",
"ar":"Line Details"
}
},
"payslip": {
"title":{

@ -778,10 +778,11 @@ color: var(--dark);
--bullet-background: var(--cusgray) !important; //var(--primary) !important;
--bullet-background-active: var(--darkgray) !important;
--bullet-border: solid 1px var(--cusgray) !important;
}
.slides-gray-bullets .swiper-pagination {
top: 0.4cm !important;
top: 0.2cm !important;
}
@ -795,6 +796,8 @@ color: var(--dark);
.swiper-container-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet {
margin: 5px;
width: 12px;
height: 12px;
}
// .skipbutton,.button-md, button-ios{
@ -851,4 +854,4 @@ color: var(--dark);
// /* bottom: 10px; */
// left: 0;
// width: 100%;
// }
//

@ -23,7 +23,7 @@
.itemReqContent{
margin-top: 17px;
// margin-top: 17px;
margin-bottom: 10px;
border-radius: 7px;
text-align: left;

Loading…
Cancel
Save