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