|
|
|
|
@ -53,8 +53,8 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
public static PASS_RES_ATTR = "passResAttr";
|
|
|
|
|
TransactionID: number = -999;
|
|
|
|
|
notificationBodyRes: any = [];
|
|
|
|
|
stampNsNotificationBodyRes: any =[];
|
|
|
|
|
stampMsNotificationBodyRes: any =[];
|
|
|
|
|
stampNsNotificationBodyRes: any = [];
|
|
|
|
|
stampMsNotificationBodyRes: any = [];
|
|
|
|
|
actionHistoryRes: any = [];
|
|
|
|
|
notificationButtonRes: any;
|
|
|
|
|
actionMode: any;
|
|
|
|
|
@ -436,59 +436,59 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
this.notificationBodyRes =
|
|
|
|
|
result.GetAbsenceCollectionNotificationBodyList;
|
|
|
|
|
}
|
|
|
|
|
} else if (Type === "ADDRESS"){
|
|
|
|
|
} else if (Type === "ADDRESS") {
|
|
|
|
|
if (result.GetAddressNotificationBodyList) {
|
|
|
|
|
this.notificationBodyRes =
|
|
|
|
|
result.GetAddressNotificationBodyList;
|
|
|
|
|
result.GetAddressNotificationBodyList;
|
|
|
|
|
console.log(result);
|
|
|
|
|
}
|
|
|
|
|
} else if (Type === "BASIC_DETAILS"){
|
|
|
|
|
} else if (Type === "BASIC_DETAILS") {
|
|
|
|
|
if (result.GetBasicDetNtfBodyList) {
|
|
|
|
|
this.notificationBodyRes =
|
|
|
|
|
result.GetBasicDetNtfBodyList;
|
|
|
|
|
console.log(result);
|
|
|
|
|
}
|
|
|
|
|
} else if (Type === "CEI"){
|
|
|
|
|
console.log(result);
|
|
|
|
|
}
|
|
|
|
|
} else if (Type === "CEI") {
|
|
|
|
|
if (result.GetCEICollectionNotificationBodyList) {
|
|
|
|
|
this.notificationBodyRes =
|
|
|
|
|
result.GetCEICollectionNotificationBodyList[0].Collection_Notification;
|
|
|
|
|
console.log(result.GetCEICollectionNotificationBodyList[0].Collection_Notification);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (Type === "STAMP_MS"){
|
|
|
|
|
else if (Type === "STAMP_MS") {
|
|
|
|
|
if (result.GetStampMsNotificationBodyList) {
|
|
|
|
|
this.stampMsNotificationBodyRes =
|
|
|
|
|
result.GetStampMsNotificationBodyList;
|
|
|
|
|
console.log(result);
|
|
|
|
|
}
|
|
|
|
|
console.log(result);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (Type === "STAMP_NS"){
|
|
|
|
|
else if (Type === "STAMP_NS") {
|
|
|
|
|
if (result.GetStampNsNotificationBodyList) {
|
|
|
|
|
this.stampNsNotificationBodyRes =
|
|
|
|
|
result.GetStampNsNotificationBodyList;
|
|
|
|
|
console.log(result);
|
|
|
|
|
}
|
|
|
|
|
console.log(result);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (Type === "PHONE_NUMBERS"){
|
|
|
|
|
else if (Type === "PHONE_NUMBERS") {
|
|
|
|
|
if (result.GetPhonesNotificationBodyList) {
|
|
|
|
|
this.notificationBodyRes =
|
|
|
|
|
result.GetPhonesNotificationBodyList;
|
|
|
|
|
console.log(result);
|
|
|
|
|
}
|
|
|
|
|
console.log(result);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (Type === "TERMINATION"){
|
|
|
|
|
else if (Type === "TERMINATION") {
|
|
|
|
|
if (result.GetTermNotificationBodyList) {
|
|
|
|
|
this.notificationBodyRes =
|
|
|
|
|
result.GetTermNotificationBodyList;
|
|
|
|
|
console.log(result);
|
|
|
|
|
}
|
|
|
|
|
console.log(result);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (Type === "CONTACT"){
|
|
|
|
|
else if (Type === "CONTACT") {
|
|
|
|
|
if (result.GetContactNotificationBodyList) {
|
|
|
|
|
this.notificationBodyRes =
|
|
|
|
|
result.GetContactNotificationBodyList.ContactNotificationBody;
|
|
|
|
|
console.log(result);
|
|
|
|
|
}
|
|
|
|
|
console.log(result);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} //End handleWorkListBodyResult
|
|
|
|
|
@ -560,10 +560,9 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
// }
|
|
|
|
|
// this.messageSuccess = true;
|
|
|
|
|
this.common.greenToastPK('worklist', 'done-successfully');
|
|
|
|
|
this.common.setTotalNumberOfWorklistRequest();
|
|
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
// this.messageSuccess = false;
|
|
|
|
|
// this.openNotificationsDashboard();
|
|
|
|
|
this.common.setTotalNumberOfWorklistRequest();
|
|
|
|
|
this.nextNotfification();
|
|
|
|
|
}, 2000);
|
|
|
|
|
} else {
|
|
|
|
|
@ -601,14 +600,20 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
if (document.getElementById("notificationDynamicFields") != null) {
|
|
|
|
|
document.getElementById("notificationDynamicFields").innerHTML = "";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let itemNo = this.getPassNotificationDetails.ROW_NUM;
|
|
|
|
|
console.log(itemNo);
|
|
|
|
|
let index = this.notificationArray.findIndex(x => x.ROW_NUM === itemNo);
|
|
|
|
|
console.log(index);
|
|
|
|
|
console.log(this.notificationArray);
|
|
|
|
|
let previousRequest = this.notificationArray[index].REQUEST_TYPE;
|
|
|
|
|
index += 1;
|
|
|
|
|
if (previousRequest == 'STAMP_MS' || previousRequest == 'STAMP_NS') {
|
|
|
|
|
previousRequest = 'STAMP';
|
|
|
|
|
}
|
|
|
|
|
if (this.common.filterKeys[previousRequest] != 0)
|
|
|
|
|
this.common.filterKeys[previousRequest] = (this.common.filterKeys[previousRequest] - 1)
|
|
|
|
|
|
|
|
|
|
index += 1;
|
|
|
|
|
if (index < this.notificationArray.length) {
|
|
|
|
|
this.activeSegment = 'info';
|
|
|
|
|
if (this.selectedFilter === 'ALL') {
|
|
|
|
|
@ -622,11 +627,15 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
this.common.sharedService.setSharedData(this.arr_hr_req_only[requestIndex], HomeComponent.NOTIFICATION_DATA);
|
|
|
|
|
this.intializeNotificationDetail();
|
|
|
|
|
} else {
|
|
|
|
|
this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
|
|
|
|
|
|
|
|
|
|
this.common.openNotificationPage();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
this.common.sharedService.setSharedData(true, HomeComponent.COUNT_CHANGED);
|
|
|
|
|
|
|
|
|
|
this.common.openNotificationPage();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -1019,7 +1028,7 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
let jobTitle = title.split('.');
|
|
|
|
|
if (jobTitle && jobTitle.length > 1) {
|
|
|
|
|
jobName = jobTitle[0] + " " + jobTitle[1];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
jobName = '';
|
|
|
|
|
}
|
|
|
|
|
@ -1148,7 +1157,7 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
// this.messageSuccess = false;
|
|
|
|
|
this.nextNotfification();
|
|
|
|
|
}, 2000);
|
|
|
|
|
}, 1000);
|
|
|
|
|
// this.nextNotfification();
|
|
|
|
|
} else {
|
|
|
|
|
this.common.redToastPK('worklist', 'save-error');
|
|
|
|
|
@ -1170,6 +1179,7 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
return;
|
|
|
|
|
} else if (data.data == "Success") {
|
|
|
|
|
// this.openNotificationsDashboard();
|
|
|
|
|
this.common.setTotalNumberOfWorklistRequest();
|
|
|
|
|
this.nextNotfification();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
@ -1245,41 +1255,41 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
console.log(this.arr_hr_req_only);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
returnDateTime(stringDate: string){
|
|
|
|
|
returnDateTime(stringDate: string) {
|
|
|
|
|
let allDateTime = stringDate.split(' ');
|
|
|
|
|
let time = allDateTime[1].split(':', 2);
|
|
|
|
|
let fullDate = this.transform(stringDate);
|
|
|
|
|
let fullDate = this.transform(stringDate);
|
|
|
|
|
return fullDate + ' ' + time[0] + ':' + time[1] + ' ' + allDateTime[2];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
locale = {
|
|
|
|
|
en: {
|
|
|
|
|
// month_names: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
|
|
|
|
|
month_names_short: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
|
|
|
|
|
// month_names: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
|
|
|
|
|
month_names_short: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
transform(value: string) {
|
|
|
|
|
let x = new Date(Date.parse(value));
|
|
|
|
|
//return value.toLowerCase();
|
|
|
|
|
let month = this.getMonthNameShort('en',x.getMonth())
|
|
|
|
|
return ""+ x.getDate()+" "+ month +" "+x.getFullYear();
|
|
|
|
|
let month = this.getMonthNameShort('en', x.getMonth())
|
|
|
|
|
return "" + x.getDate() + " " + month + " " + x.getFullYear();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getMonthNameShort(lang,month) {
|
|
|
|
|
getMonthNameShort(lang, month) {
|
|
|
|
|
lang = lang && (lang in this.locale) ? lang : 'en';
|
|
|
|
|
return this.locale[lang].month_names_short[month];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
showLoading( notificationList ) {
|
|
|
|
|
if (notificationList.length < 0) {
|
|
|
|
|
return true;
|
|
|
|
|
} else if (notificationList === []){
|
|
|
|
|
return false;
|
|
|
|
|
} else {return true;}
|
|
|
|
|
}
|
|
|
|
|
showLoading(notificationList) {
|
|
|
|
|
if (notificationList.length < 0) {
|
|
|
|
|
return true;
|
|
|
|
|
} else if (notificationList === []) {
|
|
|
|
|
return false;
|
|
|
|
|
} else { return true; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|