add fix ok button

ashwaq-fix-bug
ashwaq 6 years ago
parent 60206ffddd
commit f3f1e6c8d0

@ -17,7 +17,7 @@ style="margin-right: -22px;margin-top: -10px;">
</ion-list-header> </ion-list-header>
<div *ngFor="let button of actionBtns "> <div *ngFor="let button of actionBtns ">
<ion-item *ngIf="button.BUTTON_ACTION !='APPROVED' && button.BUTTON_ACTION !='APPROVE' && button.BUTTON_ACTION !='REJECTED' && button.BUTTON_ACTION !='REJECT' && button.BUTTON_ACTION !='REQUEST_INFO' " > <ion-item *ngIf="button.BUTTON_ACTION !='APPROVED' && button.BUTTON_ACTION !='APPROVE' && button.BUTTON_ACTION !='REJECTED' && button.BUTTON_ACTION !='REJECT' && button.BUTTON_ACTION !='REQUEST_INFO' && button.BUTTON_ACTION !='CLOSE' " >
<ion-label class="labelRadio"> {{button.BUTTON_LABEL}}</ion-label> <ion-label class="labelRadio"> {{button.BUTTON_LABEL}}</ion-label>
<ion-radio color="secondary" mode="md" value="{{button.BUTTON_ACTION}}" (ionSelect)="radioSelect(button)"></ion-radio> <ion-radio color="secondary" mode="md" value="{{button.BUTTON_ACTION}}" (ionSelect)="radioSelect(button)"></ion-radio>

@ -16,7 +16,7 @@
<ion-segment-button value="item-req" [ngClass]="activeSegment == 'item-req' ? 'active-Segment' : 'normal-Segment'"> <ion-segment-button value="item-req" [ngClass]="activeSegment == 'item-req' ? 'active-Segment' : 'normal-Segment'">
<ion-label>{{ts.trPK('worklistMain','itemReq')}}</ion-label> <ion-label>{{'worklistMain , itemReq'| translate}}</ion-label>
</ion-segment-button> </ion-segment-button>
@ -33,7 +33,7 @@
</ion-segment-button> </ion-segment-button>
<ion-segment-button value="info" [ngClass]="activeSegment == 'info' ? 'active-Segment' : 'normal-Segment'"> <ion-segment-button value="info" [ngClass]="activeSegment == 'info' ? 'active-Segment' : 'normal-Segment'">
<ion-label> {{ts.trPK('worklistMain','info')}}</ion-label> <ion-label> {{'worklistMain , info'| translate}}</ion-label>
</ion-segment-button> </ion-segment-button>
</ion-segment> </ion-segment>
@ -646,6 +646,12 @@
<!-- <ion-label> {{'worklistMain, approve' | translate}}</ion-label> --> <!-- <ion-label> {{'worklistMain, approve' | translate}}</ion-label> -->
</ion-tab-button> </ion-tab-button>
<ion-tab-button *ngIf="closeDis" (click)="actionButton('CLOSE')">
<img src="../assets/imgs/action-approve.png">
<!-- <ion-label> {{'worklistMain, approve' | translate}}</ion-label> -->
<ion-label style="white-space: nowrap"> {{close_label}}</ion-label>
</ion-tab-button>
<ion-tab-button *ngIf="rejectDis" (click)="actionButton('REJECTED')"> <ion-tab-button *ngIf="rejectDis" (click)="actionButton('REJECTED')">
<img src="../assets/imgs/action-reject.png"> <img src="../assets/imgs/action-reject.png">
<ion-label style="white-space: nowrap"> {{reject_label}}</ion-label> <ion-label style="white-space: nowrap"> {{reject_label}}</ion-label>

