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']
})
export class LoginComponent implements OnInit, OnDestroy {
deviceToken1: any;
constructor(
public cs: CommonService,
@ -127,6 +128,10 @@ export class LoginComponent implements OnInit, OnDestroy {
});
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) {
console.log('login enabled first time: ' + this.deviceToken);
} else {

@ -18,7 +18,15 @@
<ion-col>
<p class="headerTxt" > {{'verificationcode,verificationcode' | translate}}</p>
<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-row>
</ion-grid>

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

@ -1,7 +1,10 @@
<ion-header *ngIf="!messageSuccess">
<ion-toolbar>
<!-- 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-header>
@ -52,7 +55,18 @@
</div> -->
</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-list *ngIf="ReplacementList"> -->
@ -133,7 +147,7 @@
<ion-footer *ngIf="!messageSuccess">
<div class="noteInput">
<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}}

@ -270,10 +270,10 @@ export class WorkListReplacementRollComponent implements OnInit {
// 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(() => {

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

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

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

@ -38,7 +38,6 @@
<div *ngIf="pInformation && pInformation != '' " class="tipsPadding">{{pInformation}}</div>
<ng-container *ngIf="activeSegment === 'info'">
<div *ngIf="notificationBodyRes?.length > 0 ">
<ion-card *ngFor="let item of notificationBodyRes;let i=index; ">
@ -47,11 +46,18 @@
</ion-card-header> -->
<ion-card-content>
<div class="noDataDiv" [hidden]="actionHistoryRes && actionHistoryRes.length > 0">
<p>{{ 'general, empty' | translate}}</p>
</div>
<div>
<ion-row class="" *ngIf=" item.Collection_Notification.DISPLAY_FLAG != 'N' ">
<ion-col class="rowBorder" *ngFor="let notificationBody of item.Collection_Notification;"
size="6">
<label class="colItemReq" for="">{{notificationBody.SEGMENT_PROMPT}}</label>
<!-- </ion-col>
<ion-col col-7> -->
@ -66,7 +72,8 @@
</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;">

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

Loading…
Cancel
Save