|
|
|
|
@ -7,9 +7,7 @@ import { AbsenceNotificatonBodyResponse } from "../models/AbsenceNotificationBod
|
|
|
|
|
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 { TextInput } from 'src/app/uI-elements/text.input';
|
|
|
|
|
@ -78,7 +76,7 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
P_PAGE_NUM: number = 1;
|
|
|
|
|
P_PAGE_LIMIT: number = 100;
|
|
|
|
|
notificationCount: any;
|
|
|
|
|
activeSegment: any = "item-req";
|
|
|
|
|
activeSegment: any = 'item-req';
|
|
|
|
|
lines_note_limit: any = 24;
|
|
|
|
|
attachmentRes: any = [];
|
|
|
|
|
private WorkListActionHistoryObj: WorkListActionHistoryRequest;
|
|
|
|
|
@ -119,19 +117,15 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
private modalCtrl: ModalController,
|
|
|
|
|
public dashboredService: DashboredService,
|
|
|
|
|
public authService: AuthenticationService
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
) {
|
|
|
|
|
this.direction = TranslatorService.getCurrentLanguageName()
|
|
|
|
|
console.log("ENAD TEST LANG: "+this.direction);
|
|
|
|
|
this.WorkListActionHistoryObj = new WorkListActionHistoryRequest();
|
|
|
|
|
this.WorkListActionHistoryObj.P_PAGE_NUM = 1;
|
|
|
|
|
this.WorkListActionHistoryObj.P_PAGE_LIMIT = this.P_PAGE_LIMIT;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ngOnInit() {
|
|
|
|
|
|
|
|
|
|
this.selEmp = this.common.sharedService.getSharedData(
|
|
|
|
|
MenuResponse.SHARED_SEL_EMP,
|
|
|
|
|
false
|
|
|
|
|
@ -140,24 +134,13 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
this.authService.loadAuthenticatedUser().subscribe((user: AuthenticatedUser) => {
|
|
|
|
|
if (user) {
|
|
|
|
|
this.selEmp = user.ASSIGNMENT_NUMBER;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//name=document.getElementById('notificationDynamicFields').value;
|
|
|
|
|
//removeElement('parentDiv', name);"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//var navbar = document.getElementById("notificationDynamicFields").value;
|
|
|
|
|
// document.querySelector('svg .gauge.chart > text').remove();
|
|
|
|
|
// var inputValue = (<HTMLInputElement>document.getElementById("notificationDynamicFields")).value;
|
|
|
|
|
|
|
|
|
|
console.log(" this.selEmp" + this.selEmp);
|
|
|
|
|
this.intializeNotificationDetail();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public segmentChanged(event: any) {
|
|
|
|
|
this.activeSegment = event.detail.value;
|
|
|
|
|
if(this.activeSegment === 'item-req')
|
|
|
|
|
@ -177,18 +160,38 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
this.slides.slideTo(3);
|
|
|
|
|
}
|
|
|
|
|
console.log(" event.detail.value: " + event.detail.value);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
intializeNotificationDetail() {
|
|
|
|
|
public slideChanged(event: any) {
|
|
|
|
|
this.slides.getActiveIndex().then(index => {
|
|
|
|
|
console.log(index);
|
|
|
|
|
console.log(event);
|
|
|
|
|
if(index === 0)
|
|
|
|
|
{
|
|
|
|
|
this.activeSegment = 'item-req';
|
|
|
|
|
}
|
|
|
|
|
else if(index === 1)
|
|
|
|
|
{
|
|
|
|
|
this.activeSegment = 'action-history';
|
|
|
|
|
}
|
|
|
|
|
else if(index === 2)
|
|
|
|
|
{
|
|
|
|
|
this.activeSegment = 'attach';
|
|
|
|
|
}
|
|
|
|
|
else if(index === 3)
|
|
|
|
|
{
|
|
|
|
|
this.activeSegment = 'info';
|
|
|
|
|
}
|
|
|
|
|
console.log(this.activeSegment);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public intializeNotificationDetail() {
|
|
|
|
|
this.approveDis = false;
|
|
|
|
|
this.rejectDis = false;
|
|
|
|
|
this.requestDis = false;
|
|
|
|
|
this.moreDisabled = true;
|
|
|
|
|
this.closeDis = false;
|
|
|
|
|
// this.approve_label="";
|
|
|
|
|
// this.reject_label="";
|
|
|
|
|
// this.reqInfo_label="";
|
|
|
|
|
|
|
|
|
|
if (this.messageSuccess) {
|
|
|
|
|
document.getElementById("notificationDynamicFields").innerHTML = "";
|
|
|
|
|
@ -199,7 +202,6 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
false
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
console.log("for next()" + this.getPassNotificationDetails.ROW_NUM);
|
|
|
|
|
this.notificationArray = []
|
|
|
|
|
this.subordinatesleaveList = [];
|
|
|
|
|
this.notificationArray = this.common.sharedService.getSharedData(
|
|
|
|
|
@ -273,7 +275,6 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
this.worklistMainService
|
|
|
|
|
.getMONotificationBody(notificationBodyObj)
|
|
|
|
|
.subscribe((result: MONotificatonBodyResponse) => {
|
|
|
|
|
//this.handleWorkListBodyResult(result, "MO");
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -281,8 +282,6 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
this.worklistMainService
|
|
|
|
|
.getPONotificationBody(notificationBodyObj)
|
|
|
|
|
.subscribe((result: PONotificatonBodyResponse) => {
|
|
|
|
|
// console.log(result.GetPoNotificationBodyList.POHeader[0].BUYER);
|
|
|
|
|
// this.handleWorkListBodyResult(result, "PO");
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -325,13 +324,10 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
console.log(this.notificationBodyRes[0].Collection_Notification);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// getDimensions(this.notificationBodyRes) {
|
|
|
|
|
let obj = (this.notificationBodyRes[0].Collection_Notification).filter(function (list) {
|
|
|
|
|
return list.SEGMENT_NAME === "END_DATE" || list.SEGMENT_NAME === "START_DATE";
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// return obj;
|
|
|
|
|
// }
|
|
|
|
|
this.getSubordinatesleave(obj)
|
|
|
|
|
}
|
|
|
|
|
} else if (Type == "PR") {
|
|
|
|
|
@ -343,8 +339,6 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
}
|
|
|
|
|
} //End handleWorkListBodyResult
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getNotificationButtons(notificationButtonsObj) {
|
|
|
|
|
this.notificationButtonRes = [];
|
|
|
|
|
this.worklistMainService
|
|
|
|
|
@ -383,7 +377,7 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
this.moreDisabled = false;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
} // valid it
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} // End handleWorkListButtonsResult
|
|
|
|
|
@ -416,8 +410,6 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
// this.openNotificationsDashboard();
|
|
|
|
|
this.nextNotfification();
|
|
|
|
|
}, 5000);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
} // valid it
|
|
|
|
|
}
|
|
|
|
|
@ -448,11 +440,8 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public nextNotfification() {
|
|
|
|
|
//let itemExist = false;
|
|
|
|
|
if (document.getElementById("notificationDynamicFields") != null) {
|
|
|
|
|
|
|
|
|
|
document.getElementById("notificationDynamicFields").innerHTML = "";
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
let itemNo = this.getPassNotificationDetails.ROW_NUM;
|
|
|
|
|
console.log(itemNo);
|
|
|
|
|
@ -473,10 +462,8 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
if (this.notificationArray[index].REQUEST_TYPE == "MO") {
|
|
|
|
|
this.common.openWorklistMainMRPage()
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
this.intializeNotificationDetail();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
this.common.openNotificationPage();
|
|
|
|
|
@ -501,9 +488,6 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
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") {
|
|
|
|
|
obj.ATTRIBUTE_TEXT_VALUE = (document.getElementById(this.notificationDynamicAttributeArr[i].ATTRIBUTE_NAME) as HTMLInputElement).value;
|
|
|
|
|
}
|
|
|
|
|
@ -520,8 +504,6 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
this.P_RESPOND_ATTRIBUTES_TBL.push(obj);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
console.log("b" + this.P_RESPOND_ATTRIBUTES_TBL);
|
|
|
|
|
|
|
|
|
|
if (
|
|
|
|
|
ButtonAction == "APPROVED" ||
|
|
|
|
|
ButtonAction == "REJECTED" ||
|
|
|
|
|
@ -546,7 +528,6 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
this.P_RESPOND_ATTRIBUTES_TBL,
|
|
|
|
|
WorklistMainComponent.PASS_RES_ATTR
|
|
|
|
|
);
|
|
|
|
|
// this.applyAction(this.WorkListActionObj);
|
|
|
|
|
|
|
|
|
|
if (ButtonAction === "APPROVED") {
|
|
|
|
|
this.confirmMsg = this.ts.trPK('worklistMain', 'approveMsg')
|
|
|
|
|
@ -561,7 +542,6 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
}
|
|
|
|
|
else if (ButtonAction === "CLOSE") {
|
|
|
|
|
this.confirmMsg = this.ts.trPK('worklistMain', 'closeMsg')
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.common.confirmAlertDialogAction(
|
|
|
|
|
@ -571,15 +551,8 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
() => { }, this.ts.trPK('general', 'cancel'),
|
|
|
|
|
this.ts.trPK('vacation-rule', 'confirmation'),
|
|
|
|
|
this.confirmMsg)
|
|
|
|
|
|
|
|
|
|
// this.openApplyModal(this.WorkListActionObj);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (ButtonAction == "RFC") {
|
|
|
|
|
// alert("Return For Correction");
|
|
|
|
|
this.WorkListActionObj.P_ACTION_MODE = ButtonAction;
|
|
|
|
|
@ -599,12 +572,6 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
//this.common.openWorklistRFCPage();
|
|
|
|
|
this.openRFCModal();
|
|
|
|
|
} else if (ButtonAction == "ANSWER_INFO") {
|
|
|
|
|
// this.navCtrl.push("WorkListReplacmentRollPage", {
|
|
|
|
|
// pQuestion: this.pQuestion,
|
|
|
|
|
// passNotificationInfo: this.getPassNotificationDetails,
|
|
|
|
|
// passActionMode: ButtonAction,
|
|
|
|
|
// passResAttr: this.P_RESPOND_ATTRIBUTES_TBL
|
|
|
|
|
// });
|
|
|
|
|
this.common.sharedService.setSharedData(this.pQuestion, "pQuestion");
|
|
|
|
|
this.common.sharedService.setSharedData(
|
|
|
|
|
this.getPassNotificationDetails,
|
|
|
|
|
@ -628,11 +595,6 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
) {
|
|
|
|
|
// alert("multi option: "+ ButtonAction);
|
|
|
|
|
this.WorkListActionObj.P_ACTION_MODE = ButtonAction;
|
|
|
|
|
// this.navCtrl.push("WorkListReplacmentRollPage", {
|
|
|
|
|
// passNotificationInfo: this.getPassNotificationDetails,
|
|
|
|
|
// passActionMode: ButtonAction,
|
|
|
|
|
// passResAttr: this.P_RESPOND_ATTRIBUTES_TBL
|
|
|
|
|
// });
|
|
|
|
|
this.common.sharedService.setSharedData(
|
|
|
|
|
this.getPassNotificationDetails,
|
|
|
|
|
WorklistMainComponent.PASS_NOTIFICATION_INFO
|
|
|
|
|
@ -646,8 +608,6 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
WorklistMainComponent.PASS_RES_ATTR
|
|
|
|
|
);
|
|
|
|
|
console.log("c" + this.P_RESPOND_ATTRIBUTES_TBL);
|
|
|
|
|
|
|
|
|
|
// this.common.openWorklistRollReplacement();
|
|
|
|
|
this.openRepRolModal();
|
|
|
|
|
} else if (
|
|
|
|
|
ButtonAction == "UPDATE_ACTION" ||
|
|
|
|
|
@ -673,11 +633,6 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
this.getPassNotificationDetails,
|
|
|
|
|
AbsenceNotificatonBodyResponse.NOT_WORKLIST
|
|
|
|
|
);
|
|
|
|
|
// this.navCtrl.push("SubmitAbsencePage", {
|
|
|
|
|
// dirfromNotificationPage: true,
|
|
|
|
|
// submitAbsObjList: this.notificationBodyRes[0].Collection_Notification
|
|
|
|
|
// });
|
|
|
|
|
//this.common.openConfirmAbsece();
|
|
|
|
|
this.dirfromNotificationPage = true,
|
|
|
|
|
this.common.sharedService.setSharedData(
|
|
|
|
|
this.dirfromNotificationPage,
|
|
|
|
|
@ -707,9 +662,6 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
openActionHistory() {
|
|
|
|
|
// this.navCtrl.push("WorkListActionHistoryPage", {
|
|
|
|
|
// passNotificationInfo: this.getPassNotificationDetails
|
|
|
|
|
// });
|
|
|
|
|
this.common.sharedService.setSharedData(
|
|
|
|
|
this.getPassNotificationDetails,
|
|
|
|
|
WorklistMainComponent.PASS_NOTIFICATION_INFO
|
|
|
|
|
@ -717,12 +669,7 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
this.common.openWorklistHistoryPage();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
openSupportDocuments() {
|
|
|
|
|
// this.navCtrl.push("WorkListAttachPage", {
|
|
|
|
|
// passNotificationInfo: this.getPassNotificationDetails
|
|
|
|
|
// });
|
|
|
|
|
this.common.sharedService.setSharedData(
|
|
|
|
|
this.getPassNotificationDetails,
|
|
|
|
|
WorklistMainComponent.PASS_NOTIFICATION_INFO
|
|
|
|
|
@ -741,8 +688,6 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
handleNotificationResAttrResult(result) {
|
|
|
|
|
if (this.common.validResponse(result)) {
|
|
|
|
|
// this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA);
|
|
|
|
|
|
|
|
|
|
this.NotRespondAttributeList = [];
|
|
|
|
|
result.NotificationGetRespondAttributesList;
|
|
|
|
|
if (
|
|
|
|
|
@ -877,52 +822,32 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public checkLines(note) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (note && note != null) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return (note.length > this.lines_note_limit) ? true : false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public turnCateFun(actionHis) {
|
|
|
|
|
for (let i = 0; i < actionHis.length; i++) {
|
|
|
|
|
actionHis[i].visible = false;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.actionHistoryRes = actionHis;
|
|
|
|
|
console.log("test");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async openMoreActions() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const modal = await this.modalCtrl.create({
|
|
|
|
|
component: MoreActionModalComponent,
|
|
|
|
|
backdropDismiss: false,
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
modal.cssClass = 'note-modal';
|
|
|
|
|
|
|
|
|
|
modal.onDidDismiss()
|
|
|
|
|
.then((data) => {
|
|
|
|
|
console.log(data.data);
|
|
|
|
|
|
|
|
|
|
if (data.data == "cancel" || data.data == undefined) {
|
|
|
|
|
return;
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
// this.selectedAction = data.data;
|
|
|
|
|
this.actionType = data.data.BUTTON_ACTION;
|
|
|
|
|
console.log(this.actionType);
|
|
|
|
|
@ -930,21 +855,14 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
this.actionButton(this.actionType);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return await modal.present();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
async OpenAttachFiles(value, Type) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async OpenAttachFiles(value, Type) {
|
|
|
|
|
this.common.sharedService.setSharedData({ displayData: value, TypeData: Type }, 'WorkListAttachViewPage')
|
|
|
|
|
const modal = await this.modalCtrl.create({
|
|
|
|
|
component: WorkListAttachViewComponent
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return await modal.present();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -952,7 +870,6 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
///calling getSubleave
|
|
|
|
|
|
|
|
|
|
getSubordinatesleave(list) {
|
|
|
|
|
|
|
|
|
|
console.log(list);
|
|
|
|
|
let to;
|
|
|
|
|
let from;
|
|
|
|
|
@ -964,33 +881,20 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
from = list[i].DATE_VALUE;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
console.log(new Date(to));
|
|
|
|
|
console.log(new Date(from));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const request = new GetSubordinatesLeavesRequest();
|
|
|
|
|
request.P_DATE_FROM = "/Date(" + Date.parse(from) + '+0300' + ")/";//new Date(from);
|
|
|
|
|
request.P_DATE_TO = "/Date(" + Date.parse(to) + '+0300' + ")/" //new Date(to);
|
|
|
|
|
request.P_SELECTED_EMPLOYEE_NUMBER = this.selEmp;
|
|
|
|
|
// ="'/Date(" + Date.parse(from) + ")'"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.dashboredService.getSubordinatesLeaves(request).
|
|
|
|
|
subscribe((result: any) => {
|
|
|
|
|
|
|
|
|
|
this.handleSubordinatesLeavesResult(result);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public handleSubordinatesLeavesResult(result) {
|
|
|
|
|
if (this.common.validResponse(result)) {
|
|
|
|
|
// GetSubordinatesLeavesList it used in dashbored
|
|
|
|
|
// if (this.common.hasData(result.GetSubordinatesLeavesList)) {
|
|
|
|
|
if (this.common.hasData(result.SubordinatesOnLeavesList)) {
|
|
|
|
|
|
|
|
|
|
this.subordinatesleaveList = result.SubordinatesOnLeavesList;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -1002,6 +906,7 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
this.handleSubmitterInfoResult(result);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
handleSubmitterInfoResult(result) {
|
|
|
|
|
if (this.common.validResponse(result)) {
|
|
|
|
|
// this.sharedData.setSharedData(result, WorKListResponse.SHARED_DATA);
|
|
|
|
|
@ -1013,107 +918,66 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
}// End handleWorkListButtonsResult
|
|
|
|
|
|
|
|
|
|
async openRepRolModal() {
|
|
|
|
|
|
|
|
|
|
const modal = await this.modalCtrl.create({
|
|
|
|
|
component: WorkListReplacementRollComponent,
|
|
|
|
|
backdropDismiss: false,
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
modal.cssClass = 'replaceRoll-modal';
|
|
|
|
|
|
|
|
|
|
modal.onDidDismiss()
|
|
|
|
|
.then((data) => {
|
|
|
|
|
console.log(data.data);
|
|
|
|
|
|
|
|
|
|
if (data.data == "cancel" || data.data == undefined) {
|
|
|
|
|
return;
|
|
|
|
|
} else if (data.data == "Success") {
|
|
|
|
|
// this.openNotificationsDashboard();
|
|
|
|
|
this.nextNotfification();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return await modal.present();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async openRFCModal() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const modal = await this.modalCtrl.create({
|
|
|
|
|
component: WorkListRfcComponent,
|
|
|
|
|
backdropDismiss: false,
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
modal.cssClass = 'replaceRoll-modal';
|
|
|
|
|
|
|
|
|
|
modal.onDidDismiss()
|
|
|
|
|
.then((data) => {
|
|
|
|
|
console.log(data.data);
|
|
|
|
|
|
|
|
|
|
if (data.data == "cancel" || data.data == undefined) {
|
|
|
|
|
return;
|
|
|
|
|
} else if (data.data == "Success") {
|
|
|
|
|
// this.openNotificationsDashboard();
|
|
|
|
|
this.nextNotfification();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return await modal.present();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async openApplyModal(WorkListActionObj) {
|
|
|
|
|
|
|
|
|
|
this.common.sharedService.setSharedData(this.getPassNotificationDetails, WorklistMainComponent.PASS_NOTIFICATION_INFO);
|
|
|
|
|
this.common.sharedService.setSharedData(WorkListActionObj, 'ApplyActionModalPage')
|
|
|
|
|
// this.common.sharedService.setSharedData(
|
|
|
|
|
// this.WorkListActionObj,
|
|
|
|
|
// WorklistMainPRComponent.PASS_NOTIFICATION_INFO
|
|
|
|
|
// );
|
|
|
|
|
|
|
|
|
|
const modal = await this.modalCtrl.create({
|
|
|
|
|
component: ApplyActionModalComponent,
|
|
|
|
|
backdropDismiss: false,
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
modal.cssClass = 'note-modal';
|
|
|
|
|
|
|
|
|
|
modal.onDidDismiss()
|
|
|
|
|
.then((data) => {
|
|
|
|
|
console.log(data); // Here's your selected user!
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return await modal.present();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
loadMoreActionHistory() {
|
|
|
|
|
|
|
|
|
|
if (!this.IsReachEnd) {
|
|
|
|
|
console.log("doInfinite action history MR");
|
|
|
|
|
|
|
|
|
|
this.worklistService.getActionHistory(this.WorkListActionHistoryObj).
|
|
|
|
|
subscribe((result: any) => {
|
|
|
|
|
if (this.common.validResponse(result)) {
|
|
|
|
|
if (result.GetActionHistoryList != undefined) {
|
|
|
|
|
this.P_PAGE_NUM++;
|
|
|
|
|
this.WorkListActionHistoryObj.P_PAGE_NUM = this.P_PAGE_NUM;
|
|
|
|
|
|
|
|
|
|
(result.GetActionHistoryList).forEach(element => {
|
|
|
|
|
if (element.ROW_NUM == element.NO_OF_ROWS) {
|
|
|
|
|
this.IsReachEnd = true;
|
|
|
|
|
@ -1131,17 +995,12 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
}// if response == 1
|
|
|
|
|
//this.pageNum++;
|
|
|
|
|
// infiniteScroll.target.complete();
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
console.log("no doInfinite action history MR");
|
|
|
|
|
|
|
|
|
|
//if (infiniteScroll)
|
|
|
|
|
//infiniteScroll.target.complete();
|
|
|
|
|
}
|
|
|
|
|
}//end infiniteScroll
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
openNotificationsDashboard() {
|
|
|
|
|
this.dashboredService.getOpenNotifications('', '', this.isPostNoLoad).subscribe((result: GetOpenNotificationsResponse) => {
|
|
|
|
|
if (this.common.validResponse(result)) {
|
|
|
|
|
@ -1151,29 +1010,4 @@ export class WorklistMainComponent implements OnInit {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
slideChanged() {
|
|
|
|
|
this.slides.getActiveIndex().then(index => {
|
|
|
|
|
console.log(index);
|
|
|
|
|
if(index === 0)
|
|
|
|
|
{
|
|
|
|
|
this.activeSegment = 'item-req';
|
|
|
|
|
}
|
|
|
|
|
else if(index === 1)
|
|
|
|
|
{
|
|
|
|
|
this.activeSegment = 'action-history';
|
|
|
|
|
}
|
|
|
|
|
else if(index === 2)
|
|
|
|
|
{
|
|
|
|
|
this.activeSegment = 'attach';
|
|
|
|
|
}
|
|
|
|
|
else if(index === 3)
|
|
|
|
|
{
|
|
|
|
|
this.activeSegment = 'info';
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|