fix submit in replacment , reset info with skip option

MOHEMM-Q3-DEV-LATEST
ashwaq 6 years ago
parent aca37f628f
commit 921df25487

@ -23,6 +23,7 @@ import { PushService } from 'src/app/hmg-common/services/push/push.service';
styleUrls: ['./login.component.scss'] styleUrls: ['./login.component.scss']
}) })
export class LoginComponent implements OnInit, OnDestroy { export class LoginComponent implements OnInit, OnDestroy {
deviceToken1: any;
constructor( constructor(
public cs: CommonService, public cs: CommonService,
@ -127,6 +128,10 @@ export class LoginComponent implements OnInit, OnDestroy {
}); });
this.deviceToken = localStorage.getItem('devicyeToken'); this.deviceToken = localStorage.getItem('devicyeToken');
this.deviceToken1 =this.cs.getDeviceToken();
console.log('lngOnInit localStorage: ' + this.deviceToken1);
console.log('lngOnInit getDeviceToken: ' + this.deviceToken);
if (this.deviceToken) { if (this.deviceToken) {
console.log('login enabled first time: ' + this.deviceToken); console.log('login enabled first time: ' + this.deviceToken);
} else { } else {

@ -18,7 +18,15 @@
<ion-col> <ion-col>
<p class="headerTxt" > {{'verificationcode,verificationcode' | translate}}</p> <p class="headerTxt" > {{'verificationcode,verificationcode' | translate}}</p>
<br/> <br/>
<p class="leftDiv">{{'verificationcode,title' | translate}}<span class="boldTxtNav">{{'verificationcode,verificationcode' | translate}}</span> {{'verificationcode,by' | translate}}<span class="boldTxtNav">{{'verificationcode,sms' | translate}}</span>{{'verificationcode,instruct' | translate}}<span class="boldTxtNav">{{'general,submit' | translate}}</span></p> <p class="leftDiv">{{'verificationcode,title' | translate}}
<span class="boldTxtNav">{{'verificationcode,verificationcode' | translate}}</span>
{{'verificationcode,by' | translate}}
<span *ngIf="loginType == 1" class="boldTxtNav">{{'verificationcode,sms' | translate}}</span>
<span *ngIf="loginType == 4" class="boldTxtNav">whatsapp</span>
{{'verificationcode,instruct' | translate}}
<span class="boldTxtNav">{{'general,submit' | translate}}</span
></p>
</ion-col> </ion-col>
</ion-row> </ion-row>
</ion-grid> </ion-grid>

@ -81,6 +81,7 @@ export class SmsPageComponent implements OnInit {
public smc_code: any = []; public smc_code: any = [];
code: any; code: any;
user_name: string; user_name: string;
loginType: any;
constructor( constructor(
@ -124,7 +125,7 @@ export class SmsPageComponent implements OnInit {
this.loginData= this.sharedData.getSharedData(AuthenticationService.LOGIN_DATA, false); this.loginData= this.sharedData.getSharedData(AuthenticationService.LOGIN_DATA, false);
console.log("loginData : "+ this.loginData); console.log("loginData : "+ this.loginData);
// this.loginType=this.loginTypeData.loginType;
this.deviceToken= this.common.sharedService.getSharedData(AuthenticationService.DEVICE_TOKEN, false); this.deviceToken= this.common.sharedService.getSharedData(AuthenticationService.DEVICE_TOKEN, false);
if(this.deviceToken == undefined){ if(this.deviceToken == undefined){

@ -1,7 +1,10 @@
<ion-header *ngIf="!messageSuccess"> <ion-header *ngIf="!messageSuccess">
<ion-toolbar> <ion-toolbar>
<!-- class="header-toolbar" <nav-buttons></nav-buttons> --> <!-- class="header-toolbar" <nav-buttons></nav-buttons> -->
<ion-title color="dark">{{ 'replacementRoll, title' | translate}}</ion-title> <ion-title *ngIf="!isAnswer" color="dark">{{ 'replacementRoll, title' | translate}}</ion-title>
<!-- <ion-title *ngIf="isAnswer" color="dark">Answer</ion-title> -->
</ion-toolbar> </ion-toolbar>
</ion-header> </ion-header>
@ -52,7 +55,18 @@
</div> --> </div> -->
</ion-list> </ion-list>
<div class="noteInput" *ngIf="isAnswer==true">
<ion-label [hidden]="isAnswer==false" class="boldTxtNav" padding>{{"replacementRoll, question" | translate}} :
{{pQuestion}} ?</ion-label>
<ion-label [hidden]="isAnswer==false" class="boldTxtNav" padding>{{"replacementRoll, answer" | translate}}
</ion-label>
<ion-label [hidden]="isAnswer==true" class="boldTxtNav" padding>{{"replacementRoll, enterNote" | translate}}
</ion-label>
<ion-item>
<ion-textarea [(ngModel)]="userNote"></ion-textarea>
</ion-item>
</div>
<br/>
<ion-item [hidden]="isAnswer==true"> <ion-item [hidden]="isAnswer==true">
<!-- <ion-list *ngIf="ReplacementList"> --> <!-- <ion-list *ngIf="ReplacementList"> -->
@ -133,7 +147,7 @@
<ion-footer *ngIf="!messageSuccess"> <ion-footer *ngIf="!messageSuccess">
<div class="noteInput"> <div class="noteInput" *ngIf="isAnswer!=true">
<ion-label [hidden]="isAnswer==false" class="boldTxtNav" padding>{{"replacementRoll, question" | translate}} : <ion-label [hidden]="isAnswer==false" class="boldTxtNav" padding>{{"replacementRoll, question" | translate}} :
{{pQuestion}} ?</ion-label> {{pQuestion}} ?</ion-label>
<ion-label [hidden]="isAnswer==false" class="boldTxtNav" padding>{{"replacementRoll, answer" | translate}} <ion-label [hidden]="isAnswer==false" class="boldTxtNav" padding>{{"replacementRoll, answer" | translate}}

@ -270,10 +270,10 @@ export class WorkListReplacementRollComponent implements OnInit {
// here must send response attr // here must send response attr
// this.modalCtrl.dismiss(); // this.modalCtrl.dismiss();
// this.workListMainService.actionButton(this.WorkListActionObj). this.workListMainService.actionButton(this.WorkListActionObj).
// subscribe((result: any) => { subscribe((result: any) => {
// this.handleApplayActionResult(result); this.handleApplayActionResult(result);
// }); });
} else { } else {
let msg: string = this.ts.trPK("replacementRoll", "enterNote"); let msg: string = this.ts.trPK("replacementRoll", "enterNote");
this.cs.showErrorMessageDialog(() => { this.cs.showErrorMessageDialog(() => {

@ -127,7 +127,7 @@ export class WorklistMainMRComponent implements OnInit {
this.direction = TranslatorService.getCurrentLanguageName() this.direction = TranslatorService.getCurrentLanguageName()
//this.getPassNotificationDetails = this.common.sharedService.getSharedData('passNotificationInfo'); //this.getPassNotificationDetails = this.common.sharedService.getSharedData('passNotificationInfo');
this.WorkListActionHistoryObj = new WorkListActionHistoryRequest(); this.WorkListActionHistoryObj = new WorkListActionHistoryRequest();
this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM; this.WorkListActionHistoryObj.P_PAGE_NUM = 1;
this.WorkListActionHistoryObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT; this.WorkListActionHistoryObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
// this.WorkListActionHistoryObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID; // this.WorkListActionHistoryObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;
} }
@ -167,7 +167,7 @@ export class WorklistMainMRComponent implements OnInit {
this.WorkListBodyObj.P_TRANSACTION_ID = this.TransactionID; this.WorkListBodyObj.P_TRANSACTION_ID = this.TransactionID;
this.WorkListBodyObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID; this.WorkListBodyObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;
this.WorkListBodyObj.P_PAGE_NUM = this.P_PAGE_NUM;; this.WorkListBodyObj.P_PAGE_NUM = 1;
this.WorkListBodyObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT; this.WorkListBodyObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
this.WorkListButtonsObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID; this.WorkListButtonsObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;
@ -178,7 +178,7 @@ export class WorklistMainMRComponent implements OnInit {
this.WorkListActionObj.P_COMMENTS = ''; this.WorkListActionObj.P_COMMENTS = '';
this.WorkListActionObj.P_APPROVER_INDEX = null; this.WorkListActionObj.P_APPROVER_INDEX = null;
this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM; this.WorkListActionHistoryObj.P_PAGE_NUM = 1;
this.WorkListActionHistoryObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT; this.WorkListActionHistoryObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
this.WorkListActionHistoryObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID; this.WorkListActionHistoryObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;
@ -260,6 +260,7 @@ export class WorklistMainMRComponent implements OnInit {
getNotificationButtons(notificationButtonsObj) { getNotificationButtons(notificationButtonsObj) {
this.notificationButtonRes=[];
this.worklistMainService this.worklistMainService
.getNotificationButtons(notificationButtonsObj) .getNotificationButtons(notificationButtonsObj)
.subscribe((result: NotificatonButtonResponse) => { .subscribe((result: NotificatonButtonResponse) => {
@ -368,7 +369,7 @@ export class WorklistMainMRComponent implements OnInit {
this.common.openWorklistMainPRPage(); this.common.openWorklistMainPRPage();
} }
else else
if(this.notificationArray[index].REQUEST_TYPE == "MR" ){ if(this.notificationArray[index].REQUEST_TYPE == "MO" ){
this.intializeNotificationDetail(); this.intializeNotificationDetail();
}else{ }else{
@ -611,7 +612,7 @@ export class WorklistMainMRComponent implements OnInit {
getNotificationResAttr(notificationButtonsObj) { getNotificationResAttr(notificationButtonsObj) {
console.log("getNotificationResAttr"); console.log("getNotificationResAttr");
this.NotRespondAttributeList=[];
this.worklistMainService this.worklistMainService
.notificationResponseAttr(notificationButtonsObj) .notificationResponseAttr(notificationButtonsObj)
.subscribe((result: NotificatonButtonResponse) => { .subscribe((result: NotificatonButtonResponse) => {
@ -708,7 +709,7 @@ export class WorklistMainMRComponent implements OnInit {
getAttachmentNotification(WorkListAttachObj) { getAttachmentNotification(WorkListAttachObj) {
this.attachmentRes=[];
this.worklistAttachService.getAttach(WorkListAttachObj). this.worklistAttachService.getAttach(WorkListAttachObj).
subscribe((result: NotificationGetAttachResponse) => { subscribe((result: NotificationGetAttachResponse) => {
this.handleWorkListAttachResult(result); this.handleWorkListAttachResult(result);
@ -726,6 +727,7 @@ export class WorklistMainMRComponent implements OnInit {
getActionHistory(WorkListActionHistoryObj) { getActionHistory(WorkListActionHistoryObj) {
this.IsReachEnd = true; this.IsReachEnd = true;
this.actionHistoryRes=[];
this.worklistService.getActionHistory(WorkListActionHistoryObj). this.worklistService.getActionHistory(WorkListActionHistoryObj).
subscribe((result: WorkListActionHistoryResponse) => { subscribe((result: WorkListActionHistoryResponse) => {
this.handleWorkListActionHistoryResult(result); this.handleWorkListActionHistoryResult(result);

@ -62,8 +62,8 @@ export class WorklistMainPoComponent implements OnInit {
getPassNotificationDetails: any; getPassNotificationDetails: any;
public static PASS_RES_ATTR = "passResAttr"; public static PASS_RES_ATTR = "passResAttr";
TransactionID: number = -999; TransactionID: number = -999;
notificationBodyRes: any; notificationBodyRes : any =[];
actionHistoryRes: any; actionHistoryRes: any =[];
notificationButtonRes: any; notificationButtonRes: any;
actionMode: any; actionMode: any;
pInformation: string = ""; pInformation: string = "";
@ -138,7 +138,7 @@ export class WorklistMainPoComponent implements OnInit {
) { ) {
this.direction = TranslatorService.getCurrentLanguageName() this.direction = TranslatorService.getCurrentLanguageName()
this.WorkListActionHistoryObj = new WorkListActionHistoryRequest(); this.WorkListActionHistoryObj = new WorkListActionHistoryRequest();
this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM; this.WorkListActionHistoryObj.P_PAGE_NUM = 1;
this.WorkListActionHistoryObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT; this.WorkListActionHistoryObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
} }
@ -172,7 +172,7 @@ export class WorklistMainPoComponent implements OnInit {
this.WorkListBodyObj.P_TRANSACTION_ID = this.TransactionID; this.WorkListBodyObj.P_TRANSACTION_ID = this.TransactionID;
this.WorkListBodyObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID; this.WorkListBodyObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;
this.WorkListBodyObj.P_PAGE_NUM = this.P_PAGE_NUM;; this.WorkListBodyObj.P_PAGE_NUM = 1;
this.WorkListBodyObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT; this.WorkListBodyObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
this.WorkListButtonsObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID; this.WorkListButtonsObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;
@ -183,7 +183,7 @@ export class WorklistMainPoComponent implements OnInit {
this.WorkListActionObj.P_COMMENTS = ""; this.WorkListActionObj.P_COMMENTS = "";
this.WorkListActionObj.P_APPROVER_INDEX = null; this.WorkListActionObj.P_APPROVER_INDEX = null;
this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM; this.WorkListActionHistoryObj.P_PAGE_NUM = 1;
this.WorkListActionHistoryObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT; this.WorkListActionHistoryObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
this.WorkListActionHistoryObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID; this.WorkListActionHistoryObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;
@ -215,7 +215,7 @@ export class WorklistMainPoComponent implements OnInit {
} }
handleWorkListBodyResult(result, Type) { handleWorkListBodyResult(result, Type) {
this.notificationBodyRes = {}; this.notificationBodyRes = [];
if (this.common.validResponse(result)) { if (this.common.validResponse(result)) {
this.pInformation = result.P_INFORMATION; this.pInformation = result.P_INFORMATION;
this.pQuestion = result.P_QUESTION; this.pQuestion = result.P_QUESTION;
@ -399,7 +399,7 @@ export class WorklistMainPoComponent implements OnInit {
this.common.openWorklistMainPRPage() this.common.openWorklistMainPRPage()
} }
else else
if(this.notificationArray[index].REQUEST_TYPE == "MR" ){ if(this.notificationArray[index].REQUEST_TYPE == "MO" ){
this.common.openWorklistMainMRPage() this.common.openWorklistMainMRPage()
}else{ }else{
this.common.openWorklistMainPage(); this.common.openWorklistMainPage();
@ -480,7 +480,7 @@ export class WorklistMainPoComponent implements OnInit {
this.common.confirmAlertDialogAction( this.common.confirmAlertDialogAction(
() => { () => {
// this.applyAction(this.WorkListActionObj); this.applyAction(this.WorkListActionObj);
}, this.ts.trPK('general', 'ok'), }, this.ts.trPK('general', 'ok'),
() => { }, this.ts.trPK('general', 'cancel'), () => { }, this.ts.trPK('general', 'cancel'),
this.ts.trPK('vacation-rule', 'confirmation'), this.ts.trPK('vacation-rule', 'confirmation'),
@ -651,6 +651,7 @@ export class WorklistMainPoComponent implements OnInit {
getNotificationResAttr(notificationButtonsObj) { getNotificationResAttr(notificationButtonsObj) {
console.log("getNotificationResAttr"); console.log("getNotificationResAttr");
this.NotRespondAttributeList = [];
this.worklistMainService this.worklistMainService
.notificationResponseAttr(notificationButtonsObj) .notificationResponseAttr(notificationButtonsObj)
@ -748,7 +749,7 @@ export class WorklistMainPoComponent implements OnInit {
getAttachmentNotification(WorkListAttachObj) { getAttachmentNotification(WorkListAttachObj) {
this.attachmentRes =[];
this.worklistAttachService.getAttach(WorkListAttachObj). this.worklistAttachService.getAttach(WorkListAttachObj).
subscribe((result: NotificationGetAttachResponse) => { subscribe((result: NotificationGetAttachResponse) => {
this.handleWorkListAttachResult(result); this.handleWorkListAttachResult(result);
@ -766,6 +767,7 @@ export class WorklistMainPoComponent implements OnInit {
getActionHistory(WorkListActionHistoryObj) { getActionHistory(WorkListActionHistoryObj) {
this.IsReachEnd = true; this.IsReachEnd = true;
this.actionHistoryRes=[];
this.worklistService.getActionHistory(WorkListActionHistoryObj). this.worklistService.getActionHistory(WorkListActionHistoryObj).
subscribe((result: WorkListActionHistoryResponse) => { subscribe((result: WorkListActionHistoryResponse) => {
this.handleWorkListActionHistoryResult(result); this.handleWorkListActionHistoryResult(result);

@ -124,7 +124,7 @@ export class WorklistMainPRComponent implements OnInit {
this.direction = TranslatorService.getCurrentLanguageName() this.direction = TranslatorService.getCurrentLanguageName()
//this.getPassNotificationDetails = this.common.sharedService.getSharedData('passNotificationInfo'); //this.getPassNotificationDetails = this.common.sharedService.getSharedData('passNotificationInfo');
this.WorkListActionHistoryObj = new WorkListActionHistoryRequest(); this.WorkListActionHistoryObj = new WorkListActionHistoryRequest();
this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM; this.WorkListActionHistoryObj.P_PAGE_NUM = 1;
this.WorkListActionHistoryObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT; this.WorkListActionHistoryObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
// this.WorkListActionHistoryObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID; // this.WorkListActionHistoryObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;
} }
@ -164,7 +164,7 @@ export class WorklistMainPRComponent implements OnInit {
this.WorkListBodyObj.P_TRANSACTION_ID = this.TransactionID; this.WorkListBodyObj.P_TRANSACTION_ID = this.TransactionID;
this.WorkListBodyObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID; this.WorkListBodyObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;
this.WorkListBodyObj.P_PAGE_NUM = this.P_PAGE_NUM;; this.WorkListBodyObj.P_PAGE_NUM = 1;
this.WorkListBodyObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT; this.WorkListBodyObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
this.WorkListButtonsObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID; this.WorkListButtonsObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;
@ -175,7 +175,7 @@ export class WorklistMainPRComponent implements OnInit {
this.WorkListActionObj.P_COMMENTS = ''; this.WorkListActionObj.P_COMMENTS = '';
this.WorkListActionObj.P_APPROVER_INDEX = null; this.WorkListActionObj.P_APPROVER_INDEX = null;
this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM; this.WorkListActionHistoryObj.P_PAGE_NUM = 1;
this.WorkListActionHistoryObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT; this.WorkListActionHistoryObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
this.WorkListActionHistoryObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID; this.WorkListActionHistoryObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;
@ -245,7 +245,7 @@ export class WorklistMainPRComponent implements OnInit {
} }
handleWorkListBodyResult(result, Type) { handleWorkListBodyResult(result, Type) {
this.notificationBodyRes = {}; this.notificationBodyRes = [];
if (this.common.validResponse(result)) { if (this.common.validResponse(result)) {
this.pInformation = result.P_INFORMATION; this.pInformation = result.P_INFORMATION;
this.pQuestion = result.P_QUESTION; this.pQuestion = result.P_QUESTION;
@ -396,7 +396,7 @@ export class WorklistMainPRComponent implements OnInit {
this.intializeNotificationDetail(); this.intializeNotificationDetail();
} }
else else
if(this.notificationArray[index].REQUEST_TYPE == "MR" ){ if(this.notificationArray[index].REQUEST_TYPE == "MO" ){
this.common.openWorklistMainMRPage() this.common.openWorklistMainMRPage()
}else{ }else{
this.common.openWorklistMainPage(); this.common.openWorklistMainPage();
@ -740,7 +740,7 @@ export class WorklistMainPRComponent implements OnInit {
getAttachmentNotification(WorkListAttachObj) { getAttachmentNotification(WorkListAttachObj) {
this.attachmentRes = [];
this.worklistAttachService.getAttach(WorkListAttachObj). this.worklistAttachService.getAttach(WorkListAttachObj).
subscribe((result: NotificationGetAttachResponse) => { subscribe((result: NotificationGetAttachResponse) => {
this.handleWorkListAttachResult(result); this.handleWorkListAttachResult(result);
@ -758,6 +758,7 @@ export class WorklistMainPRComponent implements OnInit {
getActionHistory(WorkListActionHistoryObj) { getActionHistory(WorkListActionHistoryObj) {
this.IsReachEnd = true; this.IsReachEnd = true;
this.actionHistoryRes = [];
this.worklistService.getActionHistory(WorkListActionHistoryObj). this.worklistService.getActionHistory(WorkListActionHistoryObj).
subscribe((result: WorkListActionHistoryResponse) => { subscribe((result: WorkListActionHistoryResponse) => {
this.handleWorkListActionHistoryResult(result); this.handleWorkListActionHistoryResult(result);

@ -38,7 +38,6 @@
<div *ngIf="pInformation && pInformation != '' " class="tipsPadding">{{pInformation}}</div> <div *ngIf="pInformation && pInformation != '' " class="tipsPadding">{{pInformation}}</div>
<ng-container *ngIf="activeSegment === 'info'"> <ng-container *ngIf="activeSegment === 'info'">
<div *ngIf="notificationBodyRes?.length > 0 "> <div *ngIf="notificationBodyRes?.length > 0 ">
<ion-card *ngFor="let item of notificationBodyRes;let i=index; "> <ion-card *ngFor="let item of notificationBodyRes;let i=index; ">
@ -47,11 +46,18 @@
</ion-card-header> --> </ion-card-header> -->
<ion-card-content> <ion-card-content>
<div class="noDataDiv" [hidden]="actionHistoryRes && actionHistoryRes.length > 0">
<p>{{ 'general, empty' | translate}}</p>
</div>
<div> <div>
<ion-row class="" *ngIf=" item.Collection_Notification.DISPLAY_FLAG != 'N' "> <ion-row class="" *ngIf=" item.Collection_Notification.DISPLAY_FLAG != 'N' ">
<ion-col class="rowBorder" *ngFor="let notificationBody of item.Collection_Notification;" <ion-col class="rowBorder" *ngFor="let notificationBody of item.Collection_Notification;"
size="6"> size="6">
<label class="colItemReq" for="">{{notificationBody.SEGMENT_PROMPT}}</label> <label class="colItemReq" for="">{{notificationBody.SEGMENT_PROMPT}}</label>
<!-- </ion-col> <!-- </ion-col>
<ion-col col-7> --> <ion-col col-7> -->
@ -66,7 +72,8 @@
</div> </div>
<div style="margin: 10px; " *ngIf="subordinatesleaveList != undefined">Employee will also on leave </div> <div style="margin: 10px; " *ngIf="subordinatesleaveList != undefined && subordinatesleaveList?.length > 0">
Employee will also on leave </div>
<ion-item lines="none" class="subOrdinateList" *ngFor="let List of subordinatesleaveList;"> <ion-item lines="none" class="subOrdinateList" *ngFor="let List of subordinatesleaveList;">

@ -53,8 +53,8 @@ export class WorklistMainComponent implements OnInit {
getPassNotificationDetails: any; getPassNotificationDetails: any;
public static PASS_RES_ATTR = "passResAttr"; public static PASS_RES_ATTR = "passResAttr";
TransactionID: number = -999; TransactionID: number = -999;
notificationBodyRes: any; notificationBodyRes: any =[];
actionHistoryRes: any; actionHistoryRes: any =[];
notificationButtonRes: any; notificationButtonRes: any;
actionMode: any; actionMode: any;
pInformation: string = ""; pInformation: string = "";
@ -70,7 +70,7 @@ export class WorklistMainComponent implements OnInit {
P_RESPOND_ATTRIBUTES_TBL: any; P_RESPOND_ATTRIBUTES_TBL: any;
selEmployeeID: any; selEmployeeID: any;
actionType: string = ""; actionType: string = "";
notificationArray: any; notificationArray: any =[];
notificationDynamicAttributeArr: any; notificationDynamicAttributeArr: any;
private textInput: TextInput; private textInput: TextInput;
private textArea: TextAreaInput; private textArea: TextAreaInput;
@ -80,7 +80,7 @@ export class WorklistMainComponent implements OnInit {
notificationCount: any; notificationCount: any;
activeSegment: any = "item-req"; activeSegment: any = "item-req";
lines_note_limit: any = 24; lines_note_limit: any = 24;
attachmentRes: any; attachmentRes: any =[];
private WorkListActionHistoryObj: WorkListActionHistoryRequest; private WorkListActionHistoryObj: WorkListActionHistoryRequest;
IsReachEnd: boolean = true; IsReachEnd: boolean = true;
notiActionBtnMore: any = []; notiActionBtnMore: any = [];
@ -88,7 +88,7 @@ export class WorklistMainComponent implements OnInit {
confirmMsg: string; confirmMsg: string;
newArr: any = []; newArr: any = [];
selEmp: any; selEmp: any;
subordinatesleaveList: any; subordinatesleaveList: any =[];
private WorkListSubmitterInfoObj: WorkListSubmitterInfoRequest; private WorkListSubmitterInfoObj: WorkListSubmitterInfoRequest;
submitterInfoRes: any; submitterInfoRes: any;
approveDis: boolean = false; approveDis: boolean = false;
@ -119,7 +119,7 @@ export class WorklistMainComponent implements OnInit {
) { ) {
this.direction = TranslatorService.getCurrentLanguageName() this.direction = TranslatorService.getCurrentLanguageName()
this.WorkListActionHistoryObj = new WorkListActionHistoryRequest(); this.WorkListActionHistoryObj = new WorkListActionHistoryRequest();
this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM; this.WorkListActionHistoryObj.P_PAGE_NUM = 1;
this.WorkListActionHistoryObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT; this.WorkListActionHistoryObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
} }
@ -168,6 +168,8 @@ export class WorklistMainComponent implements OnInit {
); );
console.log("for next()"+ this.getPassNotificationDetails.ROW_NUM); console.log("for next()"+ this.getPassNotificationDetails.ROW_NUM);
this.notificationArray=[]
this.subordinatesleaveList=[];
this.notificationArray = this.common.sharedService.getSharedData( this.notificationArray = this.common.sharedService.getSharedData(
HomeComponent.NOTIFICATION_ARR, HomeComponent.NOTIFICATION_ARR,
false false
@ -192,7 +194,7 @@ export class WorklistMainComponent implements OnInit {
this.WorkListActionObj.P_COMMENTS = ""; this.WorkListActionObj.P_COMMENTS = "";
this.WorkListActionObj.P_APPROVER_INDEX = null; this.WorkListActionObj.P_APPROVER_INDEX = null;
this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM; this.WorkListActionHistoryObj.P_PAGE_NUM = 1;
this.WorkListActionHistoryObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT; this.WorkListActionHistoryObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
this.WorkListActionHistoryObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID; this.WorkListActionHistoryObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;
this.WorkListAttachObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID; this.WorkListAttachObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;
@ -253,6 +255,7 @@ export class WorklistMainComponent implements OnInit {
} }
getEITNotificationDetails(notificationBodyObj) { getEITNotificationDetails(notificationBodyObj) {
this.notificationBodyRes = []
this.worklistMainService this.worklistMainService
.getEITNotificationBody(notificationBodyObj) .getEITNotificationBody(notificationBodyObj)
.subscribe((result: EITNotificatonBodyResponse) => { .subscribe((result: EITNotificatonBodyResponse) => {
@ -261,6 +264,7 @@ export class WorklistMainComponent implements OnInit {
} }
getAbsenceNotificationDetails(notificationBodyObj) { getAbsenceNotificationDetails(notificationBodyObj) {
this.notificationBodyRes = [];
this.worklistMainService this.worklistMainService
.getAbsencesNotificationBody(notificationBodyObj) .getAbsencesNotificationBody(notificationBodyObj)
.subscribe((result: AbsenceNotificatonBodyResponse) => { .subscribe((result: AbsenceNotificatonBodyResponse) => {
@ -269,7 +273,7 @@ export class WorklistMainComponent implements OnInit {
} }
handleWorkListBodyResult(result, Type) { handleWorkListBodyResult(result, Type) {
this.notificationBodyRes = {};
if (this.common.validResponse(result)) { if (this.common.validResponse(result)) {
this.pInformation = result.P_INFORMATION; this.pInformation = result.P_INFORMATION;
this.pQuestion = result.P_QUESTION; this.pQuestion = result.P_QUESTION;
@ -277,11 +281,17 @@ export class WorklistMainComponent implements OnInit {
if (result.GetEITCollectionNotificationBodyList) { if (result.GetEITCollectionNotificationBodyList) {
this.notificationBodyRes = this.notificationBodyRes =
result.GetEITCollectionNotificationBodyList; result.GetEITCollectionNotificationBodyList;
if(this.notificationBodyRes[0].Collection_Notification){
console.log(this.notificationBodyRes[0].Collection_Notification);
}
} }
} else if (Type == "ABSENCE") { } else if (Type == "ABSENCE") {
if (result.GetAbsenceCollectionNotificationBodyList) { if (result.GetAbsenceCollectionNotificationBodyList) {
this.notificationBodyRes = this.notificationBodyRes =
result.GetAbsenceCollectionNotificationBodyList; result.GetAbsenceCollectionNotificationBodyList ;
if(this.notificationBodyRes[0].Collection_Notification){
console.log(this.notificationBodyRes[0].Collection_Notification);
}
// getDimensions(this.notificationBodyRes) { // getDimensions(this.notificationBodyRes) {
let obj = (this.notificationBodyRes[0].Collection_Notification).filter(function (list) { let obj = (this.notificationBodyRes[0].Collection_Notification).filter(function (list) {
@ -304,6 +314,7 @@ export class WorklistMainComponent implements OnInit {
getNotificationButtons(notificationButtonsObj) { getNotificationButtons(notificationButtonsObj) {
this.notificationButtonRes=[];
this.worklistMainService this.worklistMainService
.getNotificationButtons(notificationButtonsObj) .getNotificationButtons(notificationButtonsObj)
.subscribe((result: NotificatonButtonResponse) => { .subscribe((result: NotificatonButtonResponse) => {
@ -422,7 +433,7 @@ export class WorklistMainComponent implements OnInit {
this.common.openWorklistMainPRPage() this.common.openWorklistMainPRPage()
} }
else else
if(this.notificationArray[index].REQUEST_TYPE == "MR" ){ if(this.notificationArray[index].REQUEST_TYPE == "MO" ){
this.common.openWorklistMainMRPage() this.common.openWorklistMainMRPage()
}else{ }else{
@ -773,6 +784,8 @@ export class WorklistMainComponent implements OnInit {
// } // }
getAttachmentNotification(WorkListAttachObj) { getAttachmentNotification(WorkListAttachObj) {
this.attachmentRes = []
console.log(" this.P_PAGE_NUM: "+ this.P_PAGE_NUM);
this.worklistAttachService.getAttach(WorkListAttachObj). this.worklistAttachService.getAttach(WorkListAttachObj).
subscribe((result: NotificationGetAttachResponse) => { subscribe((result: NotificationGetAttachResponse) => {
@ -791,6 +804,8 @@ export class WorklistMainComponent implements OnInit {
getActionHistory(WorkListActionHistoryObj) { getActionHistory(WorkListActionHistoryObj) {
this.IsReachEnd = true; this.IsReachEnd = true;
this.actionHistoryRes =[];
console.log(" this.P_PAGE_NUM: "+ this.P_PAGE_NUM);
this.worklistService.getActionHistory(WorkListActionHistoryObj). this.worklistService.getActionHistory(WorkListActionHistoryObj).
subscribe((result: WorkListActionHistoryResponse) => { subscribe((result: WorkListActionHistoryResponse) => {
this.handleWorkListActionHistoryResult(result); this.handleWorkListActionHistoryResult(result);
@ -944,6 +959,7 @@ export class WorklistMainComponent implements OnInit {
} }
getsubmitterInfo(notificationSubmitterInfoObj) { getsubmitterInfo(notificationSubmitterInfoObj) {
this.submitterInfoRes=[];
this.worklistMainService.getSubmitterInfo(notificationSubmitterInfoObj). this.worklistMainService.getSubmitterInfo(notificationSubmitterInfoObj).
subscribe((result: WorklistsubmitterInfoResponse) => { subscribe((result: WorklistsubmitterInfoResponse) => {
this.handleSubmitterInfoResult(result); this.handleSubmitterInfoResult(result);

Loading…
Cancel
Save