@ -113,6 +113,8 @@ export class WorklistMainMRComponent implements OnInit {
approve_label: any =""; approve_label: any ="";
reject_label: any=""; reject_label: any="";
reqInfo_label: any=""; reqInfo_label: any="";
close_label: any;
closeDis: boolean = false;
constructor( constructor(
@ -154,6 +156,7 @@ export class WorklistMainMRComponent implements OnInit {
this.approveDis = false; this.approveDis = false;
this.rejectDis = false; this.rejectDis = false;
this.requestDis = false; this.requestDis = false;
this.closeDis = false;
this.moreDisabled = true; this.moreDisabled = true;
if (this.messageSuccess) { if (this.messageSuccess) {
@ -299,8 +302,13 @@ export class WorklistMainMRComponent implements OnInit {
this.requestDis = true; this.requestDis = true;
} // if result == null } // if result == null
else if // if result == null
(this.notificationButtonRes[i].BUTTON_ACTION == "CLOSE") {
this.close_label = this.notificationButtonRes[i].BUTTON_LABEL;
this.closeDis = true;
}
else if( else if(
this.notificationButtonRes[i].BUTTON_ACTION != "APPROVED" && this.notificationButtonRes[i].BUTTON_ACTION != "REJECTED" && this.notificationButtonRes[i].BUTTON_ACTION != "REQUEST_INFO") this.notificationButtonRes[i].BUTTON_ACTION != "APPROVED" && this.notificationButtonRes[i].BUTTON_ACTION != "REJECTED" && this.notificationButtonRes[i].BUTTON_ACTION != "REQUEST_INFO" && this.notificationButtonRes[i].BUTTON_ACTION != "CLOSE")
{ {
this.moreDisabled = false; this.moreDisabled = false;

@ -15,7 +15,7 @@
<ion-segment-button value="line_details" <ion-segment-button value="line_details"
[ngClass]="activeSegment == 'line_details' ? 'active-Segment' : 'normal-Segment'"> [ngClass]="activeSegment == 'line_details' ? 'active-Segment' : 'normal-Segment'">
<ion-label> {{ts.trPK('worklistMain','line_details')}} </ion-label> <ion-label> {{'worklistMain,line_details'| translate}} </ion-label>
</ion-segment-button> </ion-segment-button>
<ion-segment-button value="action-history" <ion-segment-button value="action-history"
@ -30,7 +30,7 @@
</ion-segment-button> </ion-segment-button>
<ion-segment-button checked value="info" [ngClass]="activeSegment == 'info' ? 'active-Segment' : 'normal-Segment'" > <ion-segment-button checked value="info" [ngClass]="activeSegment == 'info' ? 'active-Segment' : 'normal-Segment'" >
<ion-label> {{ts.trPK('worklistMain','info')}} </ion-label> <ion-label> {{'worklistMain, info'| translate}} </ion-label>
</ion-segment-button> </ion-segment-button>
</ion-segment> </ion-segment>
@ -778,6 +778,13 @@
<ion-label style="white-space: nowrap"> {{approve_label}}</ion-label> <ion-label style="white-space: nowrap"> {{approve_label}}</ion-label>
</ion-tab-button>
<ion-tab-button *ngIf="closeDis" (click)="actionButton('CLOSE')">
<img src="../assets/imgs/action-approve.png">
<!-- <ion-label> {{'worklistMain, approve' | translate}}</ion-label> -->
<ion-label style="white-space: nowrap"> {{close_label}}</ion-label>
</ion-tab-button> </ion-tab-button>
<ion-tab-button *ngIf="rejectDis" (click)="actionButton('REJECT')"> <ion-tab-button *ngIf="rejectDis" (click)="actionButton('REJECT')">

@ -125,6 +125,8 @@ export class WorklistMainPoComponent implements OnInit {
approve_label: any; approve_label: any;
reject_label: any; reject_label: any;
reqInfo_label: any; reqInfo_label: any;
closeDis: boolean = false;;
close_label: any;
constructor( constructor(
public common: CommonService, public common: CommonService,
@ -158,6 +160,7 @@ export class WorklistMainPoComponent implements OnInit {
this.approveDis = false; this.approveDis = false;
this.rejectDis = false; this.rejectDis = false;
this.requestDis = false; this.requestDis = false;
this.closeDis=false;
this.moreDisabled = true; this.moreDisabled = true;
if (this.messageSuccess) { if (this.messageSuccess) {
@ -327,8 +330,13 @@ export class WorklistMainPoComponent implements OnInit {
this.requestDis = true; this.requestDis = true;
} // if result == null } // if result == null
else if // if result == null
(this.notificationButtonRes[i].BUTTON_ACTION == "CLOSE") {
this.close_label = this.notificationButtonRes[i].BUTTON_LABEL;
this.closeDis = true;
}
else if ( else if (
this.notificationButtonRes[i].BUTTON_ACTION != "APPROVE" && this.notificationButtonRes[i].BUTTON_ACTION != "REJECT" && this.notificationButtonRes[i].BUTTON_ACTION != "REQUEST_INFO") this.notificationButtonRes[i].BUTTON_ACTION != "APPROVE" && this.notificationButtonRes[i].BUTTON_ACTION != "REJECT" && this.notificationButtonRes[i].BUTTON_ACTION != "REQUEST_INFO" && this.notificationButtonRes[i].BUTTON_ACTION != "CLOSE")
{ {
this.moreDisabled = false; this.moreDisabled = false;

@ -15,7 +15,7 @@
<ion-segment-button value="item-req" <ion-segment-button value="item-req"
[ngClass]="activeSegment == 'item-req' ? 'active-Segment' : 'normal-Segment'"> [ngClass]="activeSegment == 'item-req' ? 'active-Segment' : 'normal-Segment'">
<ion-label> {{ts.trPK('worklistMain','itemReq')}} </ion-label> <ion-label> {{'worklistMain, itemReq'| translate}} </ion-label>
</ion-segment-button> </ion-segment-button>
<ion-segment-button value="action-history" <ion-segment-button value="action-history"
[ngClass]="activeSegment == 'action-history' ? 'active-Segment' : 'normal-Segment'"> [ngClass]="activeSegment == 'action-history' ? 'active-Segment' : 'normal-Segment'">
@ -30,7 +30,7 @@
<ion-segment-button checked value="info" <ion-segment-button checked value="info"
[ngClass]="activeSegment == 'info' ? 'active-Segment' : 'normal-Segment'"> [ngClass]="activeSegment == 'info' ? 'active-Segment' : 'normal-Segment'">
<ion-label> {{ts.trPK('worklistMain','info')}} </ion-label> <ion-label> {{'worklistMain, info'| translate}} </ion-label>
</ion-segment-button> </ion-segment-button>
</ion-segment> </ion-segment>
@ -492,6 +492,13 @@
</ion-tab-button> </ion-tab-button>
<ion-tab-button *ngIf="closeDis" (click)="actionButton('CLOSE')">
<img src="../assets/imgs/action-approve.png">
<!-- <ion-label> {{'worklistMain, approve' | translate}}</ion-label> -->
<ion-label style="white-space: nowrap"> {{close_label}}</ion-label>
</ion-tab-button>
<ion-tab-button *ngIf="rejectDis" (click)="actionButton('REJECT')"> <ion-tab-button *ngIf="rejectDis" (click)="actionButton('REJECT')">
<img src="../assets/imgs/action-reject.png"> <img src="../assets/imgs/action-reject.png">
<!-- <ion-label> {{'worklistMain, reject' | translate}}</ion-label> --> <!-- <ion-label> {{'worklistMain, reject' | translate}}</ion-label> -->

@ -110,6 +110,8 @@ export class WorklistMainPRComponent implements OnInit {
approve_label: any; approve_label: any;
reject_label: any; reject_label: any;
reqInfo_label: any; reqInfo_label: any;
close_label: any;
closeDis: boolean = false;
constructor( constructor(
@ -149,6 +151,7 @@ export class WorklistMainPRComponent implements OnInit {
this.approveDis = false; this.approveDis = false;
this.rejectDis = false; this.rejectDis = false;
this.requestDis = false; this.requestDis = false;
this.closeDis =false;
this.moreDisabled = true; this.moreDisabled = true;
if (this.messageSuccess) { if (this.messageSuccess) {
@ -328,8 +331,13 @@ export class WorklistMainPRComponent implements OnInit {
this.requestDis = true; this.requestDis = true;
} // if result == null } // if result == null
else if // if result == null
(this.notificationButtonRes[i].BUTTON_ACTION == "CLOSE") {
this.close_label = this.notificationButtonRes[i].BUTTON_LABEL;
this.closeDis = true;
}
else if ( else if (
this.notificationButtonRes[i].BUTTON_ACTION != "APPROVE" && this.notificationButtonRes[i].BUTTON_ACTION != "REJECT" && this.notificationButtonRes[i].BUTTON_ACTION != "REQUEST_INFO") this.notificationButtonRes[i].BUTTON_ACTION != "APPROVE" && this.notificationButtonRes[i].BUTTON_ACTION != "REJECT" && this.notificationButtonRes[i].BUTTON_ACTION != "REQUEST_INFO" && this.notificationButtonRes[i].BUTTON_ACTION != "CLOSE")
{ {
this.moreDisabled = false; this.moreDisabled = false;

@ -15,7 +15,7 @@
<ion-segment-button value="item-req" <ion-segment-button value="item-req"
[ngClass]="activeSegment == 'item-req' ? 'active-Segment' : 'normal-Segment'"> [ngClass]="activeSegment == 'item-req' ? 'active-Segment' : 'normal-Segment'">
<ion-label> {{ts.trPK('worklistMain','details-emp')}}</ion-label> <ion-label> {{'worklistMain, details-emp'| translate}}</ion-label>
</ion-segment-button> </ion-segment-button>
<ion-segment-button value="action-history" <ion-segment-button value="action-history"
@ -28,7 +28,7 @@
</ion-segment-button> </ion-segment-button>
<ion-segment-button value="info" [ngClass]="activeSegment == 'info' ? 'active-Segment' : 'normal-Segment'"> <ion-segment-button value="info" [ngClass]="activeSegment == 'info' ? 'active-Segment' : 'normal-Segment'">
<ion-label> {{ts.trPK('worklistMain','info')}} </ion-label> <ion-label> {{'worklistMain, info'| translate}} </ion-label>
</ion-segment-button> </ion-segment-button>
</ion-segment> </ion-segment>
@ -513,6 +513,12 @@
<!-- <ion-label> {{'worklistMain, approve' | translate}}</ion-label> --> <!-- <ion-label> {{'worklistMain, approve' | translate}}</ion-label> -->
<ion-label style="white-space: nowrap"> {{approve_label}}</ion-label> <ion-label style="white-space: nowrap"> {{approve_label}}</ion-label>
</ion-tab-button>
<ion-tab-button *ngIf="closeDis" (click)="actionButton('CLOSE')">
<img src="../assets/imgs/action-approve.png">
<!-- <ion-label> {{'worklistMain, approve' | translate}}</ion-label> -->
<ion-label style="white-space: nowrap"> {{close_label}}</ion-label>
</ion-tab-button> </ion-tab-button>
<ion-tab-button *ngIf="rejectDis" (click)="actionButton('REJECTED')"> <ion-tab-button *ngIf="rejectDis" (click)="actionButton('REJECTED')">

@ -53,8 +53,8 @@ export class WorklistMainComponent implements OnInit {
getPassNotificationDetails: any; getPassNotificationDetails: any;
public static PASS_RES_ATTR = "passResAttr"; public static PASS_RES_ATTR = "passResAttr";
TransactionID: number = -999; TransactionID: number = -999;
notificationBodyRes: any =[]; notificationBodyRes: any = [];
actionHistoryRes: any =[]; actionHistoryRes: any = [];
notificationButtonRes: any; notificationButtonRes: any;
actionMode: any; actionMode: any;
pInformation: string = ""; pInformation: string = "";
@ -70,7 +70,7 @@ export class WorklistMainComponent implements OnInit {
P_RESPOND_ATTRIBUTES_TBL: any; P_RESPOND_ATTRIBUTES_TBL: any;
selEmployeeID: any; selEmployeeID: any;
actionType: string = ""; actionType: string = "";
notificationArray: any =[]; notificationArray: any = [];
notificationDynamicAttributeArr: any; notificationDynamicAttributeArr: any;
private textInput: TextInput; private textInput: TextInput;
private textArea: TextAreaInput; private textArea: TextAreaInput;
@ -80,7 +80,7 @@ export class WorklistMainComponent implements OnInit {
notificationCount: any; notificationCount: any;
activeSegment: any = "item-req"; activeSegment: any = "item-req";
lines_note_limit: any = 24; lines_note_limit: any = 24;
attachmentRes: any =[]; attachmentRes: any = [];
private WorkListActionHistoryObj: WorkListActionHistoryRequest; private WorkListActionHistoryObj: WorkListActionHistoryRequest;
IsReachEnd: boolean = true; IsReachEnd: boolean = true;
notiActionBtnMore: any = []; notiActionBtnMore: any = [];
@ -88,7 +88,7 @@ export class WorklistMainComponent implements OnInit {
confirmMsg: string; confirmMsg: string;
newArr: any = []; newArr: any = [];
selEmp: any; selEmp: any;
subordinatesleaveList: any =[]; subordinatesleaveList: any = [];
private WorkListSubmitterInfoObj: WorkListSubmitterInfoRequest; private WorkListSubmitterInfoObj: WorkListSubmitterInfoRequest;
submitterInfoRes: any; submitterInfoRes: any;
approveDis: boolean = false; approveDis: boolean = false;
@ -101,9 +101,11 @@ export class WorklistMainComponent implements OnInit {
public isPostNoLoad = true; public isPostNoLoad = true;
public worklistNotifications: any; public worklistNotifications: any;
public totalRequestCount = 0; public totalRequestCount = 0;
approve_label: any=""; approve_label: any = "";
reject_label: any=""; reject_label: any = "";
reqInfo_label: any=""; reqInfo_label: any = "";
close_label: any;
closeDis: boolean = false;
constructor( constructor(
public worklistService: WorklistService, public worklistService: WorklistService,
@ -143,13 +145,13 @@ export class WorklistMainComponent implements OnInit {
} }
//name=document.getElementById('notificationDynamicFields').value; //name=document.getElementById('notificationDynamicFields').value;
//removeElement('parentDiv', name);" //removeElement('parentDiv', name);"
//var navbar = document.getElementById("notificationDynamicFields").value; //var navbar = document.getElementById("notificationDynamicFields").value;
// document.querySelector('svg .gauge.chart > text').remove(); // document.querySelector('svg .gauge.chart > text').remove();
// var inputValue = (<HTMLInputElement>document.getElementById("notificationDynamicFields")).value; // var inputValue = (<HTMLInputElement>document.getElementById("notificationDynamicFields")).value;
console.log(" this.selEmp" + this.selEmp); console.log(" this.selEmp" + this.selEmp);
this.intializeNotificationDetail(); this.intializeNotificationDetail();
@ -165,10 +167,11 @@ export class WorklistMainComponent implements OnInit {
this.rejectDis = false; this.rejectDis = false;
this.requestDis = false; this.requestDis = false;
this.moreDisabled = true; this.moreDisabled = true;
this.closeDis = false;
// this.approve_label=""; // this.approve_label="";
// this.reject_label=""; // this.reject_label="";
// this.reqInfo_label=""; // this.reqInfo_label="";
if (this.messageSuccess) { if (this.messageSuccess) {
document.getElementById("notificationDynamicFields").innerHTML = ""; document.getElementById("notificationDynamicFields").innerHTML = "";
} }
@ -177,10 +180,10 @@ export class WorklistMainComponent implements OnInit {
HomeComponent.NOTIFICATION_DATA, HomeComponent.NOTIFICATION_DATA,
false false
); );
console.log("for next()"+ this.getPassNotificationDetails.ROW_NUM); console.log("for next()" + this.getPassNotificationDetails.ROW_NUM);
this.notificationArray=[] this.notificationArray = []
this.subordinatesleaveList=[]; this.subordinatesleaveList = [];
this.notificationArray = this.common.sharedService.getSharedData( this.notificationArray = this.common.sharedService.getSharedData(
HomeComponent.NOTIFICATION_ARR, HomeComponent.NOTIFICATION_ARR,
false false
@ -284,7 +287,7 @@ export class WorklistMainComponent implements OnInit {
} }
handleWorkListBodyResult(result, Type) { handleWorkListBodyResult(result, Type) {
if (this.common.validResponse(result)) { if (this.common.validResponse(result)) {
this.pInformation = result.P_INFORMATION; this.pInformation = result.P_INFORMATION;
this.pQuestion = result.P_QUESTION; this.pQuestion = result.P_QUESTION;
@ -292,17 +295,17 @@ export class WorklistMainComponent implements OnInit {
if (result.GetEITCollectionNotificationBodyList) { if (result.GetEITCollectionNotificationBodyList) {
this.notificationBodyRes = this.notificationBodyRes =
result.GetEITCollectionNotificationBodyList; result.GetEITCollectionNotificationBodyList;
if(this.notificationBodyRes[0].Collection_Notification){ if (this.notificationBodyRes[0].Collection_Notification) {
console.log(this.notificationBodyRes[0].Collection_Notification); console.log(this.notificationBodyRes[0].Collection_Notification);
} }
} }
} else if (Type == "ABSENCE") { } else if (Type == "ABSENCE") {
if (result.GetAbsenceCollectionNotificationBodyList) { if (result.GetAbsenceCollectionNotificationBodyList) {
this.notificationBodyRes = this.notificationBodyRes =
result.GetAbsenceCollectionNotificationBodyList ; result.GetAbsenceCollectionNotificationBodyList;
if(this.notificationBodyRes[0].Collection_Notification){ if (this.notificationBodyRes[0].Collection_Notification) {
console.log(this.notificationBodyRes[0].Collection_Notification); console.log(this.notificationBodyRes[0].Collection_Notification);
} }
// getDimensions(this.notificationBodyRes) { // getDimensions(this.notificationBodyRes) {
let obj = (this.notificationBodyRes[0].Collection_Notification).filter(function (list) { let obj = (this.notificationBodyRes[0].Collection_Notification).filter(function (list) {
@ -325,7 +328,7 @@ export class WorklistMainComponent implements OnInit {
getNotificationButtons(notificationButtonsObj) { getNotificationButtons(notificationButtonsObj) {
this.notificationButtonRes=[]; this.notificationButtonRes = [];
this.worklistMainService this.worklistMainService
.getNotificationButtons(notificationButtonsObj) .getNotificationButtons(notificationButtonsObj)
.subscribe((result: NotificatonButtonResponse) => { .subscribe((result: NotificatonButtonResponse) => {
@ -342,23 +345,26 @@ export class WorklistMainComponent implements OnInit {
console.log("test" + this.notificationButtonRes.length); console.log("test" + this.notificationButtonRes.length);
for (let i = 0; i < this.notificationButtonRes.length; i++) { for (let i = 0; i < this.notificationButtonRes.length; i++) {
if (this.notificationButtonRes[i].BUTTON_ACTION == "APPROVED") { if (this.notificationButtonRes[i].BUTTON_ACTION == "APPROVED") {
this.approve_label=this.notificationButtonRes[i].BUTTON_LABEL; this.approve_label = this.notificationButtonRes[i].BUTTON_LABEL;
this.approveDis = true; this.approveDis = true;
} else } else
if (this.notificationButtonRes[i].BUTTON_ACTION == "REJECTED") { if (this.notificationButtonRes[i].BUTTON_ACTION == "REJECTED") {
this.reject_label=this.notificationButtonRes[i].BUTTON_LABEL; this.reject_label = this.notificationButtonRes[i].BUTTON_LABEL;
this.rejectDis = true; this.rejectDis = true;
} else } else
if (this.notificationButtonRes[i].BUTTON_ACTION == "REQUEST_INFO") { if (this.notificationButtonRes[i].BUTTON_ACTION == "REQUEST_INFO") {
this.reqInfo_label=this.notificationButtonRes[i].BUTTON_LABEL; this.reqInfo_label = this.notificationButtonRes[i].BUTTON_LABEL;
this.requestDis = true; this.requestDis = true;
} // if result == null } else if // if result == null
else if( (this.notificationButtonRes[i].BUTTON_ACTION == "CLOSE") {
this.notificationButtonRes[i].BUTTON_ACTION != "APPROVED" && this.notificationButtonRes[i].BUTTON_ACTION != "REJECTED" && this.notificationButtonRes[i].BUTTON_ACTION != "REQUEST_INFO") this.close_label = this.notificationButtonRes[i].BUTTON_LABEL;
{ this.closeDis = true;
this.moreDisabled = false; } else if
} (this.notificationButtonRes[i].BUTTON_ACTION != "APPROVED" && this.notificationButtonRes[i].BUTTON_ACTION != "REJECTED" && this.notificationButtonRes[i].BUTTON_ACTION != "REQUEST_INFO" && this.notificationButtonRes[i].BUTTON_ACTION != "CLOSE") {
this.moreDisabled = false;
}
} // valid it } // valid it
} }
} }
@ -393,7 +399,7 @@ export class WorklistMainComponent implements OnInit {
this.nextNotfification(); this.nextNotfification();
}, 5000); }, 5000);
} }
} // valid it } // valid it
} }
@ -404,7 +410,7 @@ export class WorklistMainComponent implements OnInit {
// let itemNo = this.getPassNotificationDetails.ROW_NUM; // let itemNo = this.getPassNotificationDetails.ROW_NUM;
// itemNo += 1; // itemNo += 1;
// if (itemNo > this.notificationArray.length) { // if (itemNo > this.notificationArray.length) {
// this.common.openNotificationPage(); // this.common.openNotificationPage();
// } else { // } else {
@ -425,36 +431,36 @@ export class WorklistMainComponent implements OnInit {
public nextNotfification() { public nextNotfification() {
//let itemExist = false; //let itemExist = false;
if( document.getElementById("notificationDynamicFields") != null){ if (document.getElementById("notificationDynamicFields") != null) {
document.getElementById("notificationDynamicFields").innerHTML = ""; document.getElementById("notificationDynamicFields").innerHTML = "";
} }
let itemNo = this.getPassNotificationDetails.ROW_NUM; let itemNo = this.getPassNotificationDetails.ROW_NUM;
console.log(itemNo); console.log(itemNo);
let index = this.notificationArray.findIndex(x => x.ROW_NUM === itemNo); let index = this.notificationArray.findIndex(x => x.ROW_NUM === itemNo);
console.log(index); console.log(index);
console.log(this.notificationArray); console.log(this.notificationArray);
index += 1; index += 1;
if (index < this.notificationArray.length) { if (index < this.notificationArray.length) {
this.common.sharedService.setSharedData(this.notificationArray[index], HomeComponent.NOTIFICATION_DATA); this.common.sharedService.setSharedData(this.notificationArray[index], HomeComponent.NOTIFICATION_DATA);
if(this.notificationArray[index].REQUEST_TYPE == "PO" ){ if (this.notificationArray[index].REQUEST_TYPE == "PO") {
this.common.openWorklistMainPOPage() this.common.openWorklistMainPOPage()
}else } else
if(this.notificationArray[index].REQUEST_TYPE == "PR" ){ if (this.notificationArray[index].REQUEST_TYPE == "PR") {
this.common.openWorklistMainPRPage() this.common.openWorklistMainPRPage()
} }
else else
if(this.notificationArray[index].REQUEST_TYPE == "MO" ){ if (this.notificationArray[index].REQUEST_TYPE == "MO") {
this.common.openWorklistMainMRPage() this.common.openWorklistMainMRPage()
}else{ } else {
this.intializeNotificationDetail(); this.intializeNotificationDetail();
} }
} }
else{ else {
this.common.openNotificationPage(); this.common.openNotificationPage();
} }
} }
@ -462,7 +468,7 @@ export class WorklistMainComponent implements OnInit {
sortArray(arrayToSort: any) { sortArray(arrayToSort: any) {
return arrayToSort.sort((a: any, b: any) => return arrayToSort.sort((a: any, b: any) =>
new Date(b.BEGIN_DATE).getTime() - new Date(a.BEGIN_DATE).getTime() new Date(b.BEGIN_DATE).getTime() - new Date(a.BEGIN_DATE).getTime()
); );
} }
@ -485,7 +491,7 @@ export class WorklistMainComponent implements OnInit {
} }
this.P_RESPOND_ATTRIBUTES_TBL.push(obj); this.P_RESPOND_ATTRIBUTES_TBL.push(obj);
} }
console.log("a"+ this.P_RESPOND_ATTRIBUTES_TBL); console.log("a" + this.P_RESPOND_ATTRIBUTES_TBL);
let repUserName = this.selEmployeeID; let repUserName = this.selEmployeeID;
if (this.hideForwordEmployee && this.hideForwordEmployee.ATTRIBUTE_NAME) { if (this.hideForwordEmployee && this.hideForwordEmployee.ATTRIBUTE_NAME) {
@ -496,8 +502,8 @@ export class WorklistMainComponent implements OnInit {
this.P_RESPOND_ATTRIBUTES_TBL.push(obj); this.P_RESPOND_ATTRIBUTES_TBL.push(obj);
} }
console.log( "b"+ this.P_RESPOND_ATTRIBUTES_TBL); console.log("b" + this.P_RESPOND_ATTRIBUTES_TBL);
if ( if (
ButtonAction == "APPROVED" || ButtonAction == "APPROVED" ||
ButtonAction == "REJECTED" || ButtonAction == "REJECTED" ||
@ -517,7 +523,7 @@ export class WorklistMainComponent implements OnInit {
ButtonAction, ButtonAction,
WorklistMainComponent.PASS_ACTION_MODE WorklistMainComponent.PASS_ACTION_MODE
); );
this.common.sharedService.setSharedData( this.common.sharedService.setSharedData(
this.P_RESPOND_ATTRIBUTES_TBL, this.P_RESPOND_ATTRIBUTES_TBL,
WorklistMainComponent.PASS_RES_ATTR WorklistMainComponent.PASS_RES_ATTR
@ -548,7 +554,7 @@ export class WorklistMainComponent implements OnInit {
this.ts.trPK('vacation-rule', 'confirmation'), this.ts.trPK('vacation-rule', 'confirmation'),
this.confirmMsg) this.confirmMsg)
// this.openApplyModal(this.WorkListActionObj); // this.openApplyModal(this.WorkListActionObj);
} }
@ -621,7 +627,7 @@ export class WorklistMainComponent implements OnInit {
this.P_RESPOND_ATTRIBUTES_TBL, this.P_RESPOND_ATTRIBUTES_TBL,
WorklistMainComponent.PASS_RES_ATTR WorklistMainComponent.PASS_RES_ATTR
); );
console.log("c"+ this.P_RESPOND_ATTRIBUTES_TBL); console.log("c" + this.P_RESPOND_ATTRIBUTES_TBL);
// this.common.openWorklistRollReplacement(); // this.common.openWorklistRollReplacement();
this.openRepRolModal(); this.openRepRolModal();
@ -654,13 +660,13 @@ export class WorklistMainComponent implements OnInit {
// submitAbsObjList: this.notificationBodyRes[0].Collection_Notification // submitAbsObjList: this.notificationBodyRes[0].Collection_Notification
// }); // });
//this.common.openConfirmAbsece(); //this.common.openConfirmAbsece();
this.dirfromNotificationPage=true, this.dirfromNotificationPage = true,
this.common.sharedService.setSharedData( this.common.sharedService.setSharedData(
this.dirfromNotificationPage, this.dirfromNotificationPage,
"dirfromNotificationPage" "dirfromNotificationPage"
); );
this.common.sharedService.setSharedData( this.common.sharedService.setSharedData(
this.notificationBodyRes[0].Collection_Notification, this.notificationBodyRes[0].Collection_Notification,
"submitAbsObjList" "submitAbsObjList"
); );
@ -720,7 +726,7 @@ export class WorklistMainComponent implements OnInit {
// this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA); // this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA);
this.NotRespondAttributeList = []; this.NotRespondAttributeList = [];
result.NotificationGetRespondAttributesList; result.NotificationGetRespondAttributesList;
if ( if (
result.NotificationRespondRolesList != "" && result.NotificationRespondRolesList != "" &&
result.NotificationRespondRolesList[0].ATTRIBUTE_NAME != null && result.NotificationRespondRolesList[0].ATTRIBUTE_NAME != null &&
@ -744,7 +750,7 @@ export class WorklistMainComponent implements OnInit {
for (let i = 0; i < notificationAttr.length; i++) { for (let i = 0; i < notificationAttr.length; i++) {
if (notificationAttr[i].ATTRIBUTE_TYPE == "VARCHAR2") { if (notificationAttr[i].ATTRIBUTE_TYPE == "VARCHAR2") {
this.textArea = new TextAreaInput(notificationAttr[i].ATTRIBUTE_DISPLAY_NAME, notificationAttr[i].ATTRIBUTE_NAME, "", containerId, "", "", ""); this.textArea = new TextAreaInput(notificationAttr[i].ATTRIBUTE_DISPLAY_NAME, notificationAttr[i].ATTRIBUTE_NAME, "", containerId, "", "", "");
console.log(this.textArea ); console.log(this.textArea);
} else if (notificationAttr[i].ATTRIBUTE_TYPE == "ROLE") { } else if (notificationAttr[i].ATTRIBUTE_TYPE == "ROLE") {
} else if (notificationAttr[i].ATTRIBUTE_TYPE == "DATE") { } else if (notificationAttr[i].ATTRIBUTE_TYPE == "DATE") {
@ -798,7 +804,7 @@ export class WorklistMainComponent implements OnInit {
getAttachmentNotification(WorkListAttachObj) { getAttachmentNotification(WorkListAttachObj) {
this.attachmentRes = [] this.attachmentRes = []
console.log(" this.P_PAGE_NUM: "+ this.P_PAGE_NUM); console.log(" this.P_PAGE_NUM: " + this.P_PAGE_NUM);
this.worklistAttachService.getAttach(WorkListAttachObj). this.worklistAttachService.getAttach(WorkListAttachObj).
subscribe((result: NotificationGetAttachResponse) => { subscribe((result: NotificationGetAttachResponse) => {
@ -817,8 +823,8 @@ export class WorklistMainComponent implements OnInit {
getActionHistory(WorkListActionHistoryObj) { getActionHistory(WorkListActionHistoryObj) {
this.IsReachEnd = true; this.IsReachEnd = true;
this.actionHistoryRes =[]; this.actionHistoryRes = [];
console.log(" this.P_PAGE_NUM: "+ this.P_PAGE_NUM); console.log(" this.P_PAGE_NUM: " + this.P_PAGE_NUM);
this.worklistService.getActionHistory(WorkListActionHistoryObj). this.worklistService.getActionHistory(WorkListActionHistoryObj).
subscribe((result: WorkListActionHistoryResponse) => { subscribe((result: WorkListActionHistoryResponse) => {
this.handleWorkListActionHistoryResult(result); this.handleWorkListActionHistoryResult(result);
@ -827,7 +833,7 @@ export class WorklistMainComponent implements OnInit {
} }
handleWorkListActionHistoryResult(result) { handleWorkListActionHistoryResult(result) {
console.log( "1"+ this.IsReachEnd); console.log("1" + this.IsReachEnd);
if (this.common.validResponse(result)) { if (this.common.validResponse(result)) {
if (this.common.hasData(result.GetActionHistoryList)) { if (this.common.hasData(result.GetActionHistoryList)) {
this.actionHistoryRes = result.GetActionHistoryList; this.actionHistoryRes = result.GetActionHistoryList;
@ -838,11 +844,11 @@ export class WorklistMainComponent implements OnInit {
let lastitem = result.GetActionHistoryList[lastItemIndex]; let lastitem = result.GetActionHistoryList[lastItemIndex];
if (lastitem.NO_OF_ROWS == lastitem.ROW_NUM) { if (lastitem.NO_OF_ROWS == lastitem.ROW_NUM) {
this.IsReachEnd = true; this.IsReachEnd = true;
console.log( "2"+ this.IsReachEnd); console.log("2" + this.IsReachEnd);
} else { } else {
this.IsReachEnd = false; this.IsReachEnd = false;
console.log( "3"+ this.IsReachEnd); console.log("3" + this.IsReachEnd);
} }
} }
@ -947,8 +953,8 @@ export class WorklistMainComponent implements OnInit {
const request = new GetSubordinatesLeavesRequest(); const request = new GetSubordinatesLeavesRequest();
request.P_DATE_FROM = "/Date(" + Date.parse(from) + '+0300'+ ")/";//new Date(from); request.P_DATE_FROM = "/Date(" + Date.parse(from) + '+0300' + ")/";//new Date(from);
request.P_DATE_TO = "/Date(" + Date.parse(to) + '+0300'+ ")/" //new Date(to); request.P_DATE_TO = "/Date(" + Date.parse(to) + '+0300' + ")/" //new Date(to);
request.P_SELECTED_EMPLOYEE_NUMBER = this.selEmp; request.P_SELECTED_EMPLOYEE_NUMBER = this.selEmp;
// ="'/Date(" + Date.parse(from) + ")'" // ="'/Date(" + Date.parse(from) + ")'"
@ -972,7 +978,7 @@ export class WorklistMainComponent implements OnInit {
} }
getsubmitterInfo(notificationSubmitterInfoObj) { getsubmitterInfo(notificationSubmitterInfoObj) {
this.submitterInfoRes=[]; this.submitterInfoRes = [];
this.worklistMainService.getSubmitterInfo(notificationSubmitterInfoObj). this.worklistMainService.getSubmitterInfo(notificationSubmitterInfoObj).
subscribe((result: WorklistsubmitterInfoResponse) => { subscribe((result: WorklistsubmitterInfoResponse) => {
this.handleSubmitterInfoResult(result); this.handleSubmitterInfoResult(result);

Loading…
Cancel
Save