fix itg bugs

mekawy-issues
enadhilal 6 years ago
parent fb490fa451
commit 8ea56df598

@ -132,7 +132,7 @@ export class DevicePermissionsService {
return new Promise((resolve, reject) => {
this.cs.confirmAlertDialogPrimarySecondary(() => {
resolve(true);
}, this.ts.trPK('general', 'accept'),
}, this.ts.trPK('general', 'confirm'),
() => {
resolve(false);
}, this.ts.trPK('general', 'not-now'), this.ts.trPK('general', 'confirm'), message

@ -508,8 +508,11 @@ export class HomeComponent implements OnInit {
this.ITGSegment[0].names = names;
this.setActive(this.ITGSegment[0].code);
}
for (let i = 1; i < result.RequestType.length; i++) {
this.ITGSegment[i] = {
console.log(result.RequestType);
let count =1;
for (let i = 0; i < result.RequestType.length; i++) {
console.log()
this.ITGSegment[count] = {
name: result.RequestType[i].RequestTypeName,
code: result.RequestType[i].RequestTypeCode,
data: result.RequestType[i].RequestDetails,
@ -517,7 +520,9 @@ export class HomeComponent implements OnInit {
};
datas[i] = result.RequestType[i].RequestDetails;
names[i] = result.RequestType[i].RequestTypeCode;
count++;
}
console.log(this.ITGSegment);
});
}

@ -22,7 +22,11 @@
<ion-col>
<label class="colItemReq"> {{dataContant.Title}}</label>
<br />
<label>{{dataContant.Value}}</label>
<label *ngIf="dataContant.Value">{{dataContant.Value}}</label>
<div *ngIf="dataContant.MultipleValue">
<label *ngFor="let multiData of dataContant.MultipleValue">{{multiData}}
<br/></label>
</div>
</ion-col>
</ion-row>
<ion-row *ngIf='dataContant.TableValue'>

@ -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();
});

Loading…
Cancel
Save