|
|
|
|
@ -156,8 +156,8 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
HomeComponent.NOTIFICATION_DATA,
|
|
|
|
|
false
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
console.log(this.getPassNotificationDetails.ROW_NUM);
|
|
|
|
|
|
|
|
|
|
console.log("for next()"+ this.getPassNotificationDetails.ROW_NUM);
|
|
|
|
|
this.notificationArray = this.common.sharedService.getSharedData(
|
|
|
|
|
HomeComponent.NOTIFICATION_ARR,
|
|
|
|
|
false
|
|
|
|
|
@ -363,31 +363,59 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
} // 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();
|
|
|
|
|
// // }
|
|
|
|
|
// }
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public nextNotfification() {
|
|
|
|
|
//let itemExist = false;
|
|
|
|
|
let itemNo = this.getPassNotificationDetails.ROW_NUM;
|
|
|
|
|
itemNo += 1;
|
|
|
|
|
console.log( this.notificationArray);
|
|
|
|
|
let sortArr =this.sortArray(this.notificationArray);
|
|
|
|
|
console.log( sortArr);
|
|
|
|
|
|
|
|
|
|
const sortedActivities = this.notificationArray.slice().sort((a, b) => b.BEGIN_DATE - a.BEGIN_DATE)
|
|
|
|
|
console.log(sortedActivities);
|
|
|
|
|
// 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();
|
|
|
|
|
// // }
|
|
|
|
|
// }
|
|
|
|
|
console.log(itemNo);
|
|
|
|
|
let index = this.notificationArray.findIndex(x => x.ROW_NUM === itemNo);
|
|
|
|
|
console.log(index);
|
|
|
|
|
console.log(this.notificationArray);
|
|
|
|
|
index += 1;
|
|
|
|
|
|
|
|
|
|
if (index < this.notificationArray.length) {
|
|
|
|
|
this.common.sharedService.setSharedData(this.notificationArray[index], HomeComponent.NOTIFICATION_DATA);
|
|
|
|
|
if(this.notificationArray[index].REQUEST_TYPE == "PO" ){
|
|
|
|
|
this.common.openWorklistMainPOPage()
|
|
|
|
|
}else
|
|
|
|
|
if(this.notificationArray[index].REQUEST_TYPE == "PR" ){
|
|
|
|
|
this.common.openWorklistMainPRPage()
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
if(this.notificationArray[index].REQUEST_TYPE == "MR" ){
|
|
|
|
|
this.common.openWorklistMainMRPage()
|
|
|
|
|
}else{
|
|
|
|
|
this.intializeNotificationDetail();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else{
|
|
|
|
|
this.common.openNotificationPage();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -642,7 +670,8 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
handleNotificationResAttrResult(result) {
|
|
|
|
|
if (this.common.validResponse(result)) {
|
|
|
|
|
// this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA);
|
|
|
|
|
this.NotRespondAttributeList =
|
|
|
|
|
|
|
|
|
|
this.NotRespondAttributeList = [];
|
|
|
|
|
result.NotificationGetRespondAttributesList;
|
|
|
|
|
if (
|
|
|
|
|
result.NotificationRespondRolesList != "" &&
|
|
|
|
|
|