diff --git a/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.ts b/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.ts index 705bd712..e456a8b8 100644 --- a/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.ts +++ b/Mohem/src/app/notification/work-list-replacement-roll/work-list-replacement-roll.component.ts @@ -42,16 +42,21 @@ export class WorkListReplacementRollComponent implements OnInit { searchKeyEnter: boolean = false; messageSuccess: boolean =false; public direction: string; + P_RESPOND_ATTRIBUTES_TBL: any[]; constructor(public worklistService: WorklistService, private cs: CommonService, private ts: TranslatorService, public workListMainService: WorklistMainService, public modalCtrl: ModalController) { this.P_PAGE_NUM = 1; this.P_PAGE_LIMIT = 50; this.getPassActionMode = this.cs.sharedService.getSharedData('passActionMode', false); + console.log(this.getPassActionMode); + this.getPassNotificationDetails = this.cs.sharedService.getSharedData('passNotificationInfo', false); this.getpassResAttr = this.cs.sharedService.getSharedData('passResAttr', false); + console.log(this.getpassResAttr); this.pQuestion = this.cs.sharedService.getSharedData('pQuestion', false); if (this.getPassActionMode == "ANSWER_INFO") { this.isAnswer = true; } + this.WorkListReplacmentEmployeeObj.P_PAGE_NUM = this.P_PAGE_NUM; this.WorkListReplacmentEmployeeObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT; @@ -210,17 +215,42 @@ export class WorkListReplacementRollComponent implements OnInit { console.log("selEmp "+ this.selEmp.USER_NAME); if (this.selectedUserInf && this.selectedUserInf.USER_NAME) { + console.log("userInfo "+this.selectedUserInf.USER_NAME); if (this.userNote) { + + if(this.getPassActionMode == "APPROVE_AND_FORWARD" || this.getPassActionMode == "FORWARD"){ + + let index_FORWARD = this.getpassResAttr.findIndex(x => x.ATTRIBUTE_NAME === "FORWARD_TO_USERNAME_RESPONSE"); + this.getpassResAttr[index_FORWARD].ATTRIBUTE_TEXT_VALUE = this.selectedUserInf.USER_NAME; + // this.userNote; + let index_Note = this.getpassResAttr.findIndex(x => x.ATTRIBUTE_NAME === "NOTE"); + this.getpassResAttr[index_Note].ATTRIBUTE_TEXT_VALUE = this.userNote; + + this.P_RESPOND_ATTRIBUTES_TBL= this.getpassResAttr; + console.log(this.P_RESPOND_ATTRIBUTES_TBL); + this.WorkListActionObj.P_FORWARD_TO_USER_NAME = this.selectedUserInf.USER_NAME; + this.WorkListActionObj.P_ACTION_MODE = this.getPassActionMode; + this.WorkListActionObj.P_COMMENTS =""// response Attr + this.WorkListActionObj.RespondAttributeList = this.P_RESPOND_ATTRIBUTES_TBL; + + }else{ + + + + + this.WorkListActionObj.P_FORWARD_TO_USER_NAME = this.selectedUserInf.USER_NAME; this.WorkListActionObj.P_ACTION_MODE = this.getPassActionMode; this.WorkListActionObj.P_COMMENTS = this.userNote;// response Attr // this.modalCtrl.dismiss(); + } this.workListMainService.actionButton(this.WorkListActionObj). subscribe((result: any) => { this.handleApplayActionResult(result); }); + } else { let msg: string = this.ts.trPK("replacementRoll", "enterNote"); this.cs.showErrorMessageDialog(() => { @@ -237,12 +267,13 @@ export class WorkListReplacementRollComponent implements OnInit { this.WorkListActionObj.P_FORWARD_TO_USER_NAME = null; this.WorkListActionObj.P_ACTION_MODE = this.getPassActionMode; this.WorkListActionObj.P_COMMENTS = this.userNote;// response Attr + // here must send response attr // this.modalCtrl.dismiss(); - this.workListMainService.actionButton(this.WorkListActionObj). - subscribe((result: any) => { - this.handleApplayActionResult(result); - }); + // this.workListMainService.actionButton(this.WorkListActionObj). + // subscribe((result: any) => { + // this.handleApplayActionResult(result); + // }); } else { let msg: string = this.ts.trPK("replacementRoll", "enterNote"); this.cs.showErrorMessageDialog(() => { diff --git a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.html b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.html index 576f9d2b..7c7095f6 100644 --- a/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.html +++ b/Mohem/src/app/notification/worklist-main-mr/worklist-main-mr.component.html @@ -185,24 +185,7 @@ - -
- -
-
- -
- - -
+ @@ -509,8 +492,8 @@ {{actionHistory.ACTION}} + [ngClass]="{'bg-blue-txt' : actionHistory.ACTION_CODE === 'SUBMIT' ,'bg-orange-txt' : actionHistory.ACTION_CODE === 'PENDING' ,'bg-red-txt' : actionHistory.ACTION_CODE === 'REJECT','bg-green-txt' : actionHistory.ACTION_CODE != 'PENDING' && actionHistory.ACTION_CODE != 'REJECT' && actionHistory.ACTION_CODE != 'SUBMIT'}" + class=""> {{actionHistory.ACTION}} @@ -530,14 +513,15 @@ - + +

{{ 'general, notAttch' | translate}}

- + - - {{attachList.SEQ_NUM }}. {{attachList.FILE_NAME}} + + {{i+1 }}. {{attachList.FILE_NAME}}
+
+
- + -
+
@@ -590,19 +575,14 @@ -
Transaction Successful
+
{{'worklistMain, Tran_Succ' | translate}}
- + - - {{attachList.SEQ_NUM }}. {{attachList.FILE_NAME}} + + {{i+1}}. {{attachList.FILE_NAME}}