|
|
|
|
@ -33,6 +33,7 @@ export class WorkListMainItgComponent implements OnInit {
|
|
|
|
|
public request_details: any;
|
|
|
|
|
public segmentsArray: { name: string, number: number }[] = [];
|
|
|
|
|
public segmentData: { name: string, data: any }[] = [];
|
|
|
|
|
public requestDetailsData: { name: string, data: any }[] = [];
|
|
|
|
|
public header: any = [];
|
|
|
|
|
public rows: any = [];
|
|
|
|
|
public workList: any;
|
|
|
|
|
@ -84,10 +85,20 @@ export class WorkListMainItgComponent implements OnInit {
|
|
|
|
|
this.workListService.getITGFormDetails(this.request).subscribe((result: any) => {
|
|
|
|
|
this.request_details = result.ITGRequest;
|
|
|
|
|
this.grantInfo = result.ITGRequest.GrantFields;
|
|
|
|
|
let count =0;
|
|
|
|
|
for (let i = 0; i < result.ITGRequest.FieldGoups.length; i++) {
|
|
|
|
|
this.segmentsArray[i] = { name: result.ITGRequest.FieldGoups[i].Title, number: i };
|
|
|
|
|
this.segmentData[i] = { name: result.ITGRequest.FieldGoups[i].Title, data: result.ITGRequest.FieldGoups[i].Fields }
|
|
|
|
|
|
|
|
|
|
for (let j = 0; j < this.segmentData[i].data.length; j++) {
|
|
|
|
|
if (this.segmentData[i].data[j].TableValue){
|
|
|
|
|
this.requestDetailsData[count] ={ name:this.segmentData[i].data[j].TableValue.Header,
|
|
|
|
|
data: this.segmentData[i].data[j].TableValue.Rows}
|
|
|
|
|
count++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
console.log(this.requestDetailsData)
|
|
|
|
|
this.segmentsArray[this.segmentsArray.length] = { name: 'Approval Level', number: this.segmentsArray.length }
|
|
|
|
|
this.workList = this.request_details.WFHistory;
|
|
|
|
|
this.options = this.request_details.AllowedActions;
|
|
|
|
|
@ -203,7 +214,7 @@ export class WorkListMainItgComponent implements OnInit {
|
|
|
|
|
request.ItemID = this.request_info.ItemID;
|
|
|
|
|
request.TaskID = this.request_info.ID;
|
|
|
|
|
request.Comments = this.commentText;
|
|
|
|
|
request.Comments = this.request_info.Comments;
|
|
|
|
|
// request.Comments = this.request_info.Comments;
|
|
|
|
|
request.EmployeeNumber = this.request_info.EmployeeNumber;
|
|
|
|
|
request.NewUserEMPId = this.replcamentID;
|
|
|
|
|
this.common.confirmAlertDialogAction(
|
|
|
|
|
@ -212,6 +223,7 @@ export class WorkListMainItgComponent implements OnInit {
|
|
|
|
|
url = WorkListMainItgComponent.APPROVAL;
|
|
|
|
|
this.workListService.getITGActionRequest(request, url)
|
|
|
|
|
.subscribe((result: any) => {
|
|
|
|
|
this.confirmMsg(1)
|
|
|
|
|
// this.common.openNotificationPage();
|
|
|
|
|
this.skip();
|
|
|
|
|
});
|
|
|
|
|
@ -219,6 +231,7 @@ export class WorkListMainItgComponent implements OnInit {
|
|
|
|
|
url = WorkListMainItgComponent.REJECT;
|
|
|
|
|
this.workListService.getITGActionRequest(request, url)
|
|
|
|
|
.subscribe((result: any) => {
|
|
|
|
|
this.confirmMsg(2)
|
|
|
|
|
// this.common.openNotificationPage();
|
|
|
|
|
this.skip();
|
|
|
|
|
});
|
|
|
|
|
@ -228,8 +241,10 @@ export class WorkListMainItgComponent implements OnInit {
|
|
|
|
|
if (!comments) {
|
|
|
|
|
this.common.presentAlert(this.ts.trPK('worklist', 'empty-comment'));
|
|
|
|
|
} else {
|
|
|
|
|
request.Comments = comments;
|
|
|
|
|
this.workListService.getITGActionRequest(request, url)
|
|
|
|
|
.subscribe((result: any) => {
|
|
|
|
|
this.confirmMsg(3)
|
|
|
|
|
// this.common.openNotificationPage();
|
|
|
|
|
this.skip();
|
|
|
|
|
});
|
|
|
|
|
@ -239,6 +254,7 @@ export class WorkListMainItgComponent implements OnInit {
|
|
|
|
|
url = WorkListMainItgComponent.DELEGATE;
|
|
|
|
|
this.workListService.getITGActionRequest(request, url)
|
|
|
|
|
.subscribe((result: any) => {
|
|
|
|
|
this.confirmMsg(4)
|
|
|
|
|
// this.common.openNotificationPage();
|
|
|
|
|
this.skip();
|
|
|
|
|
});
|
|
|
|
|
@ -249,6 +265,7 @@ export class WorkListMainItgComponent implements OnInit {
|
|
|
|
|
} else {
|
|
|
|
|
this.workListService.getITGActionRequest(request, url)
|
|
|
|
|
.subscribe((result: any) => {
|
|
|
|
|
this.confirmMsg(5)
|
|
|
|
|
// this.common.openNotificationPage();
|
|
|
|
|
this.skip();
|
|
|
|
|
});
|
|
|
|
|
@ -263,6 +280,7 @@ export class WorkListMainItgComponent implements OnInit {
|
|
|
|
|
request.AdditionalFields = this.grantRequest;
|
|
|
|
|
this.workListService.getITGActionRequest(request, url)
|
|
|
|
|
.subscribe((result: any) => {
|
|
|
|
|
this.confirmMsg(6)
|
|
|
|
|
// this.common.openNotificationPage();
|
|
|
|
|
this.skip();
|
|
|
|
|
});
|
|
|
|
|
|