|
|
|
|
@ -1,17 +1,17 @@
|
|
|
|
|
import { Component, OnInit, ElementRef } from "@angular/core";
|
|
|
|
|
import { CommonService } from "src/app/hmg-common/services/common/common.service";
|
|
|
|
|
import { TranslatorService } from "src/app/hmg-common/services/translator/translator.service";
|
|
|
|
|
import { WorkListBodyRequest } from "../models/NotificationBodyReq";
|
|
|
|
|
import { EITNotificatonBodyResponse } from "../models/EITNotificationBodyRes";
|
|
|
|
|
import { AbsenceNotificatonBodyResponse } from "../models/AbsenceNotificationBodyRes";
|
|
|
|
|
import { NotificatonButtonResponse } from "../models/NotificationButtonRes";
|
|
|
|
|
import { WorkListActionRequest } from "../models/NotificationActionReq";
|
|
|
|
|
import { WorkListButtonRequest } from "../models/NotificationButtonReq";
|
|
|
|
|
import { Component, OnInit, ElementRef } from '@angular/core';
|
|
|
|
|
import { CommonService } from 'src/app/hmg-common/services/common/common.service';
|
|
|
|
|
import { TranslatorService } from 'src/app/hmg-common/services/translator/translator.service';
|
|
|
|
|
import { WorkListBodyRequest } from '../models/NotificationBodyReq';
|
|
|
|
|
import { EITNotificatonBodyResponse } from '../models/EITNotificationBodyRes';
|
|
|
|
|
import { AbsenceNotificatonBodyResponse } from '../models/AbsenceNotificationBodyRes';
|
|
|
|
|
import { NotificatonButtonResponse } from '../models/NotificationButtonRes';
|
|
|
|
|
import { WorkListActionRequest } from '../models/NotificationActionReq';
|
|
|
|
|
import { WorkListButtonRequest } from '../models/NotificationButtonReq';
|
|
|
|
|
// import { isDate } from 'angular6-json-schema-form';
|
|
|
|
|
import { MenuResponse } from "src/app/hmg-common/services/menu/models/menu-response";
|
|
|
|
|
import { LoginRequest } from "src/app/hmg-common/services/authentication/models/login.request";
|
|
|
|
|
import { WorklistMainService } from "../service/work-list.main.service";
|
|
|
|
|
import { HomeComponent } from "src/app/notification/home/home.component";
|
|
|
|
|
import { MenuResponse } from 'src/app/hmg-common/services/menu/models/menu-response';
|
|
|
|
|
import { LoginRequest } from 'src/app/hmg-common/services/authentication/models/login.request';
|
|
|
|
|
import { WorklistMainService } from '../service/work-list.main.service';
|
|
|
|
|
import { HomeComponent } from 'src/app/notification/home/home.component';
|
|
|
|
|
import { TextInput } from 'src/app/uI-elements/text.input';
|
|
|
|
|
import { TextAreaInput } from 'src/app/uI-elements/text-area.input';
|
|
|
|
|
import { MenuService } from 'src/app/hmg-common/services/menu/menuservice.service';
|
|
|
|
|
@ -45,17 +45,17 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
|
private WorkListActionHistoryObj: WorkListActionHistoryRequest;
|
|
|
|
|
private WorkListAttachObj: WorkListButtonRequest;
|
|
|
|
|
private PRList: PRNotificatonBodyList
|
|
|
|
|
public static PASS_NOTIFICATION_INFO = "passNotificationInfo";
|
|
|
|
|
public static PASS_ACTION_MODE = "passActionMode";
|
|
|
|
|
public static PASS_NOTIFICATION_INFO = 'passNotificationInfo';
|
|
|
|
|
public static PASS_ACTION_MODE = 'passActionMode';
|
|
|
|
|
getPassNotificationDetails: any;
|
|
|
|
|
public static PASS_RES_ATTR = "passResAttr";
|
|
|
|
|
public static PASS_RES_ATTR = 'passResAttr';
|
|
|
|
|
TransactionID: number = -999;
|
|
|
|
|
notificationBodyRes: any;
|
|
|
|
|
actionHistoryRes: any;
|
|
|
|
|
notificationButtonRes: any;
|
|
|
|
|
actionMode: any;
|
|
|
|
|
pInformation: string = "";
|
|
|
|
|
pQuestion: string = "";
|
|
|
|
|
pInformation: string = '';
|
|
|
|
|
pQuestion: string = '';
|
|
|
|
|
RespondAttributesListRes: any;
|
|
|
|
|
schemaNotific: any;
|
|
|
|
|
NotRespondAttributeList: any;
|
|
|
|
|
@ -66,7 +66,7 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
|
dataOfAttr: any;
|
|
|
|
|
P_RESPOND_ATTRIBUTES_TBL: any;
|
|
|
|
|
selEmployeeID: any;
|
|
|
|
|
actionType: string = "";
|
|
|
|
|
actionType: string = '';
|
|
|
|
|
notificationArray: any;
|
|
|
|
|
notificationDynamicAttributeArr: any;
|
|
|
|
|
private textInput: TextInput;
|
|
|
|
|
@ -87,7 +87,7 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
|
confirmMsg: string;
|
|
|
|
|
delMsg: string;
|
|
|
|
|
closeMsg: string;
|
|
|
|
|
activeSegment: any = "item-req";
|
|
|
|
|
activeSegment: any = 'item-req';
|
|
|
|
|
lines_note_limit: any = 24;
|
|
|
|
|
orgNote: string;
|
|
|
|
|
truncating: boolean;
|
|
|
|
|
@ -100,7 +100,7 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
|
rejectDis: boolean = false;
|
|
|
|
|
requestDis: boolean = false;
|
|
|
|
|
direction: string;
|
|
|
|
|
|
|
|
|
|
defaultSegment = '';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
constructor(
|
|
|
|
|
@ -133,14 +133,14 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
|
}
|
|
|
|
|
public segmentChanged(event: any) {
|
|
|
|
|
this.activeSegment = event.detail.value;
|
|
|
|
|
console.log(" event.detail.value: " + event.detail.value);
|
|
|
|
|
console.log(' event.detail.value: ' + event.detail.value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
intializeNotificationDetail() {
|
|
|
|
|
if (this.messageSuccess) {
|
|
|
|
|
document.getElementById("notificationDynamicFields").innerHTML = "";
|
|
|
|
|
document.getElementById('notificationDynamicFields').innerHTML = '';
|
|
|
|
|
}
|
|
|
|
|
console.log("intializeNotificationDetail");
|
|
|
|
|
console.log('intializeNotificationDetail');
|
|
|
|
|
this.getPassNotificationDetails = this.common.sharedService.getSharedData(
|
|
|
|
|
HomeComponent.NOTIFICATION_DATA,
|
|
|
|
|
false
|
|
|
|
|
@ -163,9 +163,9 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
|
this.WorkListButtonsObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;
|
|
|
|
|
|
|
|
|
|
this.WorkListActionObj.P_NOTIFICATION_ID = this.getPassNotificationDetails.NOTIFICATION_ID;
|
|
|
|
|
this.WorkListActionObj.P_FORWARD_TO_USER_NAME = "";
|
|
|
|
|
this.WorkListActionObj.P_ACTION_MODE = "";
|
|
|
|
|
this.WorkListActionObj.P_COMMENTS = "";
|
|
|
|
|
this.WorkListActionObj.P_FORWARD_TO_USER_NAME = '';
|
|
|
|
|
this.WorkListActionObj.P_ACTION_MODE = '';
|
|
|
|
|
this.WorkListActionObj.P_COMMENTS = '';
|
|
|
|
|
this.WorkListActionObj.P_APPROVER_INDEX = null;
|
|
|
|
|
|
|
|
|
|
this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM;
|
|
|
|
|
@ -178,15 +178,15 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
|
this.getNotificationResAttr(this.WorkListButtonsObj);
|
|
|
|
|
this.getActionHistory(this.WorkListActionHistoryObj);
|
|
|
|
|
this.getAttachmentNotification(this.WorkListAttachObj);
|
|
|
|
|
if (this.getPassNotificationDetails.REQUEST_TYPE == "EIT") {
|
|
|
|
|
if (this.getPassNotificationDetails.REQUEST_TYPE == 'EIT') {
|
|
|
|
|
this.getEITNotificationDetails(this.WorkListBodyObj);
|
|
|
|
|
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "ABSENCE") {
|
|
|
|
|
} else if (this.getPassNotificationDetails.REQUEST_TYPE == 'ABSENCE') {
|
|
|
|
|
this.getAbsenceNotificationDetails(this.WorkListBodyObj);
|
|
|
|
|
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "PO") {
|
|
|
|
|
} else if (this.getPassNotificationDetails.REQUEST_TYPE == 'PO') {
|
|
|
|
|
this.getPONotificationDetails(this.WorkListBodyObj);
|
|
|
|
|
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "MO") {
|
|
|
|
|
} else if (this.getPassNotificationDetails.REQUEST_TYPE == 'MO') {
|
|
|
|
|
this.getMONotificationDetails(this.WorkListBodyObj);
|
|
|
|
|
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "PR") {
|
|
|
|
|
} else if (this.getPassNotificationDetails.REQUEST_TYPE == 'PR') {
|
|
|
|
|
this.getPRNotificationDetails(this.WorkListBodyObj);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -195,7 +195,7 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
|
this.worklistMainService
|
|
|
|
|
.getPRNotificationBody(notificationBodyObj)
|
|
|
|
|
.subscribe((result: PRNotificatonBodyResponse) => {
|
|
|
|
|
this.handleWorkListBodyResult(result, "PR");
|
|
|
|
|
this.handleWorkListBodyResult(result, 'PR');
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -203,7 +203,7 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
|
this.worklistMainService
|
|
|
|
|
.getMONotificationBody(notificationBodyObj)
|
|
|
|
|
.subscribe((result: MONotificatonBodyResponse) => {
|
|
|
|
|
this.handleWorkListBodyResult(result, "MO");
|
|
|
|
|
this.handleWorkListBodyResult(result, 'MO');
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -212,7 +212,7 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
|
.getPONotificationBody(notificationBodyObj)
|
|
|
|
|
.subscribe((result: PONotificatonBodyResponse) => {
|
|
|
|
|
console.log(result.GetPoNotificationBodyList.POHeader[0].BUYER);
|
|
|
|
|
this.handleWorkListBodyResult(result, "PO");
|
|
|
|
|
this.handleWorkListBodyResult(result, 'PO');
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -220,7 +220,7 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
|
this.worklistMainService
|
|
|
|
|
.getEITNotificationBody(notificationBodyObj)
|
|
|
|
|
.subscribe((result: EITNotificatonBodyResponse) => {
|
|
|
|
|
this.handleWorkListBodyResult(result, "EIT");
|
|
|
|
|
this.handleWorkListBodyResult(result, 'EIT');
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -228,7 +228,7 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
|
this.worklistMainService
|
|
|
|
|
.getAbsencesNotificationBody(notificationBodyObj)
|
|
|
|
|
.subscribe((result: AbsenceNotificatonBodyResponse) => {
|
|
|
|
|
this.handleWorkListBodyResult(result, "ABSENCE");
|
|
|
|
|
this.handleWorkListBodyResult(result, 'ABSENCE');
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -237,7 +237,7 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
|
if (this.common.validResponse(result)) {
|
|
|
|
|
this.pInformation = result.P_INFORMATION;
|
|
|
|
|
this.pQuestion = result.P_QUESTION;
|
|
|
|
|
if (Type == "MO") {
|
|
|
|
|
if (Type == 'MO') {
|
|
|
|
|
if (result.GetMoNotificationBodyList) {
|
|
|
|
|
this.notificationBodyRes =
|
|
|
|
|
result.GetMoNotificationBodyList;
|
|
|
|
|
@ -262,16 +262,16 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
|
// this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA);
|
|
|
|
|
if (result.GetNotificationButtonsList != null) {
|
|
|
|
|
this.notificationButtonRes = result.GetNotificationButtonsList;
|
|
|
|
|
this.common.sharedService.setSharedData(this.notificationButtonRes, "passActionMore");
|
|
|
|
|
console.log("test" + this.notificationButtonRes.length);
|
|
|
|
|
this.common.sharedService.setSharedData(this.notificationButtonRes, 'passActionMore');
|
|
|
|
|
console.log('test' + this.notificationButtonRes.length);
|
|
|
|
|
for (let i = 0; i < this.notificationButtonRes.length; i++) {
|
|
|
|
|
if (this.notificationButtonRes[i].BUTTON_ACTION == "APPROVE") {
|
|
|
|
|
if (this.notificationButtonRes[i].BUTTON_ACTION == 'APPROVE') {
|
|
|
|
|
this.approveDis = true;
|
|
|
|
|
} else
|
|
|
|
|
if (this.notificationButtonRes[i].BUTTON_ACTION == "REJECT") {
|
|
|
|
|
if (this.notificationButtonRes[i].BUTTON_ACTION == 'REJECT') {
|
|
|
|
|
this.rejectDis = true;
|
|
|
|
|
} else
|
|
|
|
|
if (this.notificationButtonRes[i].BUTTON_ACTION == "REQUEST_INFO") {
|
|
|
|
|
if (this.notificationButtonRes[i].BUTTON_ACTION == 'REQUEST_INFO') {
|
|
|
|
|
this.requestDis = true;
|
|
|
|
|
} // if result == null
|
|
|
|
|
} // valid it
|
|
|
|
|
@ -328,7 +328,7 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
actionButton(action) {
|
|
|
|
|
console.log("actionButton" + action);
|
|
|
|
|
console.log('actionButton' + action);
|
|
|
|
|
// alert("don't forget");
|
|
|
|
|
//let ButtonAction: string = this.actionType;
|
|
|
|
|
let ButtonAction: string = action;
|
|
|
|
|
@ -337,13 +337,13 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
|
for (let i = 0; i < this.notificationDynamicAttributeArr.length; i++) {
|
|
|
|
|
let obj: any = {};
|
|
|
|
|
obj.ATTRIBUTE_NAME = this.notificationDynamicAttributeArr[i].ATTRIBUTE_NAME;
|
|
|
|
|
if (this.notificationDynamicAttributeArr[i].ATTRIBUTE_TYPE === "number") {
|
|
|
|
|
if (this.notificationDynamicAttributeArr[i].ATTRIBUTE_TYPE === 'number') {
|
|
|
|
|
obj.ATTRIBUTE_NUMBER_VALUE = (document.getElementById(this.notificationDynamicAttributeArr[i].ATTRIBUTE_NAME) as HTMLInputElement).value;
|
|
|
|
|
}
|
|
|
|
|
// else if (isDate(responseAttrDic[key])) {
|
|
|
|
|
// obj.ATTRIBUTE_DATE_VALUE = responseAttrDic[key];
|
|
|
|
|
// }
|
|
|
|
|
else if (this.notificationDynamicAttributeArr[i].ATTRIBUTE_TYPE == "VARCHAR2") {
|
|
|
|
|
else if (this.notificationDynamicAttributeArr[i].ATTRIBUTE_TYPE == 'VARCHAR2') {
|
|
|
|
|
obj.ATTRIBUTE_TEXT_VALUE = (document.getElementById(this.notificationDynamicAttributeArr[i].ATTRIBUTE_NAME) as HTMLInputElement).value;
|
|
|
|
|
}
|
|
|
|
|
this.P_RESPOND_ATTRIBUTES_TBL.push(obj);
|
|
|
|
|
@ -351,20 +351,20 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
|
let repUserName = this.selEmployeeID;
|
|
|
|
|
if (this.hideForwordEmployee && this.hideForwordEmployee.ATTRIBUTE_NAME) {
|
|
|
|
|
let obj: any = {};
|
|
|
|
|
repUserName = "";
|
|
|
|
|
repUserName = '';
|
|
|
|
|
obj.ATTRIBUTE_NAME = this.hideForwordEmployee.ATTRIBUTE_NAME;
|
|
|
|
|
obj.ATTRIBUTE_TEXT_VALUE = this.selEmployeeID;
|
|
|
|
|
this.P_RESPOND_ATTRIBUTES_TBL.push(obj);
|
|
|
|
|
}
|
|
|
|
|
if (
|
|
|
|
|
ButtonAction == "APPROVE" ||
|
|
|
|
|
ButtonAction == "REJECT" ||
|
|
|
|
|
ButtonAction == "DEL" ||
|
|
|
|
|
ButtonAction == "CLOSE"
|
|
|
|
|
ButtonAction == 'APPROVE' ||
|
|
|
|
|
ButtonAction == 'REJECT' ||
|
|
|
|
|
ButtonAction == 'DEL' ||
|
|
|
|
|
ButtonAction == 'CLOSE'
|
|
|
|
|
) {
|
|
|
|
|
this.WorkListActionObj.P_FORWARD_TO_USER_NAME = "";
|
|
|
|
|
this.WorkListActionObj.P_FORWARD_TO_USER_NAME = '';
|
|
|
|
|
this.WorkListActionObj.P_ACTION_MODE = ButtonAction;
|
|
|
|
|
this.WorkListActionObj.P_COMMENTS = "";
|
|
|
|
|
this.WorkListActionObj.P_COMMENTS = '';
|
|
|
|
|
this.WorkListActionObj.RespondAttributeList = this.P_RESPOND_ATTRIBUTES_TBL;
|
|
|
|
|
//sheardData
|
|
|
|
|
|
|
|
|
|
@ -374,18 +374,18 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
/////////////////////////////////////////////
|
|
|
|
|
if (ButtonAction == "APPROVE") {
|
|
|
|
|
if (ButtonAction == 'APPROVE') {
|
|
|
|
|
this.confirmMsg = this.ts.trPK('worklistMain', 'approveMsg')
|
|
|
|
|
}
|
|
|
|
|
else if (ButtonAction == "REJECT") {
|
|
|
|
|
else if (ButtonAction == 'REJECT') {
|
|
|
|
|
this.confirmMsg = this.ts.trPK('worklistMain', 'rejectMsg')
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else if (ButtonAction == "DEL") {
|
|
|
|
|
else if (ButtonAction == 'DEL') {
|
|
|
|
|
this.confirmMsg = this.ts.trPK('worklistMain', 'delMsg')
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else if (ButtonAction == "CLOSE") {
|
|
|
|
|
else if (ButtonAction == 'CLOSE') {
|
|
|
|
|
this.confirmMsg = this.ts.trPK('worklistMain', 'closeMsg')
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
@ -416,7 +416,7 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
|
////////////this.applyAction(this.WorkListActionObj);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (ButtonAction == "RFC") {
|
|
|
|
|
if (ButtonAction == 'RFC') {
|
|
|
|
|
// alert("Return For Correction");
|
|
|
|
|
this.WorkListActionObj.P_ACTION_MODE = ButtonAction;
|
|
|
|
|
// this.navCtrl.push("WorkListRfcPage", {
|
|
|
|
|
@ -438,9 +438,9 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
|
);
|
|
|
|
|
// this.common.openWorklistRFCPage();
|
|
|
|
|
this.openRFCModal();
|
|
|
|
|
} else if (ButtonAction == "ANSWER_INFO") {
|
|
|
|
|
} else if (ButtonAction == 'ANSWER_INFO') {
|
|
|
|
|
|
|
|
|
|
this.common.sharedService.setSharedData(this.pQuestion, "pQuestion");
|
|
|
|
|
this.common.sharedService.setSharedData(this.pQuestion, 'pQuestion');
|
|
|
|
|
this.common.sharedService.setSharedData(
|
|
|
|
|
this.getPassNotificationDetails,
|
|
|
|
|
WorklistMainMRComponent.PASS_NOTIFICATION_INFO
|
|
|
|
|
@ -456,12 +456,12 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
|
//this.common.openWorklistRollReplacement();
|
|
|
|
|
this.openReplacementRoll();
|
|
|
|
|
} else if (
|
|
|
|
|
ButtonAction == "DELEGATE" ||
|
|
|
|
|
ButtonAction == "REQUEST_INFO" ||
|
|
|
|
|
ButtonAction == "TRANSFER" ||
|
|
|
|
|
ButtonAction == "TRANSFER_INFO" ||
|
|
|
|
|
ButtonAction == "APPROVE_AND_FORWARD" ||
|
|
|
|
|
ButtonAction == "FORWARD"
|
|
|
|
|
ButtonAction == 'DELEGATE' ||
|
|
|
|
|
ButtonAction == 'REQUEST_INFO' ||
|
|
|
|
|
ButtonAction == 'TRANSFER' ||
|
|
|
|
|
ButtonAction == 'TRANSFER_INFO' ||
|
|
|
|
|
ButtonAction == 'APPROVE_AND_FORWARD' ||
|
|
|
|
|
ButtonAction == 'FORWARD'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
) {
|
|
|
|
|
@ -487,10 +487,10 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
|
// this.common.openWorklistRollReplacement();
|
|
|
|
|
this.openReplacementRoll();
|
|
|
|
|
} else if (
|
|
|
|
|
ButtonAction == "UPDATE_ACTION" ||
|
|
|
|
|
ButtonAction == "CONTINUE_ACTION"
|
|
|
|
|
ButtonAction == 'UPDATE_ACTION' ||
|
|
|
|
|
ButtonAction == 'CONTINUE_ACTION'
|
|
|
|
|
) {
|
|
|
|
|
if (this.getPassNotificationDetails.REQUEST_TYPE == "EIT") {
|
|
|
|
|
if (this.getPassNotificationDetails.REQUEST_TYPE == 'EIT') {
|
|
|
|
|
this.common.sharedService.setSharedData(
|
|
|
|
|
this.notificationBodyRes,
|
|
|
|
|
EITNotificatonBodyResponse.SHARED_DATA
|
|
|
|
|
@ -500,7 +500,7 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
|
EITNotificatonBodyResponse.NOT_WORKLIST
|
|
|
|
|
);
|
|
|
|
|
// this.navCtrl.push("EitUpdateListPage");
|
|
|
|
|
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "ABSENCE") {
|
|
|
|
|
} else if (this.getPassNotificationDetails.REQUEST_TYPE == 'ABSENCE') {
|
|
|
|
|
this.common.sharedService.setSharedData(
|
|
|
|
|
this.notificationBodyRes,
|
|
|
|
|
AbsenceNotificatonBodyResponse.SHARED_DATA
|
|
|
|
|
@ -518,15 +518,15 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
|
}
|
|
|
|
|
else if (this.notificationButtonRes.length > 0 && !ButtonAction) {
|
|
|
|
|
(this.elementRef.nativeElement.querySelectorAll(
|
|
|
|
|
"ion-item"
|
|
|
|
|
'ion-item'
|
|
|
|
|
) as HTMLElement[]).forEach(x => {
|
|
|
|
|
if (x.classList.contains("requiredItem")) {
|
|
|
|
|
x.classList.add("ng-touched");
|
|
|
|
|
x.classList.remove("ng-untouched");
|
|
|
|
|
if (x.classList.contains('requiredItem')) {
|
|
|
|
|
x.classList.add('ng-touched');
|
|
|
|
|
x.classList.remove('ng-untouched');
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
this.common.presentAlert(
|
|
|
|
|
this.ts.trPK("worklistMain", "actionRequird")
|
|
|
|
|
this.ts.trPK('worklistMain', 'actionRequird')
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -569,7 +569,7 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
|
this.NotRespondAttributeList =
|
|
|
|
|
result.NotificationGetRespondAttributesList;
|
|
|
|
|
if (
|
|
|
|
|
result.NotificationRespondRolesList != "" &&
|
|
|
|
|
result.NotificationRespondRolesList != '' &&
|
|
|
|
|
result.NotificationRespondRolesList[0].ATTRIBUTE_NAME != null &&
|
|
|
|
|
result.NotificationRespondRolesList[0].ATTRIBUTE_NAME != undefined
|
|
|
|
|
) {
|
|
|
|
|
@ -592,20 +592,20 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
|
notificationDynamicFields(notificationAttr) {
|
|
|
|
|
const containerId = 'notificationDynamicFields';
|
|
|
|
|
for (let i = 0; i < notificationAttr.length; i++) {
|
|
|
|
|
if (notificationAttr[i].ATTRIBUTE_TYPE == "VARCHAR2") {
|
|
|
|
|
this.textArea = new TextAreaInput(notificationAttr[i].ATTRIBUTE_DISPLAY_NAME, notificationAttr[i].ATTRIBUTE_NAME, "", containerId, "", "", "");
|
|
|
|
|
} else if (notificationAttr[i].ATTRIBUTE_TYPE == "ROLE") {
|
|
|
|
|
if (notificationAttr[i].ATTRIBUTE_TYPE == 'VARCHAR2') {
|
|
|
|
|
this.textArea = new TextAreaInput(notificationAttr[i].ATTRIBUTE_DISPLAY_NAME, notificationAttr[i].ATTRIBUTE_NAME, '', containerId, '', '', '');
|
|
|
|
|
} else if (notificationAttr[i].ATTRIBUTE_TYPE == 'ROLE') {
|
|
|
|
|
|
|
|
|
|
} else if (notificationAttr[i].ATTRIBUTE_TYPE == "DATE") {
|
|
|
|
|
} else if (notificationAttr[i].ATTRIBUTE_TYPE == 'DATE') {
|
|
|
|
|
|
|
|
|
|
} else if (notificationAttr[i].ATTRIBUTE_TYPE == "NUMBER") {
|
|
|
|
|
} else if (notificationAttr[i].ATTRIBUTE_TYPE == 'NUMBER') {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
openNotificationBody() {
|
|
|
|
|
if (this.getPassNotificationDetails.REQUEST_TYPE == "EIT") {
|
|
|
|
|
if (this.getPassNotificationDetails.REQUEST_TYPE == 'EIT') {
|
|
|
|
|
this.common.sharedService.setSharedData(
|
|
|
|
|
this.notificationBodyRes,
|
|
|
|
|
EITNotificatonBodyResponse.SHARED_DATA
|
|
|
|
|
@ -615,9 +615,9 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
|
EITNotificatonBodyResponse.NOT_WORKLIST
|
|
|
|
|
);
|
|
|
|
|
// this.navCtrl.push("WorkListDetailsPage", { NotBodyType: "EIT" });
|
|
|
|
|
this.common.sharedService.setSharedData("EIT", "NotBodyType");
|
|
|
|
|
this.common.sharedService.setSharedData('EIT', 'NotBodyType');
|
|
|
|
|
this.common.openNotificationDetailsPage();
|
|
|
|
|
} else if (this.getPassNotificationDetails.REQUEST_TYPE == "ABSENCE") {
|
|
|
|
|
} else if (this.getPassNotificationDetails.REQUEST_TYPE == 'ABSENCE') {
|
|
|
|
|
this.common.sharedService.setSharedData(
|
|
|
|
|
this.notificationBodyRes,
|
|
|
|
|
AbsenceNotificatonBodyResponse.SHARED_DATA
|
|
|
|
|
@ -626,7 +626,7 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
|
this.getPassNotificationDetails,
|
|
|
|
|
AbsenceNotificatonBodyResponse.NOT_WORKLIST
|
|
|
|
|
);
|
|
|
|
|
this.common.sharedService.setSharedData("ABSENCE", "NotBodyType");
|
|
|
|
|
this.common.sharedService.setSharedData('ABSENCE', 'NotBodyType');
|
|
|
|
|
//this.navCtrl.push("WorkListDetailsPage", { NotBodyType: "ABSENCE" });
|
|
|
|
|
this.common.openNotificationDetailsPage();
|
|
|
|
|
}
|
|
|
|
|
@ -641,7 +641,7 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
|
if (this.notificationCount <= 0) {
|
|
|
|
|
this.notificationCount = null;
|
|
|
|
|
}
|
|
|
|
|
this.events.publish("getNotCount", this.notificationCount);
|
|
|
|
|
this.events.publish('getNotCount', this.notificationCount);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
@ -699,7 +699,7 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
|
async openNoteDetail(note, sender) {
|
|
|
|
|
// let modalPage = this.modalCtrl.create('ViewNoteModalPage', { textNote: note });
|
|
|
|
|
// modalPage.present();
|
|
|
|
|
console.log("note" + note);
|
|
|
|
|
console.log('note' + note);
|
|
|
|
|
|
|
|
|
|
this.common.sharedService.setSharedData(note, 'ViewNoteModalPage')
|
|
|
|
|
this.common.sharedService.setSharedData(sender, 'ViewNoteModalPageSender')
|
|
|
|
|
@ -715,7 +715,7 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
doInfinite(infiniteScroll) {
|
|
|
|
|
console.log("doInfinite action history MR");
|
|
|
|
|
console.log('doInfinite action history MR');
|
|
|
|
|
|
|
|
|
|
if (!this.IsReachEnd) {
|
|
|
|
|
this.worklistService.getActionHistory(this.WorkListActionHistoryObj).
|
|
|
|
|
@ -800,7 +800,7 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
doInfiniteNotificationBody(infiniteScroll) {
|
|
|
|
|
console.log("doInfiniteNotificationBody MR");
|
|
|
|
|
console.log('doInfiniteNotificationBody MR');
|
|
|
|
|
if (!this.IsReachEnd) {
|
|
|
|
|
this.worklistMainService.getMONotificationBody(this.WorkListActionHistoryObj).
|
|
|
|
|
subscribe((result: any) => {
|
|
|
|
|
@ -835,9 +835,9 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
loadMoreNotificationBody() {
|
|
|
|
|
console.log("loadMoreNotificationBody MR");
|
|
|
|
|
console.log('loadMoreNotificationBody MR');
|
|
|
|
|
if (!this.IsReachEnd) {
|
|
|
|
|
console.log("this.IsReachEnd" + this.IsReachEnd);
|
|
|
|
|
console.log('this.IsReachEnd' + this.IsReachEnd);
|
|
|
|
|
|
|
|
|
|
this.worklistMainService.getMONotificationBody(this.WorkListBodyObj).
|
|
|
|
|
subscribe((result: any) => {
|
|
|
|
|
@ -855,7 +855,7 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
|
this.notificationBodyRes.push(element);
|
|
|
|
|
}, (Error) => console.log(Error), () =>
|
|
|
|
|
//infiniteScroll.target.complete()
|
|
|
|
|
console.log("test")
|
|
|
|
|
console.log('test')
|
|
|
|
|
);
|
|
|
|
|
}// if list length >0
|
|
|
|
|
else {
|
|
|
|
|
@ -872,7 +872,7 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
|
}
|
|
|
|
|
}//end infiniteScroll
|
|
|
|
|
loadMoreActionHistory() {
|
|
|
|
|
console.log("doInfinite action history MR");
|
|
|
|
|
console.log('doInfinite action history MR');
|
|
|
|
|
|
|
|
|
|
if (!this.IsReachEnd) {
|
|
|
|
|
this.worklistService.getActionHistory(this.WorkListActionHistoryObj).
|
|
|
|
|
@ -891,7 +891,7 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
|
this.actionHistoryRes.push(element);
|
|
|
|
|
}, (Error) => console.log(Error), () =>
|
|
|
|
|
//infiniteScroll.target.complete()
|
|
|
|
|
console.log("TEST"));
|
|
|
|
|
console.log('TEST'));
|
|
|
|
|
}// if list length >0
|
|
|
|
|
else {
|
|
|
|
|
this.IsReachEnd = true;
|
|
|
|
|
@ -922,7 +922,7 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
|
.then((data) => {
|
|
|
|
|
console.log(data.data);
|
|
|
|
|
|
|
|
|
|
if (data.data == "cancel" || data.data == undefined) {
|
|
|
|
|
if (data.data == 'cancel' || data.data == undefined) {
|
|
|
|
|
return;
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
@ -945,7 +945,7 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
|
///////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
public checkLines(note) {
|
|
|
|
|
console.log(note.split("\n").length);
|
|
|
|
|
console.log(note.split('\n').length);
|
|
|
|
|
console.log(note.length);
|
|
|
|
|
|
|
|
|
|
if (note && note != null) {
|
|
|
|
|
@ -970,7 +970,7 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.actionHistoryRes = actionHis;
|
|
|
|
|
console.log("test");
|
|
|
|
|
console.log('test');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -986,9 +986,9 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
|
modal.onDidDismiss().then((data) => {
|
|
|
|
|
console.log(data.data);
|
|
|
|
|
|
|
|
|
|
if (data.data == "cancel" || data.data == undefined) {
|
|
|
|
|
if (data.data == 'cancel' || data.data == undefined) {
|
|
|
|
|
return;
|
|
|
|
|
} else if (data.data == "Success") {
|
|
|
|
|
} else if (data.data == 'Success') {
|
|
|
|
|
this.getNotificationCountAfterSubmit();
|
|
|
|
|
this.nextNotfification();
|
|
|
|
|
|
|
|
|
|
@ -1018,9 +1018,9 @@ export class WorklistMainMRComponent implements OnInit {
|
|
|
|
|
.then((data) => {
|
|
|
|
|
console.log(data.data);
|
|
|
|
|
|
|
|
|
|
if (data.data == "cancel" || data.data == undefined) {
|
|
|
|
|
if (data.data == 'cancel' || data.data == undefined) {
|
|
|
|
|
return;
|
|
|
|
|
} else if (data.data == "Success") {
|
|
|
|
|
} else if (data.data == 'Success') {
|
|
|
|
|
this.getNotificationCountAfterSubmit();
|
|
|
|
|
this.nextNotfification();
|
|
|
|
|
|
|
|
|
|
|