approval fix
parent
e4b6cd3a8d
commit
74f7d6b77b
|
|
@ -399,10 +399,10 @@ export class DataService {
|
|||
}
|
||||
);
|
||||
}
|
||||
let approval = this.validateApproval(resp.approvalStatus);
|
||||
//let approval = this.validateApproval(resp.approvalStatus);
|
||||
res.push({
|
||||
resourceId: resp.resourceId,
|
||||
approvalStatus: this.validateApproval(resp.approvalStatus),
|
||||
approvalStatus: resp.approvalStatus,
|
||||
statusReason: resp.statusReason,
|
||||
changeNr: resp.changeNr,
|
||||
resourceName: resp.resourceName,
|
||||
|
|
@ -416,8 +416,8 @@ export class DataService {
|
|||
tasks: tasks,
|
||||
supportGroupId: resp.supportGroupId,
|
||||
implementerEdit: this.validateImplementerEdit(resp.state),
|
||||
flagApproval: approval,
|
||||
flagReject: approval,
|
||||
flagApproval: this.validateApproval(resp),
|
||||
flagReject: this.validateApproval(resp),
|
||||
flagCancel: this.validateCancel(resp.state),
|
||||
flagPermit: this.validatePermit(resp.state),
|
||||
changeImplementerLogin: resp.changeImplementerLogin,
|
||||
|
|
@ -441,7 +441,7 @@ export class DataService {
|
|||
* @returns true or false for a boolean flag
|
||||
*/
|
||||
private validateImplementerEdit(state):boolean{
|
||||
if(state == 1 || state == 3 || state == 6){
|
||||
if(state == 3 || state == 6){
|
||||
return true;
|
||||
}else{
|
||||
return false;
|
||||
|
|
@ -479,8 +479,11 @@ export class DataService {
|
|||
* @param state approvalString
|
||||
* @returns true or false for a boolean flag
|
||||
*/
|
||||
private validateApproval(approval):boolean{
|
||||
if(approval!=""){
|
||||
private validateApproval(resp):boolean{
|
||||
console.log(resp.changeNr);
|
||||
console.log(resp.approvalStatus);
|
||||
console.log('\n');
|
||||
if(resp.approvalStatus!=undefined && resp.approvalStatus!="0"){
|
||||
return true;
|
||||
}else{
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -418,6 +418,7 @@ export class NttGanttComponent implements OnInit {
|
|||
}
|
||||
let dialogRef = StateDialogComponent;
|
||||
this.matDialog.open(dialogRef,{data : data}).afterClosed().subscribe((res)=>{
|
||||
console.log(res);
|
||||
if(res == "Success"){
|
||||
this.refreshData();
|
||||
}
|
||||
|
|
@ -717,6 +718,9 @@ export class NttGanttComponent implements OnInit {
|
|||
if(allStates){
|
||||
allStates = true;
|
||||
}
|
||||
else{
|
||||
allStates = false;
|
||||
}
|
||||
this.selectedRescourceIds.push(change.taskData.resourceId);
|
||||
}else{
|
||||
allStates = false;
|
||||
|
|
@ -755,7 +759,7 @@ export class NttGanttComponent implements OnInit {
|
|||
|
||||
if(allStates){
|
||||
this.toolbar = [];
|
||||
if(allTransition){
|
||||
if(allTransition && !this.approvalPending){
|
||||
this.toolbar.push({text:this.languageService.lMap.get("stateChange"), id: "6"});
|
||||
}
|
||||
if(allPermit){
|
||||
|
|
@ -859,7 +863,7 @@ export class NttGanttComponent implements OnInit {
|
|||
}
|
||||
if(allStates){
|
||||
this.toolbar = [];
|
||||
if(allTransition){
|
||||
if(allTransition&&!this.approvalPending){
|
||||
this.toolbar.push({text:this.languageService.lMap.get("stateChange"), id: "6"});
|
||||
}
|
||||
if(allPermit){
|
||||
|
|
|
|||
Loading…
Reference in New Issue