|
|
|
@ -112,9 +112,9 @@ export class WorklistMainMRComponent 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;
|
|
|
|
close_label: any;
|
|
|
|
closeDis: boolean = false;
|
|
|
|
closeDis: boolean = false;
|
|
|
|
selectedFilter: string;
|
|
|
|
selectedFilter: string;
|
|
|
|
@ -149,40 +149,32 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
|
|
public segmentChanged(event: any) {
|
|
|
|
public segmentChanged(event: any) {
|
|
|
|
this.activeSegment = event.detail.value;
|
|
|
|
this.activeSegment = event.detail.value;
|
|
|
|
if(this.activeSegment === 'info')
|
|
|
|
if (this.activeSegment === 'info') {
|
|
|
|
{
|
|
|
|
|
|
|
|
this.slides.slideTo(0);
|
|
|
|
this.slides.slideTo(0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if(this.activeSegment === 'item-req')
|
|
|
|
else if (this.activeSegment === 'item-req') {
|
|
|
|
{
|
|
|
|
|
|
|
|
this.slides.slideTo(1);
|
|
|
|
this.slides.slideTo(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if(this.activeSegment === 'action-history')
|
|
|
|
else if (this.activeSegment === 'action-history') {
|
|
|
|
{
|
|
|
|
|
|
|
|
this.slides.slideTo(2);
|
|
|
|
this.slides.slideTo(2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if(this.activeSegment === 'attach')
|
|
|
|
else if (this.activeSegment === 'attach') {
|
|
|
|
{
|
|
|
|
|
|
|
|
this.slides.slideTo(3);
|
|
|
|
this.slides.slideTo(3);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public slideChanged(event: any) {
|
|
|
|
public slideChanged(event: any) {
|
|
|
|
this.slides.getActiveIndex().then(index => {
|
|
|
|
this.slides.getActiveIndex().then(index => {
|
|
|
|
if(index === 0)
|
|
|
|
if (index === 0) {
|
|
|
|
{
|
|
|
|
|
|
|
|
this.activeSegment = 'info';
|
|
|
|
this.activeSegment = 'info';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if(index === 1)
|
|
|
|
else if (index === 1) {
|
|
|
|
{
|
|
|
|
|
|
|
|
this.activeSegment = 'item-req';
|
|
|
|
this.activeSegment = 'item-req';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if(index === 2)
|
|
|
|
else if (index === 2) {
|
|
|
|
{
|
|
|
|
|
|
|
|
this.activeSegment = 'action-history';
|
|
|
|
this.activeSegment = 'action-history';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if(index === 3)
|
|
|
|
else if (index === 3) {
|
|
|
|
{
|
|
|
|
|
|
|
|
this.activeSegment = 'attach';
|
|
|
|
this.activeSegment = 'attach';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
@ -316,7 +308,7 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getNotificationButtons(notificationButtonsObj) {
|
|
|
|
getNotificationButtons(notificationButtonsObj) {
|
|
|
|
this.notificationButtonRes=[];
|
|
|
|
this.notificationButtonRes = [];
|
|
|
|
this.worklistMainService
|
|
|
|
this.worklistMainService
|
|
|
|
.getNotificationButtons(notificationButtonsObj)
|
|
|
|
.getNotificationButtons(notificationButtonsObj)
|
|
|
|
.subscribe((result: NotificatonButtonResponse) => {
|
|
|
|
.subscribe((result: NotificatonButtonResponse) => {
|
|
|
|
@ -332,17 +324,17 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
this.common.sharedService.setSharedData(this.notificationButtonRes, 'passActionMore');
|
|
|
|
this.common.sharedService.setSharedData(this.notificationButtonRes, 'passActionMore');
|
|
|
|
// 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
|
|
|
|
} // if result == null
|
|
|
|
@ -351,9 +343,8 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
this.close_label = this.notificationButtonRes[i].BUTTON_LABEL;
|
|
|
|
this.close_label = this.notificationButtonRes[i].BUTTON_LABEL;
|
|
|
|
this.closeDis = true;
|
|
|
|
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 != "CLOSE")
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -413,7 +404,7 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
|
|
public nextNotfification() {
|
|
|
|
public nextNotfification() {
|
|
|
|
//let itemExist = false;
|
|
|
|
//let itemExist = false;
|
|
|
|
if( document.getElementById("notificationDynamicFieldsMR") != null){
|
|
|
|
if (document.getElementById("notificationDynamicFieldsMR") != null) {
|
|
|
|
document.getElementById("notificationDynamicFieldsMR").innerHTML = "";
|
|
|
|
document.getElementById("notificationDynamicFieldsMR").innerHTML = "";
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -438,14 +429,14 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
checkRequestType(index){
|
|
|
|
checkRequestType(index) {
|
|
|
|
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.intializeNotificationDetail();
|
|
|
|
this.intializeNotificationDetail();
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.common.openWorklistMainPage();
|
|
|
|
this.common.openWorklistMainPage();
|
|
|
|
@ -682,7 +673,7 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
|
|
getNotificationResAttr(notificationButtonsObj) {
|
|
|
|
getNotificationResAttr(notificationButtonsObj) {
|
|
|
|
// console.log("getNotificationResAttr");
|
|
|
|
// console.log("getNotificationResAttr");
|
|
|
|
this.NotRespondAttributeList=[];
|
|
|
|
this.NotRespondAttributeList = [];
|
|
|
|
this.worklistMainService
|
|
|
|
this.worklistMainService
|
|
|
|
.notificationResponseAttr(notificationButtonsObj)
|
|
|
|
.notificationResponseAttr(notificationButtonsObj)
|
|
|
|
.subscribe((result: NotificatonButtonResponse) => {
|
|
|
|
.subscribe((result: NotificatonButtonResponse) => {
|
|
|
|
@ -779,7 +770,7 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getAttachmentNotification(WorkListAttachObj) {
|
|
|
|
getAttachmentNotification(WorkListAttachObj) {
|
|
|
|
this.attachmentRes=[];
|
|
|
|
this.attachmentRes = [];
|
|
|
|
this.worklistAttachService.getAttach(WorkListAttachObj).
|
|
|
|
this.worklistAttachService.getAttach(WorkListAttachObj).
|
|
|
|
subscribe((result: NotificationGetAttachResponse) => {
|
|
|
|
subscribe((result: NotificationGetAttachResponse) => {
|
|
|
|
this.handleWorkListAttachResult(result);
|
|
|
|
this.handleWorkListAttachResult(result);
|
|
|
|
@ -797,7 +788,7 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
|
|
getActionHistory(WorkListActionHistoryObj) {
|
|
|
|
getActionHistory(WorkListActionHistoryObj) {
|
|
|
|
this.IsReachEnd = true;
|
|
|
|
this.IsReachEnd = true;
|
|
|
|
this.actionHistoryRes=[];
|
|
|
|
this.actionHistoryRes = [];
|
|
|
|
this.worklistService.getActionHistory(WorkListActionHistoryObj).
|
|
|
|
this.worklistService.getActionHistory(WorkListActionHistoryObj).
|
|
|
|
subscribe((result: WorkListActionHistoryResponse) => {
|
|
|
|
subscribe((result: WorkListActionHistoryResponse) => {
|
|
|
|
this.handleWorkListActionHistoryResult(result);
|
|
|
|
this.handleWorkListActionHistoryResult(result);
|
|
|
|
@ -1105,7 +1096,7 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async openReplacementRoll() {
|
|
|
|
async openReplacementRoll() {
|
|
|
|
|
|
|
|
this.common.sharedService.setSharedData(this.actionHistoryRes, 'actionHistoryData');
|
|
|
|
const modal = await this.modalCtrl.create({
|
|
|
|
const modal = await this.modalCtrl.create({
|
|
|
|
component: WorkListReplacementRollComponent,
|
|
|
|
component: WorkListReplacementRollComponent,
|
|
|
|
backdropDismiss: false,
|
|
|
|
backdropDismiss: false,
|
|
|
|
@ -1170,14 +1161,14 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getMOItemHistory(itemID ,orgID) {
|
|
|
|
getMOItemHistory(itemID, orgID) {
|
|
|
|
// console.log(itemID);
|
|
|
|
// console.log(itemID);
|
|
|
|
this.IsReachEnd = false;
|
|
|
|
this.IsReachEnd = false;
|
|
|
|
const request = new MOItemHistoryReq();
|
|
|
|
const request = new MOItemHistoryReq();
|
|
|
|
request.P_ITEM_ID = parseInt(itemID);
|
|
|
|
request.P_ITEM_ID = parseInt(itemID);
|
|
|
|
request.P_PAGE_LIMIT = 100;
|
|
|
|
request.P_PAGE_LIMIT = 100;
|
|
|
|
request.P_PAGE_NUM = 1;
|
|
|
|
request.P_PAGE_NUM = 1;
|
|
|
|
request.P_ORG_ID= parseInt(orgID);
|
|
|
|
request.P_ORG_ID = parseInt(orgID);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1222,6 +1213,10 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
openRequestInfoDel(userData, flag) {
|
|
|
|
|
|
|
|
this.common.sharedService.setSharedData(userData, 'requestInfoDelUser');
|
|
|
|
|
|
|
|
this.actionButton(flag);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|