|
|
|
|
@ -54,6 +54,7 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
public static PASS_RES_ATTR = "passResAttr";
|
|
|
|
|
TransactionID: number = -999;
|
|
|
|
|
notificationBodyRes: any = [];
|
|
|
|
|
checklistNotificationBodyRes: any = [];
|
|
|
|
|
stampNsNotificationBodyRes: any = [];
|
|
|
|
|
stampMsNotificationBodyRes: any = [];
|
|
|
|
|
actionHistoryRes: any = [];
|
|
|
|
|
@ -111,6 +112,7 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
closeDis: boolean = false;
|
|
|
|
|
public selectedFilter: string;
|
|
|
|
|
public arr_hr_req_only = [];
|
|
|
|
|
public checkListArray = [];
|
|
|
|
|
public showInformation = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -226,9 +228,9 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
false
|
|
|
|
|
);
|
|
|
|
|
console.log(this.selectedFilter);
|
|
|
|
|
if (this.selectedFilter === 'HRSSA' || this.selectedFilter === 'STAMP') {
|
|
|
|
|
console.log("ENAD")
|
|
|
|
|
if (this.selectedFilter === 'HRSSA' || this.selectedFilter === 'HRCKLTSK') {
|
|
|
|
|
this.arr_hr_req_only = [];
|
|
|
|
|
this.checkListArray = [];
|
|
|
|
|
this.sortRequests();
|
|
|
|
|
}
|
|
|
|
|
this.WorkListBodyObj = new WorkListBodyRequest();
|
|
|
|
|
@ -266,8 +268,9 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
// this.WorkListSubmitterInfoObj.P_SEARCH_EMPLOYEE_DISPLAY_NAME = "";
|
|
|
|
|
// this.WorkListSubmitterInfoObj.P_SEARCH_USER_NAME = "";
|
|
|
|
|
|
|
|
|
|
this.getsubmitterInfo(this.WorkListSubmitterInfoObj);
|
|
|
|
|
|
|
|
|
|
if (this.selectedFilter != 'HRCKLTSK') {
|
|
|
|
|
this.getsubmitterInfo(this.WorkListSubmitterInfoObj);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.getNotificationButtons(this.WorkListButtonsObj);
|
|
|
|
|
this.getNotificationResAttr(this.WorkListButtonsObj);
|
|
|
|
|
@ -304,6 +307,8 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
this.getOPMNotification(this.WorkListBodyObj);
|
|
|
|
|
} else if (this.getPassNotificationDetails.REQUEST_TYPE === 'OLM') {
|
|
|
|
|
this.getOLMNotification(this.WorkListBodyObj);
|
|
|
|
|
} else if (this.getPassNotificationDetails.REQUEST_TYPE === 'HRCKLTSK') {
|
|
|
|
|
this.getChecklistNotification(this.WorkListBodyObj);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -419,6 +424,15 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getChecklistNotification(notificationBodyObj) {
|
|
|
|
|
this.notificationBodyRes = []
|
|
|
|
|
this.worklistMainService
|
|
|
|
|
.getChecklistNotification(notificationBodyObj)
|
|
|
|
|
.subscribe((result: EITNotificatonBodyResponse) => {
|
|
|
|
|
this.handleWorkListBodyResult(result, "HRCKLTSK");
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getAbsenceNotificationDetails(notificationBodyObj) {
|
|
|
|
|
this.notificationBodyRes = [];
|
|
|
|
|
this.worklistMainService
|
|
|
|
|
@ -525,6 +539,11 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
this.notificationBodyRes = result.OLM_Notification_Body.P_ENROLLMENT_DETAILS_LIST;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (Type === "HRCKLTSK") {
|
|
|
|
|
if (result.CheckList_NTF_Body_Obj) {
|
|
|
|
|
this.checklistNotificationBodyRes = result.CheckList_NTF_Body_Obj.P_GET_CHECKLIST_NTF_BODY;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} //End handleWorkListBodyResult
|
|
|
|
|
|
|
|
|
|
@ -657,7 +676,7 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
this.common.sharedService.setSharedData(this.notificationArray[index], HomeComponent.NOTIFICATION_DATA);
|
|
|
|
|
this.checkRequestType(index);
|
|
|
|
|
} else {
|
|
|
|
|
if (this.arr_hr_req_only) {
|
|
|
|
|
if (this.arr_hr_req_only.length > 0) {
|
|
|
|
|
let requestIndex = this.arr_hr_req_only.findIndex(x => x.ROW_NUM === itemNo);
|
|
|
|
|
requestIndex++;
|
|
|
|
|
if (requestIndex < this.arr_hr_req_only.length) {
|
|
|
|
|
@ -665,9 +684,18 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
this.intializeNotificationDetail();
|
|
|
|
|
} else {
|
|
|
|
|
this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
|
|
|
|
|
//this.common.setTotalNumberOfWorklistRequest(true);
|
|
|
|
|
this.common.openNotificationPage();
|
|
|
|
|
}
|
|
|
|
|
} else if(this.checkListArray.length > 0) {
|
|
|
|
|
let requestIndex = this.checkListArray.findIndex(x => x.ROW_NUM === itemNo);
|
|
|
|
|
requestIndex++;
|
|
|
|
|
if (requestIndex < this.checkListArray.length) {
|
|
|
|
|
this.common.sharedService.setSharedData(this.checkListArray[requestIndex], HomeComponent.NOTIFICATION_DATA);
|
|
|
|
|
this.intializeNotificationDetail();
|
|
|
|
|
} else {
|
|
|
|
|
this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
|
|
|
|
|
this.common.openNotificationPage();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
@ -746,7 +774,8 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
ButtonAction == "APPROVED" ||
|
|
|
|
|
ButtonAction == "REJECTED" ||
|
|
|
|
|
ButtonAction == "DEL" ||
|
|
|
|
|
ButtonAction == "CLOSE"
|
|
|
|
|
ButtonAction == "CLOSE" ||
|
|
|
|
|
ButtonAction == "COMPLETE"
|
|
|
|
|
) {
|
|
|
|
|
this.WorkListActionObj.P_FORWARD_TO_USER_NAME = "";
|
|
|
|
|
this.WorkListActionObj.P_ACTION_MODE = ButtonAction;
|
|
|
|
|
@ -781,6 +810,9 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
else if (ButtonAction === "CLOSE") {
|
|
|
|
|
this.confirmMsg = this.ts.trPK('worklistMain', 'closeMsg')
|
|
|
|
|
}
|
|
|
|
|
else if(ButtonAction === "COMPLETE") {
|
|
|
|
|
this.confirmMsg = this.ts.trPK('worklistMain', 'closeMsg')
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.common.confirmAlertDialogAction(
|
|
|
|
|
() => {
|
|
|
|
|
@ -1026,31 +1058,40 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
this.IsReachEnd = true;
|
|
|
|
|
this.actionHistoryRes = [];
|
|
|
|
|
console.log(" this.P_PAGE_NUM: " + this.P_PAGE_NUM);
|
|
|
|
|
this.worklistService.getActionHistory(WorkListActionHistoryObj).
|
|
|
|
|
if (this.selectedFilter == 'HRCKLTSK') {
|
|
|
|
|
this.worklistService.getActionHistoryCheckList(WorkListActionHistoryObj).
|
|
|
|
|
subscribe((result: WorkListActionHistoryResponse) => {
|
|
|
|
|
this.handleWorkListActionHistoryResult(result);
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
this.worklistService.getActionHistory(WorkListActionHistoryObj).
|
|
|
|
|
subscribe((result: WorkListActionHistoryResponse) => {
|
|
|
|
|
this.handleWorkListActionHistoryResult(result);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
handleWorkListActionHistoryResult(result) {
|
|
|
|
|
console.log("1" + this.IsReachEnd);
|
|
|
|
|
if (this.common.validResponse(result)) {
|
|
|
|
|
if (this.common.hasData(result.GetActionHistoryList)) {
|
|
|
|
|
this.actionHistoryRes = result.GetActionHistoryList;
|
|
|
|
|
if (this.common.hasData(result.GetActionHistoryList) || this.common.hasData(result.CheckList_Action_History_List)) {
|
|
|
|
|
if (this.selectedFilter == 'HRCKLTSK') {
|
|
|
|
|
this.actionHistoryRes = result.CheckList_Action_History_List;
|
|
|
|
|
} else {
|
|
|
|
|
this.actionHistoryRes = result.GetActionHistoryList;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.P_PAGE_NUM++;
|
|
|
|
|
this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM;
|
|
|
|
|
let lastItemIndex = this.actionHistoryRes.length - 1;
|
|
|
|
|
if (result.GetActionHistoryList[lastItemIndex]) {
|
|
|
|
|
let lastitem = result.GetActionHistoryList[lastItemIndex];
|
|
|
|
|
if (this.actionHistoryRes[lastItemIndex]) {
|
|
|
|
|
let lastitem = this.actionHistoryRes[lastItemIndex];
|
|
|
|
|
if (lastitem.NO_OF_ROWS == lastitem.ROW_NUM) {
|
|
|
|
|
this.IsReachEnd = true;
|
|
|
|
|
console.log("2" + this.IsReachEnd);
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
this.IsReachEnd = false;
|
|
|
|
|
console.log("3" + this.IsReachEnd);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.turnCateFun(this.actionHistoryRes);
|
|
|
|
|
@ -1287,9 +1328,10 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
for (let i = 0; i < this.notificationArray.length; i++) {
|
|
|
|
|
if (this.notificationArray[i].ITEM_TYPE === 'HRSSA' || this.notificationArray[i].ITEM_TYPE === 'STAMP') {
|
|
|
|
|
this.arr_hr_req_only.push(this.notificationArray[i]);
|
|
|
|
|
} else if (this.notificationArray[i].ITEM_TYPE === 'HRCKLTSK') {
|
|
|
|
|
this.checkListArray.push(this.notificationArray[i]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
console.log(this.arr_hr_req_only);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
returnDateTime(stringDate: string) {
|
|
|
|
|
|