PR Worklist
parent
8cc0a3fff7
commit
d09d251c71
@ -0,0 +1,9 @@
|
|||||||
|
.ion-modal{
|
||||||
|
width: 90%;
|
||||||
|
height: 50%;
|
||||||
|
top: 20%;
|
||||||
|
left: 5%;
|
||||||
|
right: 5%;
|
||||||
|
bottom: 5%;
|
||||||
|
border: solid 1px red;
|
||||||
|
}
|
||||||
@ -0,0 +1,400 @@
|
|||||||
|
<ion-header>
|
||||||
|
<ion-toolbar class="header-toolbar">
|
||||||
|
<ion-title color="light"> {{ts.trPK('worklistMain','title')}}</ion-title>
|
||||||
|
<ion-buttons slot="start">
|
||||||
|
<nav-buttons backLink="/notification/homepage"></nav-buttons>
|
||||||
|
</ion-buttons>
|
||||||
|
</ion-toolbar>
|
||||||
|
|
||||||
|
<ion-toolbar>
|
||||||
|
<ion-segment class="segmentPR" scrollable>
|
||||||
|
<ion-segment-button value="0" checked>
|
||||||
|
<!-- <ion-icon name="call"></ion-icon> -->
|
||||||
|
<ion-label> {{ts.trPK('worklistMain','info')}}</ion-label>
|
||||||
|
</ion-segment-button>
|
||||||
|
<ion-segment-button value="1">
|
||||||
|
<!-- <ion-icon name="cloud-upload"></ion-icon> -->
|
||||||
|
<ion-label> {{ts.trPK('worklistMain','itemReq')}}</ion-label>
|
||||||
|
</ion-segment-button>
|
||||||
|
<ion-segment-button value="2">
|
||||||
|
<!-- <ion-icon name="paper"></ion-icon> -->
|
||||||
|
<ion-label>
|
||||||
|
{{'worklistMain, actionHis' | translate}}
|
||||||
|
|
||||||
|
</ion-label>
|
||||||
|
</ion-segment-button>
|
||||||
|
<ion-segment-button value="3">
|
||||||
|
<!-- <ion-icon name="code-working"></ion-icon> -->
|
||||||
|
<ion-label>{{'general, attachment' | translate}}
|
||||||
|
</ion-label>
|
||||||
|
</ion-segment-button>
|
||||||
|
</ion-segment>
|
||||||
|
</ion-toolbar>
|
||||||
|
</ion-header>
|
||||||
|
|
||||||
|
<ion-content>
|
||||||
|
|
||||||
|
|
||||||
|
<ion-slides pager="true" class="slides-gray-bullets">
|
||||||
|
<ion-slide class="slide-1">
|
||||||
|
|
||||||
|
<div *ngIf="pInformation && pInformation != '' " class="tipsPadding">{{pInformation}}</div>
|
||||||
|
|
||||||
|
<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-col>
|
||||||
|
<ion-col> -->
|
||||||
|
<label for=""> {{getPassNotificationDetails.TO_USER}}</label>
|
||||||
|
</ion-col>
|
||||||
|
</ion-row>
|
||||||
|
|
||||||
|
<ion-row>
|
||||||
|
<ion-col>
|
||||||
|
<label class="colItemReq" for="">{{ts.trPK('worklistMain','sent')}}
|
||||||
|
</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> -->
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<ion-row>
|
||||||
|
<ion-col>
|
||||||
|
<label class="colItemReq" for="">{{ts.trPK('worklistMain','subject')}} </label>
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<!-- </ion-col>
|
||||||
|
<ion-col> -->
|
||||||
|
<label for="">{{getPassNotificationDetails.SUBJECT}} </label>
|
||||||
|
</ion-col>
|
||||||
|
</ion-row>
|
||||||
|
|
||||||
|
<!-- notificationBodyRes -->
|
||||||
|
|
||||||
|
<div *ngFor="let header of PRHeader">
|
||||||
|
|
||||||
|
<ion-row>
|
||||||
|
<!-- *ngIf="header.HDR_ATTRIBUTE_NAME != 'Requisition Total' && header.HDR_ATTRIBUTE_NAME != 'Non-Recoverable Tax'"> -->
|
||||||
|
|
||||||
|
<ion-col>
|
||||||
|
<label class="colItemReq" for="">{{header.HDR_ATTRIBUTE_NAME}} </label>
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<label for="">{{header.HDR_ATTRIBUTE_VALUE}} </label>
|
||||||
|
</ion-col>
|
||||||
|
</ion-row>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <ion-grid>
|
||||||
|
<div *ngFor="let header of PRHeader">
|
||||||
|
<ion-row >
|
||||||
|
<ion-col *ngIf="header.HDR_ATTRIBUTE_NAME == 'Requisition Total' || header.HDR_ATTRIBUTE_NAME == 'Non-Recoverable Tax' ">
|
||||||
|
<div class="colItemReq">{{header.HDR_ATTRIBUTE_NAME}}</div>
|
||||||
|
<div class="labelTotal">{{header.HDR_ATTRIBUTE_VALUE}}</div>
|
||||||
|
|
||||||
|
</ion-col>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</ion-grid> -->
|
||||||
|
|
||||||
|
|
||||||
|
<!--
|
||||||
|
<ion-row>
|
||||||
|
<ion-col class="greenTxt" col-4>
|
||||||
|
<button ion-button block class="notColBtn" (click)="openNotificationBody()">
|
||||||
|
<p>{{ts.trPK('worklistMain','notfDetails')}} </p>
|
||||||
|
<ion-img class="serviceItemImg" src="../assets/imgs/details.png"></ion-img>
|
||||||
|
</button>
|
||||||
|
</ion-col>
|
||||||
|
<ion-col class="greenTxt" col-4>
|
||||||
|
<button ion-button block class="notColBtn" (click)="openActionHistory()">
|
||||||
|
<p>{{ts.trPK('worklistMain','actionHis')}}</p>
|
||||||
|
<ion-img class="serviceItemImg" src="../assets/imgs/actionHistory.png"></ion-img>
|
||||||
|
</button>
|
||||||
|
</ion-col>
|
||||||
|
<ion-col class="greenTxt" col-4>
|
||||||
|
<button ion-button block class="notColBtn" (click)="openSupportDocuments()">
|
||||||
|
<p>{{ts.trPK('worklistMain','suppDoc')}}</p>
|
||||||
|
<ion-img class="serviceItemImg" src="../assets/imgs/documents.png"></ion-img>
|
||||||
|
</button>
|
||||||
|
</ion-col>
|
||||||
|
</ion-row>
|
||||||
|
|
||||||
|
-->
|
||||||
|
</ion-grid>
|
||||||
|
|
||||||
|
</ion-card-content>
|
||||||
|
|
||||||
|
|
||||||
|
<ion-card-content>
|
||||||
|
<div>
|
||||||
|
|
||||||
|
<div id="notificationDynamicFields">
|
||||||
|
</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>
|
||||||
|
<ion-select-option value="{{notificationButtons.BUTTON_ACTION}}"
|
||||||
|
*ngFor="let notificationButtons of notificationButtonRes; let i=index;">
|
||||||
|
{{notificationButtons.BUTTON_LABEL}}</ion-select-option>
|
||||||
|
</ion-select>
|
||||||
|
</ion-item>
|
||||||
|
</ion-card-content>
|
||||||
|
</ion-card>
|
||||||
|
|
||||||
|
|
||||||
|
</ion-slide>
|
||||||
|
<ion-slide>
|
||||||
|
<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>
|
||||||
|
<div *ngFor="let Lines of PRLines; let i=index; " style="text-align: left">
|
||||||
|
<ion-row>
|
||||||
|
<ion-col class="colItemReqHeader">
|
||||||
|
<!-- <label for="">{{ts.trPK('worklistMain','description')}}
|
||||||
|
</label> -->
|
||||||
|
<!-- </ion-col>
|
||||||
|
<ion-col> -->
|
||||||
|
<label for="">{{i+1}}. {{Lines.DESCRIPTION}} </label>
|
||||||
|
</ion-col>
|
||||||
|
</ion-row>
|
||||||
|
<ion-row>
|
||||||
|
<ion-col>
|
||||||
|
<label class="colItemReq" for="">{{ts.trPK('worklistMain','cost-center')}} </label>
|
||||||
|
<br />
|
||||||
|
<!-- </ion-col>
|
||||||
|
<ion-col> -->
|
||||||
|
<label for="">{{Lines.COST_CENTER}} </label>
|
||||||
|
</ion-col>
|
||||||
|
<!-- </ion-row>
|
||||||
|
|
||||||
|
<ion-row> -->
|
||||||
|
|
||||||
|
<ion-col>
|
||||||
|
<label class="colItemReq" for="">{{ts.trPK('worklistMain','code')}} </label>
|
||||||
|
<br />
|
||||||
|
<!-- </ion-col>
|
||||||
|
<ion-col> -->
|
||||||
|
<label for="">{{Lines.ITEM_CODE}} </label>
|
||||||
|
</ion-col>
|
||||||
|
</ion-row>
|
||||||
|
<ion-row>
|
||||||
|
|
||||||
|
<ion-col>
|
||||||
|
<label class="colItemReq" for="">{{ts.trPK('worklistMain','unit')}} </label>
|
||||||
|
<br />
|
||||||
|
<!-- </ion-col>
|
||||||
|
<ion-col> -->
|
||||||
|
<label for="">{{Lines.UOM}} </label>
|
||||||
|
</ion-col>
|
||||||
|
<!-- </ion-row>
|
||||||
|
<ion-row> -->
|
||||||
|
|
||||||
|
<ion-col>
|
||||||
|
<label class="colItemReq" for="">{{ts.trPK('worklistMain','price')}} </label>
|
||||||
|
<br />
|
||||||
|
<!-- </ion-col>
|
||||||
|
<ion-col> -->
|
||||||
|
<label for="">{{Lines.UNIT_PRICE}} </label>
|
||||||
|
|
||||||
|
</ion-col>
|
||||||
|
</ion-row>
|
||||||
|
<ion-row>
|
||||||
|
|
||||||
|
|
||||||
|
<ion-col>
|
||||||
|
<label class="colItemReq" for="">{{ts.trPK('payslip','amount')}} </label>
|
||||||
|
<br />
|
||||||
|
<!-- </ion-col>
|
||||||
|
<ion-col> -->
|
||||||
|
<label for="">{{Lines.LINE_AMOUNT}} </label>
|
||||||
|
</ion-col>
|
||||||
|
|
||||||
|
<!-- </ion-row>
|
||||||
|
<ion-row> -->
|
||||||
|
|
||||||
|
<ion-col>
|
||||||
|
<label class="colItemReq" for="">{{ts.trPK('worklistMain','quantity')}} </label>
|
||||||
|
<br />
|
||||||
|
<!-- </ion-col>
|
||||||
|
<ion-col> -->
|
||||||
|
<label for="">{{Lines.QUANTITY}} </label>
|
||||||
|
</ion-col>
|
||||||
|
|
||||||
|
</ion-row>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</ion-grid>
|
||||||
|
</ion-card-content>
|
||||||
|
</ion-card>
|
||||||
|
</ion-slide>
|
||||||
|
<ion-slide>
|
||||||
|
<ion-card class="cardContent">
|
||||||
|
<ion-card-content>
|
||||||
|
<ion-list class="notification-list ">
|
||||||
|
<div class="timeline">
|
||||||
|
<ion-item *ngFor="let actionHistory of actionHistoryRes">
|
||||||
|
|
||||||
|
<div class="timeline-item" slot="start">
|
||||||
|
<!-- <div class="item-date"> {{notificationList.BEGIN_DATE }} </div> -->
|
||||||
|
|
||||||
|
<div>
|
||||||
|
|
||||||
|
<button (click)="openNoteDetail(actionHistory.NOTE,actionHistory.NAME)"
|
||||||
|
style=" background: none;"
|
||||||
|
[hidden]="actionHistory.NOTE == '' || actionHistory.NOTE == null">
|
||||||
|
<!-- <img src="../assets/imgs/more.png"> -->
|
||||||
|
<!-- <img src="../assets/imgs/noteSmall.png"> -->
|
||||||
|
|
||||||
|
<ion-icon name="bookmark"></ion-icon>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div class="timeline-thumb bg-color-dot timeline-icon">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<ion-col>
|
||||||
|
<ion-label class="labelAction"> {{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>
|
||||||
|
</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-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>
|
||||||
|
<ion-col col-10>
|
||||||
|
<div> <img float-start class="attachImg" src="../assets/imgs/file.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-grid>
|
||||||
|
<!-- </ion-card-content>
|
||||||
|
</ion-card> -->
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</ion-card-content>
|
||||||
|
</ion-card>
|
||||||
|
</ion-slide>
|
||||||
|
|
||||||
|
</ion-slides>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <div id="notificationDynamicFields">
|
||||||
|
</div> -->
|
||||||
|
</ion-content>
|
||||||
|
<ion-footer>
|
||||||
|
|
||||||
|
<div class="centerDiv">
|
||||||
|
<ion-button color="customnavy" class="gridBtn" (click)="actionButton()"> {{ts.trPK('general','submit')}}
|
||||||
|
</ion-button>
|
||||||
|
</div>
|
||||||
|
<div class="centerDiv">
|
||||||
|
<ion-button color="customnavy" class="gridBtn" (click)="nextNotfification()">
|
||||||
|
{{'worklistMain, skip' | translate}}
|
||||||
|
</ion-button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</ion-footer>
|
||||||
@ -0,0 +1,231 @@
|
|||||||
|
|
||||||
|
.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(--secondary);
|
||||||
|
--indicator-color-checked: var(--secondary);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.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: 62px;
|
||||||
|
/* margin-left: -10px; */
|
||||||
|
/* z-index: 1; */
|
||||||
|
}
|
||||||
|
|
||||||
|
.timeline .timeline-thumb {
|
||||||
|
|
||||||
|
border-radius: 500px;
|
||||||
|
width: 50px;
|
||||||
|
z-index: 2;
|
||||||
|
position: absolute;
|
||||||
|
left: 38px;
|
||||||
|
// :root[dir="ltr"]{
|
||||||
|
// left: 37px;
|
||||||
|
// }
|
||||||
|
// :root[dir="rtl"]{
|
||||||
|
// right: 37px;
|
||||||
|
// }
|
||||||
|
width: 50px;
|
||||||
|
float: right;
|
||||||
|
top: 9px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.timeline .timeline-thumb.timeline-icon {
|
||||||
|
height: 50px;
|
||||||
|
// text-align: center;
|
||||||
|
// color: white;
|
||||||
|
// border: 5px solid #CBD0D3;
|
||||||
|
transform: scale(0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.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-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%);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.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: 62px;
|
||||||
|
}
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,27 @@
|
|||||||
|
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||||
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { WorklistMainPRComponent } from './worklist-main-pr.component';
|
||||||
|
|
||||||
|
describe('WorklistMainPRComponent', () => {
|
||||||
|
let component: WorklistMainPRComponent;
|
||||||
|
let fixture: ComponentFixture<WorklistMainPRComponent>;
|
||||||
|
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [ WorklistMainPRComponent ],
|
||||||
|
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
}));
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(WorklistMainPRComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
@ -0,0 +1,699 @@
|
|||||||
|
import { Component, OnInit, ElementRef } from "@angular/core";
|
||||||
|
import { CommonService } from "src/app/hmg-common/services/common/common.service";
|
||||||
|
import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service";
|
||||||
|
import { WorkListBodyRequest } from "../models/NotificationBodyReq";
|
||||||
|
import { EITNotificatonBodyResponse } from "../models/EITNotificationBodyRes";
|
||||||
|
import { AbsenceNotificatonBodyResponse } from "../models/AbsenceNotificationBodyRes";
|
||||||
|
import { NotificatonButtonResponse } from "../models/NotificationButtonRes";
|
||||||
|
import { WorkListActionRequest } from "../models/NotificationActionReq";
|
||||||
|
import { WorkListButtonRequest } from "../models/NotificationButtonReq";
|
||||||
|
// import { isDate } from 'angular6-json-schema-form';
|
||||||
|
import { MenuResponse } from "src/app/hmg-common/services/menu/models/menu-response";
|
||||||
|
import { LoginRequest } from "src/app/hmg-common/services/authentication/models/login.request";
|
||||||
|
import { WorklistMainService } from "../service/work-list.main.service";
|
||||||
|
import { HomeComponent } from "src/app/notification/home/home.component";
|
||||||
|
import { TextInput } from 'src/app/uI-elements/text.input';
|
||||||
|
import { TextAreaInput } from 'src/app/uI-elements/text-area.input';
|
||||||
|
import { MenuService } from 'src/app/hmg-common/services/menu/menuservice.service';
|
||||||
|
import { Events, ModalController } from '@ionic/angular';
|
||||||
|
import { PONotificatonBodyResponse } from '../models/PONotificationBodyRes';
|
||||||
|
import { MONotificatonBodyResponse } from '../models/MONotificationBodyRes';
|
||||||
|
import { PRNotificatonBodyResponse } from '../models/PRNotificationBodyRes';
|
||||||
|
import { WorklistAttachService } from 'src/app/absence/service/work-list-attach.service';
|
||||||
|
import { NotificationGetAttachResponse } from 'src/app/eit/models/NotificationGetAttachRes';
|
||||||
|
import { PRNotificatonBodyList } from '../models/PRNotificationBodyList';
|
||||||
|
import { WorkListActionHistoryRequest } from '../models/ActionHistoryReq';
|
||||||
|
import { WorklistService } from '../service/worklist.service';
|
||||||
|
import { ViewNoteModalComponent } from '../view-note-modal/view-note-modal.component';
|
||||||
|
import { WorkListActionHistoryResponse } from '../models/ActionHistoryRes';
|
||||||
|
import { WorkListAttachViewComponent } from '../work-list-attach-view/work-list-attach-view.component';
|
||||||
|
@Component({
|
||||||
|
selector: 'app-worklist-main-pr',
|
||||||
|
templateUrl: './worklist-main-pr.component.html',
|
||||||
|
styleUrls: ['./worklist-main-pr.component.scss'],
|
||||||
|
})
|
||||||
|
export class WorklistMainPRComponent implements OnInit {
|
||||||
|
|
||||||
|
private WorkListBodyObj: WorkListBodyRequest;
|
||||||
|
private WorkListButtonsObj: WorkListButtonRequest;
|
||||||
|
private WorkListActionObj: WorkListActionRequest;
|
||||||
|
private WorkListActionHistoryObj: WorkListActionHistoryRequest;
|
||||||
|
private WorkListAttachObj: WorkListButtonRequest;
|
||||||
|
private PRList:PRNotificatonBodyList
|
||||||
|
public static PASS_NOTIFICATION_INFO = "passNotificationInfo";
|
||||||
|
public static PASS_ACTION_MODE = "passActionMode";
|
||||||
|
getPassNotificationDetails: any;
|
||||||
|
public static PASS_RES_ATTR = "passResAttr";
|
||||||
|
TransactionID: number = -999;
|
||||||
|
notificationBodyRes: any;
|
||||||
|
actionHistoryRes: any;
|
||||||
|
notificationButtonRes: any;
|
||||||
|
actionMode: any;
|
||||||
|
pInformation: string = "";
|
||||||
|
pQuestion: string = "";
|
||||||
|
RespondAttributesListRes: any;
|
||||||
|
schemaNotific: any;
|
||||||
|
NotRespondAttributeList: any;
|
||||||
|
Resp2_val: any;
|
||||||
|
notExampleJsonObject: any;
|
||||||
|
hideForwordEmployee: any;
|
||||||
|
exampleJsonObject: any;
|
||||||
|
dataOfAttr: any;
|
||||||
|
P_RESPOND_ATTRIBUTES_TBL: any;
|
||||||
|
selEmployeeID: any;
|
||||||
|
actionType: string = "";
|
||||||
|
notificationArray: any;
|
||||||
|
notificationDynamicAttributeArr:any;
|
||||||
|
private textInput: TextInput;
|
||||||
|
private textArea: TextAreaInput;
|
||||||
|
notificationCount: any;
|
||||||
|
attachmentRes:any;
|
||||||
|
PRHeader:any;//change the tpye later
|
||||||
|
PRLines:any;//change the tpye later
|
||||||
|
IsReachEnd: boolean = false;
|
||||||
|
P_PAGE_NUM: number = 1;
|
||||||
|
P_PAGE_LIMIT: number = 50;
|
||||||
|
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
public common: CommonService,
|
||||||
|
public ts: TranslatorService,
|
||||||
|
public worklistMainService: WorklistMainService,
|
||||||
|
public elementRef: ElementRef,
|
||||||
|
public menuService: MenuService,
|
||||||
|
public events: Events,
|
||||||
|
public worklistAttachService: WorklistAttachService,
|
||||||
|
private modalCtrl: ModalController,
|
||||||
|
public worklistService: WorklistService
|
||||||
|
) {
|
||||||
|
|
||||||
|
//this.getPassNotificationDetails = this.common.sharedService.getSharedData('passNotificationInfo');
|
||||||
|
this.WorkListActionHistoryObj = new WorkListActionHistoryRequest();
|
||||||
|
this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM;
|
||||||
|
this.WorkListActionHistoryObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
|
||||||
|
// this.WorkListActionHistoryObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
this.WorkListAttachObj = new WorkListButtonRequest();
|
||||||
|
|
||||||
|
this.intializeNotificationDetail();
|
||||||
|
|
||||||
|
let segment = document.querySelector('ion-segment');
|
||||||
|
let slides = document.querySelector('ion-slides');
|
||||||
|
|
||||||
|
segment.addEventListener('ionChange', (ev) => onSegmentChange(ev));
|
||||||
|
slides.addEventListener('ionSlideDidChange', (ev) => onSlideDidChange(ev));
|
||||||
|
|
||||||
|
// On Segment change slide to the matching slide
|
||||||
|
function onSegmentChange(ev) {
|
||||||
|
console.log("ev.detail.value"+ev.detail.value);
|
||||||
|
slideTo(ev.detail.value);
|
||||||
|
}
|
||||||
|
|
||||||
|
function slideTo(index) {
|
||||||
|
console.log("index: "+index);
|
||||||
|
|
||||||
|
slides.slideTo(index);
|
||||||
|
}
|
||||||
|
|
||||||
|
// On Slide change update segment to the matching value
|
||||||
|
async function onSlideDidChange(ev) {
|
||||||
|
var index = await slides.getActiveIndex();
|
||||||
|
console.log("index: "+index);
|
||||||
|
clickSegment(index);
|
||||||
|
}
|
||||||
|
|
||||||
|
function clickSegment(index) {
|
||||||
|
|
||||||
|
segment.value = index;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
intializeNotificationDetail() {
|
||||||
|
document.getElementById("notificationDynamicFields").innerHTML="";
|
||||||
|
console.log("intializeNotificationDetail");
|
||||||
|
this.getPassNotificationDetails = this.common.sharedService.getSharedData(
|
||||||
|
HomeComponent.NOTIFICATION_DATA,
|
||||||
|
false
|
||||||
|
);
|
||||||
|
console.log(this.getPassNotificationDetails.ROW_NUM);
|
||||||
|
this.notificationArray = this.common.sharedService.getSharedData(
|
||||||
|
HomeComponent.NOTIFICATION_ARR,
|
||||||
|
false
|
||||||
|
);
|
||||||
|
this.WorkListBodyObj = new WorkListBodyRequest();
|
||||||
|
this.WorkListButtonsObj = new WorkListButtonRequest();
|
||||||
|
|
||||||
|
this.WorkListActionObj = new WorkListActionRequest();
|
||||||
|
|
||||||
|
this.WorkListBodyObj.P_TRANSACTION_ID = this.TransactionID;
|
||||||
|
this.WorkListBodyObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;
|
||||||
|
this.WorkListBodyObj.P_PAGE_NUM = this.P_PAGE_NUM;;
|
||||||
|
this.WorkListBodyObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
|
||||||
|
|
||||||
|
this.WorkListButtonsObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;
|
||||||
|
|
||||||
|
this.WorkListActionObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;
|
||||||
|
this.WorkListActionObj.P_FORWARD_TO_USER_NAME = "";
|
||||||
|
this.WorkListActionObj.P_ACTION_MODE = "";
|
||||||
|
this.WorkListActionObj.P_COMMENTS = "";
|
||||||
|
this.WorkListActionObj.P_APPROVER_INDEX = null;
|
||||||
|
|
||||||
|
this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM;
|
||||||
|
this.WorkListActionHistoryObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
|
||||||
|
this.WorkListActionHistoryObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;
|
||||||
|
|
||||||
|
this.WorkListAttachObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;
|
||||||
|
|
||||||
|
this.getNotificationButtons(this.WorkListButtonsObj);
|
||||||
|
this.getNotificationResAttr(this.WorkListButtonsObj);
|
||||||
|
this.getActionHistory(this.WorkListActionHistoryObj);
|
||||||
|
this.getAttachmentNotification(this.WorkListAttachObj);
|
||||||
|
|
||||||
|
if (this.getPassNotificationDetails.REQUEST_TYPE == "EIT") {
|
||||||
|
this.getEITNotificationDetails(this.WorkListBodyObj);
|
||||||
|
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "ABSENCE") {
|
||||||
|
this.getAbsenceNotificationDetails(this.WorkListBodyObj);
|
||||||
|
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "PO"){
|
||||||
|
this.getPONotificationDetails(this.WorkListBodyObj);
|
||||||
|
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "MO"){
|
||||||
|
this.getMONotificationDetails(this.WorkListBodyObj);
|
||||||
|
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "PR"){
|
||||||
|
this.getPRNotificationDetails(this.WorkListBodyObj);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getPRNotificationDetails(notificationBodyObj){
|
||||||
|
this.worklistMainService
|
||||||
|
.getPRNotificationBody(notificationBodyObj)
|
||||||
|
.subscribe((result: PRNotificatonBodyResponse) => {
|
||||||
|
this.handleWorkListBodyResult(result, "PR");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
getMONotificationDetails(notificationBodyObj){
|
||||||
|
this.worklistMainService
|
||||||
|
.getMONotificationBody(notificationBodyObj)
|
||||||
|
.subscribe((result: MONotificatonBodyResponse) => {
|
||||||
|
//this.handleWorkListBodyResult(result, "MO");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
getPONotificationDetails(notificationBodyObj){
|
||||||
|
this.worklistMainService
|
||||||
|
.getPONotificationBody(notificationBodyObj)
|
||||||
|
.subscribe((result: PONotificatonBodyResponse) => {
|
||||||
|
// console.log(result.GetPoNotificationBodyList.POHeader[0].BUYER);
|
||||||
|
// this.handleWorkListBodyResult(result, "PO");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
getEITNotificationDetails(notificationBodyObj) {
|
||||||
|
this.worklistMainService
|
||||||
|
.getEITNotificationBody(notificationBodyObj)
|
||||||
|
.subscribe((result: EITNotificatonBodyResponse) => {
|
||||||
|
this.handleWorkListBodyResult(result, "EIT");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
getAbsenceNotificationDetails(notificationBodyObj) {
|
||||||
|
this.worklistMainService
|
||||||
|
.getAbsencesNotificationBody(notificationBodyObj)
|
||||||
|
.subscribe((result: AbsenceNotificatonBodyResponse) => {
|
||||||
|
this.handleWorkListBodyResult(result, "ABSENCE");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
handleWorkListBodyResult(result, Type) {
|
||||||
|
this.notificationBodyRes = {};
|
||||||
|
if (this.common.validResponse(result)) {
|
||||||
|
this.pInformation = result.P_INFORMATION;
|
||||||
|
this.pQuestion = result.P_QUESTION;
|
||||||
|
if (Type == "EIT") {
|
||||||
|
if (result.GetEITCollectionNotificationBodyList) {
|
||||||
|
this.notificationBodyRes =
|
||||||
|
result.GetEITCollectionNotificationBodyList;
|
||||||
|
}
|
||||||
|
} else if (Type == "ABSENCE") {
|
||||||
|
console.log("ABSENCE");
|
||||||
|
if (result.GetAbsenceCollectionNotificationBodyList) {
|
||||||
|
this.notificationBodyRes =
|
||||||
|
result.GetAbsenceCollectionNotificationBodyList;
|
||||||
|
}
|
||||||
|
}else if (Type == "PR") {
|
||||||
|
if (result.GetPrNotificationBodyList) {
|
||||||
|
console.log("PR");
|
||||||
|
|
||||||
|
this.PRHeader=result.GetPrNotificationBodyList.PRHeader;
|
||||||
|
this.PRLines=result.GetPrNotificationBodyList.PRLines;
|
||||||
|
|
||||||
|
this.notificationBodyRes =
|
||||||
|
result.GetPrNotificationBodyList;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} //End handleWorkListBodyResult
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
getNotificationButtons(notificationButtonsObj) {
|
||||||
|
this.worklistMainService
|
||||||
|
.getNotificationButtons(notificationButtonsObj)
|
||||||
|
.subscribe((result: NotificatonButtonResponse) => {
|
||||||
|
this.handleWorkListButtonsResult(result);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
handleWorkListButtonsResult(result) {
|
||||||
|
if (this.common.validResponse(result)) {
|
||||||
|
// this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA);
|
||||||
|
if (result.GetNotificationButtonsList != null) {
|
||||||
|
this.notificationButtonRes = result.GetNotificationButtonsList;
|
||||||
|
} // if result == null
|
||||||
|
} // valid it
|
||||||
|
} // End handleWorkListButtonsResult
|
||||||
|
|
||||||
|
applyAction(WorkListActionObj) {
|
||||||
|
this.worklistMainService
|
||||||
|
.actionButton(WorkListActionObj)
|
||||||
|
.subscribe((result: any) => {
|
||||||
|
this.handleApplayActionResult(result);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
handleApplayActionResult(result) {
|
||||||
|
if (this.common.validResponse(result)) {
|
||||||
|
if (result.MessageStatus == 1) {
|
||||||
|
// this.navCtrl.push("HomePage");
|
||||||
|
//this.common.openHome();
|
||||||
|
//this.common.openNotificationPage();
|
||||||
|
// for( var i = 0; i < this.notificationArray.length; i++){
|
||||||
|
// if ( this.notificationArray[i].ROW_NUM === this.getPassNotificationDetails.ROW_NUM) {
|
||||||
|
// this.notificationArray.splice(i, 1);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
this.getNotificationCountAfterSubmit();
|
||||||
|
this.nextNotfification();
|
||||||
|
}
|
||||||
|
} // valid it
|
||||||
|
}
|
||||||
|
|
||||||
|
public nextNotfification() {
|
||||||
|
//let itemExist = false;
|
||||||
|
let itemNo = this.getPassNotificationDetails.ROW_NUM;
|
||||||
|
itemNo += 1;
|
||||||
|
if (itemNo > this.notificationArray.length) {
|
||||||
|
this.common.openNotificationPage();
|
||||||
|
} else {
|
||||||
|
for (let i = 0; i <= this.notificationArray.length; i++) {
|
||||||
|
if (this.notificationArray[i].ROW_NUM == itemNo) {
|
||||||
|
this.common.sharedService.setSharedData(this.notificationArray[i], HomeComponent.NOTIFICATION_DATA);
|
||||||
|
// itemExist = true;
|
||||||
|
this.intializeNotificationDetail();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// if(itemExist==false){
|
||||||
|
// this.nextNotfification();
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
actionButton() {
|
||||||
|
let ButtonAction: string = this.actionType;
|
||||||
|
var responseAttrDic = this.notExampleJsonObject;
|
||||||
|
this.P_RESPOND_ATTRIBUTES_TBL = [];
|
||||||
|
for (let i=0;i<this.notificationDynamicAttributeArr.length;i++) {
|
||||||
|
let obj: any = {};
|
||||||
|
obj.ATTRIBUTE_NAME = this.notificationDynamicAttributeArr[i].ATTRIBUTE_NAME;
|
||||||
|
if (this.notificationDynamicAttributeArr[i].ATTRIBUTE_TYPE === "number") {
|
||||||
|
obj.ATTRIBUTE_NUMBER_VALUE = (document.getElementById(this.notificationDynamicAttributeArr[i].ATTRIBUTE_NAME) as HTMLInputElement).value;
|
||||||
|
}
|
||||||
|
// else if (isDate(responseAttrDic[key])) {
|
||||||
|
// obj.ATTRIBUTE_DATE_VALUE = responseAttrDic[key];
|
||||||
|
// }
|
||||||
|
else if(this.notificationDynamicAttributeArr[i].ATTRIBUTE_TYPE=="VARCHAR2") {
|
||||||
|
obj.ATTRIBUTE_TEXT_VALUE =(document.getElementById(this.notificationDynamicAttributeArr[i].ATTRIBUTE_NAME) as HTMLInputElement).value;
|
||||||
|
}
|
||||||
|
this.P_RESPOND_ATTRIBUTES_TBL.push(obj);
|
||||||
|
}
|
||||||
|
let repUserName = this.selEmployeeID;
|
||||||
|
if (this.hideForwordEmployee && this.hideForwordEmployee.ATTRIBUTE_NAME) {
|
||||||
|
let obj: any = {};
|
||||||
|
repUserName = "";
|
||||||
|
obj.ATTRIBUTE_NAME = this.hideForwordEmployee.ATTRIBUTE_NAME;
|
||||||
|
obj.ATTRIBUTE_TEXT_VALUE = this.selEmployeeID;
|
||||||
|
this.P_RESPOND_ATTRIBUTES_TBL.push(obj);
|
||||||
|
}
|
||||||
|
if (
|
||||||
|
ButtonAction == "APPROVED" ||
|
||||||
|
ButtonAction == "REJECTED" ||
|
||||||
|
ButtonAction == "DEL" ||
|
||||||
|
ButtonAction == "CLOSE"
|
||||||
|
) {
|
||||||
|
this.WorkListActionObj.P_FORWARD_TO_USER_NAME = "";
|
||||||
|
this.WorkListActionObj.P_ACTION_MODE = ButtonAction;
|
||||||
|
this.WorkListActionObj.P_COMMENTS = "";
|
||||||
|
this.WorkListActionObj.RespondAttributeList = this.P_RESPOND_ATTRIBUTES_TBL;
|
||||||
|
this.applyAction(this.WorkListActionObj);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ButtonAction == "RFC") {
|
||||||
|
// alert("Return For Correction");
|
||||||
|
this.WorkListActionObj.P_ACTION_MODE = ButtonAction;
|
||||||
|
// this.navCtrl.push("WorkListRfcPage", {
|
||||||
|
// passNotificationInfo: this.getPassNotificationDetails,
|
||||||
|
// passActionMode: ButtonAction,
|
||||||
|
// passResAttr: this.P_RESPOND_ATTRIBUTES_TBL
|
||||||
|
// });
|
||||||
|
this.common.sharedService.setSharedData(
|
||||||
|
this.getPassNotificationDetails,
|
||||||
|
WorklistMainPRComponent.PASS_NOTIFICATION_INFO
|
||||||
|
);
|
||||||
|
this.common.sharedService.setSharedData(
|
||||||
|
ButtonAction,
|
||||||
|
WorklistMainPRComponent.PASS_ACTION_MODE
|
||||||
|
);
|
||||||
|
this.common.sharedService.setSharedData(
|
||||||
|
this.P_RESPOND_ATTRIBUTES_TBL,
|
||||||
|
WorklistMainPRComponent.PASS_RES_ATTR
|
||||||
|
);
|
||||||
|
this.common.openWorklistRFCPage();
|
||||||
|
} else if (ButtonAction == "ANSWER_INFO") {
|
||||||
|
// this.navCtrl.push("WorkListReplacmentRollPage", {
|
||||||
|
// pQuestion: this.pQuestion,
|
||||||
|
// passNotificationInfo: this.getPassNotificationDetails,
|
||||||
|
// passActionMode: ButtonAction,
|
||||||
|
// passResAttr: this.P_RESPOND_ATTRIBUTES_TBL
|
||||||
|
// });
|
||||||
|
this.common.sharedService.setSharedData(this.pQuestion, "pQuestion");
|
||||||
|
this.common.sharedService.setSharedData(
|
||||||
|
this.getPassNotificationDetails,
|
||||||
|
WorklistMainPRComponent.PASS_NOTIFICATION_INFO
|
||||||
|
);
|
||||||
|
this.common.sharedService.setSharedData(
|
||||||
|
ButtonAction,
|
||||||
|
WorklistMainPRComponent.PASS_ACTION_MODE
|
||||||
|
);
|
||||||
|
this.common.sharedService.setSharedData(
|
||||||
|
this.P_RESPOND_ATTRIBUTES_TBL,
|
||||||
|
WorklistMainPRComponent.PASS_RES_ATTR
|
||||||
|
);
|
||||||
|
this.common.openWorklistRollReplacement();
|
||||||
|
} else if (
|
||||||
|
ButtonAction == "DELEGATE" ||
|
||||||
|
ButtonAction == "REQUEST_INFO" ||
|
||||||
|
ButtonAction == "TRANSFER" ||
|
||||||
|
ButtonAction == "TRANSFER_INFO"
|
||||||
|
) {
|
||||||
|
// alert("multi option: "+ ButtonAction);
|
||||||
|
this.WorkListActionObj.P_ACTION_MODE = ButtonAction;
|
||||||
|
// this.navCtrl.push("WorkListReplacmentRollPage", {
|
||||||
|
// passNotificationInfo: this.getPassNotificationDetails,
|
||||||
|
// passActionMode: ButtonAction,
|
||||||
|
// passResAttr: this.P_RESPOND_ATTRIBUTES_TBL
|
||||||
|
// });
|
||||||
|
this.common.sharedService.setSharedData(
|
||||||
|
this.getPassNotificationDetails,
|
||||||
|
WorklistMainPRComponent.PASS_NOTIFICATION_INFO
|
||||||
|
);
|
||||||
|
this.common.sharedService.setSharedData(
|
||||||
|
ButtonAction,
|
||||||
|
WorklistMainPRComponent.PASS_ACTION_MODE
|
||||||
|
);
|
||||||
|
this.common.sharedService.setSharedData(
|
||||||
|
this.P_RESPOND_ATTRIBUTES_TBL,
|
||||||
|
WorklistMainPRComponent.PASS_RES_ATTR
|
||||||
|
);
|
||||||
|
this.common.openWorklistRollReplacement();
|
||||||
|
} else if (
|
||||||
|
ButtonAction == "UPDATE_ACTION" ||
|
||||||
|
ButtonAction == "CONTINUE_ACTION"
|
||||||
|
) {
|
||||||
|
if (this.getPassNotificationDetails.REQUEST_TYPE == "EIT") {
|
||||||
|
this.common.sharedService.setSharedData(
|
||||||
|
this.notificationBodyRes,
|
||||||
|
EITNotificatonBodyResponse.SHARED_DATA
|
||||||
|
);
|
||||||
|
this.common.sharedService.setSharedData(
|
||||||
|
this.getPassNotificationDetails,
|
||||||
|
EITNotificatonBodyResponse.NOT_WORKLIST
|
||||||
|
);
|
||||||
|
// this.navCtrl.push("EitUpdateListPage");
|
||||||
|
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "ABSENCE") {
|
||||||
|
this.common.sharedService.setSharedData(
|
||||||
|
this.notificationBodyRes,
|
||||||
|
AbsenceNotificatonBodyResponse.SHARED_DATA
|
||||||
|
);
|
||||||
|
this.common.sharedService.setSharedData(
|
||||||
|
this.getPassNotificationDetails,
|
||||||
|
AbsenceNotificatonBodyResponse.NOT_WORKLIST
|
||||||
|
);
|
||||||
|
// this.navCtrl.push("SubmitAbsencePage", {
|
||||||
|
// dirfromNotificationPage: true,
|
||||||
|
// submitAbsObjList: this.notificationBodyRes[0].Collection_Notification
|
||||||
|
// });
|
||||||
|
this.common.openConfirmAbsece();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (this.notificationButtonRes.length > 0 && !ButtonAction) {
|
||||||
|
(this.elementRef.nativeElement.querySelectorAll(
|
||||||
|
"ion-item"
|
||||||
|
) as HTMLElement[]).forEach(x => {
|
||||||
|
if (x.classList.contains("requiredItem")) {
|
||||||
|
x.classList.add("ng-touched");
|
||||||
|
x.classList.remove("ng-untouched");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.common.presentAlert(
|
||||||
|
this.ts.trPK("worklistMain", "actionRequird")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
openActionHistory() {
|
||||||
|
// this.navCtrl.push("WorkListActionHistoryPage", {
|
||||||
|
// passNotificationInfo: this.getPassNotificationDetails
|
||||||
|
// });
|
||||||
|
this.common.sharedService.setSharedData(
|
||||||
|
this.getPassNotificationDetails,
|
||||||
|
WorklistMainPRComponent.PASS_NOTIFICATION_INFO
|
||||||
|
);
|
||||||
|
this.common.openWorklistHistoryPage();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
openSupportDocuments() {
|
||||||
|
// this.navCtrl.push("WorkListAttachPage", {
|
||||||
|
// passNotificationInfo: this.getPassNotificationDetails
|
||||||
|
// });
|
||||||
|
this.common.sharedService.setSharedData(
|
||||||
|
this.getPassNotificationDetails,
|
||||||
|
WorklistMainPRComponent.PASS_NOTIFICATION_INFO
|
||||||
|
);
|
||||||
|
this.common.openWorklistAttachPage();
|
||||||
|
}
|
||||||
|
|
||||||
|
getNotificationResAttr(notificationButtonsObj) {
|
||||||
|
this.worklistMainService
|
||||||
|
.notificationResponseAttr(notificationButtonsObj)
|
||||||
|
.subscribe((result: NotificatonButtonResponse) => {
|
||||||
|
this.handleNotificationResAttrResult(result);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
handleNotificationResAttrResult(result) {
|
||||||
|
if (this.common.validResponse(result)) {
|
||||||
|
// this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA);
|
||||||
|
this.NotRespondAttributeList =
|
||||||
|
result.NotificationGetRespondAttributesList;
|
||||||
|
if (
|
||||||
|
result.NotificationRespondRolesList != "" &&
|
||||||
|
result.NotificationRespondRolesList[0].ATTRIBUTE_NAME != null &&
|
||||||
|
result.NotificationRespondRolesList[0].ATTRIBUTE_NAME != undefined
|
||||||
|
) {
|
||||||
|
this.Resp2_val = result.NotificationRespondRolesList[0].ATTRIBUTE_NAME;
|
||||||
|
this.hideForwordEmployee = result.NotificationRespondRolesList[0];
|
||||||
|
}
|
||||||
|
this.notificationDynamicFields(result.NotificationGetRespondAttributesList);
|
||||||
|
this.notificationDynamicAttributeArr=result.NotificationGetRespondAttributesList;
|
||||||
|
if (result.P_Schema) this.schemaNotific = JSON.parse(result.P_Schema);
|
||||||
|
} // valid it
|
||||||
|
} // End handleWorkListButtonsResult
|
||||||
|
|
||||||
|
notificationDynamicFields(notificationAttr){
|
||||||
|
const containerId = 'notificationDynamicFields';
|
||||||
|
for(let i=0;i<notificationAttr.length;i++){
|
||||||
|
if(notificationAttr[i].ATTRIBUTE_TYPE=="VARCHAR2"){
|
||||||
|
this.textArea = new TextAreaInput(notificationAttr[i].ATTRIBUTE_DISPLAY_NAME, notificationAttr[i].ATTRIBUTE_NAME, "", containerId,"","","");
|
||||||
|
}else if(notificationAttr[i].ATTRIBUTE_TYPE=="ROLE"){
|
||||||
|
|
||||||
|
}else if(notificationAttr[i].ATTRIBUTE_TYPE=="DATE"){
|
||||||
|
|
||||||
|
}else if(notificationAttr[i].ATTRIBUTE_TYPE=="NUMBER"){
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
openNotificationBody() {
|
||||||
|
if (this.getPassNotificationDetails.REQUEST_TYPE == "EIT") {
|
||||||
|
this.common.sharedService.setSharedData(
|
||||||
|
this.notificationBodyRes,
|
||||||
|
EITNotificatonBodyResponse.SHARED_DATA
|
||||||
|
);
|
||||||
|
this.common.sharedService.setSharedData(
|
||||||
|
this.getPassNotificationDetails,
|
||||||
|
EITNotificatonBodyResponse.NOT_WORKLIST
|
||||||
|
);
|
||||||
|
// this.navCtrl.push("WorkListDetailsPage", { NotBodyType: "EIT" });
|
||||||
|
this.common.sharedService.setSharedData("EIT", "NotBodyType");
|
||||||
|
this.common.openNotificationDetailsPage();
|
||||||
|
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "ABSENCE") {
|
||||||
|
this.common.sharedService.setSharedData(
|
||||||
|
this.notificationBodyRes,
|
||||||
|
AbsenceNotificatonBodyResponse.SHARED_DATA
|
||||||
|
);
|
||||||
|
this.common.sharedService.setSharedData(
|
||||||
|
this.getPassNotificationDetails,
|
||||||
|
AbsenceNotificatonBodyResponse.NOT_WORKLIST
|
||||||
|
);
|
||||||
|
this.common.sharedService.setSharedData("ABSENCE", "NotBodyType");
|
||||||
|
//this.navCtrl.push("WorkListDetailsPage", { NotBodyType: "ABSENCE" });
|
||||||
|
this.common.openNotificationDetailsPage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
getNotificationCountAfterSubmit() {
|
||||||
|
const req: any = {};
|
||||||
|
this.menuService.getNotificationCount(req).subscribe((result: any) => {
|
||||||
|
if (this.common.validResponse(result)) {
|
||||||
|
this.notificationCount =
|
||||||
|
result.GetOpenNotificationsNumList.P_OPEN_NOTIFICATIONS_NUM;
|
||||||
|
if (this.notificationCount <= 0) {
|
||||||
|
this.notificationCount = null;
|
||||||
|
}
|
||||||
|
this.events.publish("getNotCount", this.notificationCount);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
getAttachmentNotification(WorkListAttachObj) {
|
||||||
|
|
||||||
|
this.worklistAttachService.getAttach(WorkListAttachObj).
|
||||||
|
subscribe((result: NotificationGetAttachResponse) => {
|
||||||
|
this.handleWorkListAttachResult(result);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
handleWorkListAttachResult(result) {
|
||||||
|
if (this.common.validResponse(result)) {
|
||||||
|
// this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA);
|
||||||
|
if (result.GetAttachementList != null) {
|
||||||
|
this.attachmentRes = result.GetAttachementList;
|
||||||
|
} // if result == null
|
||||||
|
} // valid it
|
||||||
|
}
|
||||||
|
|
||||||
|
getActionHistory(WorkListActionHistoryObj) {
|
||||||
|
this.IsReachEnd = false;
|
||||||
|
this.worklistService.getActionHistory(WorkListActionHistoryObj).
|
||||||
|
subscribe((result: WorkListActionHistoryResponse) => {
|
||||||
|
this.handleWorkListActionHistoryResult(result);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
handleWorkListActionHistoryResult(result) {
|
||||||
|
if (this.common.validResponse(result)) {
|
||||||
|
if (this.common.hasData(result.GetActionHistoryList)) {
|
||||||
|
this.actionHistoryRes = result.GetActionHistoryList;
|
||||||
|
this.P_PAGE_NUM++;
|
||||||
|
let lastItemIndex = this.actionHistoryRes.length - 1;
|
||||||
|
if (result.GetActionHistoryList[lastItemIndex]) {
|
||||||
|
let lastitem = result.GetActionHistoryList[lastItemIndex];
|
||||||
|
if (lastitem.NO_OF_ROWS == lastitem.ROW_NUM) {
|
||||||
|
this.IsReachEnd = true;
|
||||||
|
} else {
|
||||||
|
this.IsReachEnd = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async openNoteDetail(note,sender) {
|
||||||
|
// let modalPage = this.modalCtrl.create('ViewNoteModalPage', { textNote: note });
|
||||||
|
// modalPage.present();
|
||||||
|
console.log("note"+note);
|
||||||
|
|
||||||
|
this.common.sharedService.setSharedData(note, 'ViewNoteModalPage')
|
||||||
|
this.common.sharedService.setSharedData(sender,'ViewNoteModalPageSender')
|
||||||
|
|
||||||
|
const modal = await this.modalCtrl.create({
|
||||||
|
component: ViewNoteModalComponent,
|
||||||
|
backdropDismiss:false,
|
||||||
|
|
||||||
|
});
|
||||||
|
modal.cssClass = 'note-modal';
|
||||||
|
|
||||||
|
return await modal.present();
|
||||||
|
}
|
||||||
|
|
||||||
|
doInfinite(infiniteScroll) {
|
||||||
|
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());
|
||||||
|
}// if list length >0
|
||||||
|
else {
|
||||||
|
this.IsReachEnd = true;
|
||||||
|
}
|
||||||
|
}// if response == 1
|
||||||
|
//this.pageNum++;
|
||||||
|
infiniteScroll.target.complete();
|
||||||
|
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
if (infiniteScroll)
|
||||||
|
infiniteScroll.target.complete();
|
||||||
|
}
|
||||||
|
}//end infiniteScroll
|
||||||
|
|
||||||
|
//**********Attachment *****************//
|
||||||
|
|
||||||
|
|
||||||
|
async OpenAttachFiles(value, Type) {
|
||||||
|
// let modal: Modal = this.modalCtrl.create('WorkListAttachViewPage', { displayData: value, TypeData: Type });
|
||||||
|
// modal.present();
|
||||||
|
|
||||||
|
this.common.sharedService.setSharedData({ displayData: value, TypeData: Type }, 'WorkListAttachViewPage')
|
||||||
|
const modal = await this.modalCtrl.create({
|
||||||
|
component: WorkListAttachViewComponent
|
||||||
|
});
|
||||||
|
|
||||||
|
return await modal.present();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 764 B |
Loading…
Reference in New Issue