Fixes "New Version" DMP editor so user cannot edit "Funder", "Grant" or "Project".

This commit is contained in:
gkolokythas 2020-01-08 13:06:15 +02:00
parent 3da0cc9ad4
commit ab8ba11703
1 changed files with 4 additions and 4 deletions

View File

@ -27,7 +27,7 @@ export class GrantTabComponent extends BaseComponent implements OnInit {
@Input() isNewVersion: boolean; @Input() isNewVersion: boolean;
@Input() isNew: boolean; @Input() isNew: boolean;
@Input() isUserOwner: boolean; @Input() isUserOwner: boolean;
@Input() isClone: boolean; @Input() isClone: boolean = false;
isCreateNew = false; isCreateNew = false;
isCreateNewProject = false; isCreateNewProject = false;
@ -145,7 +145,7 @@ export class GrantTabComponent extends BaseComponent implements OnInit {
this.grantformGroup.get('existGrant').disable(); this.grantformGroup.get('existGrant').disable();
this.grantformGroup.get('label').enable(); this.grantformGroup.get('label').enable();
this.grantformGroup.get('description').enable(); this.grantformGroup.get('description').enable();
} else if (this.isClone) { } else if (this.isClone && !this.isNewVersion) {
this.grantformGroup.get('existGrant').enable(); this.grantformGroup.get('existGrant').enable();
this.grantformGroup.get('label').disable(); this.grantformGroup.get('label').disable();
this.grantformGroup.get('label').reset(); this.grantformGroup.get('label').reset();
@ -169,7 +169,7 @@ export class GrantTabComponent extends BaseComponent implements OnInit {
this.projectFormGroup.get('existProject').disable(); this.projectFormGroup.get('existProject').disable();
this.projectFormGroup.get('label').enable(); this.projectFormGroup.get('label').enable();
this.projectFormGroup.get('description').enable(); this.projectFormGroup.get('description').enable();
} else if (this.isClone) { } else if (this.isClone && !this.isNewVersion) {
this.projectFormGroup.get('existProject').enable(); this.projectFormGroup.get('existProject').enable();
this.projectFormGroup.get('label').disable() this.projectFormGroup.get('label').disable()
this.projectFormGroup.get('label').reset(); this.projectFormGroup.get('label').reset();
@ -192,7 +192,7 @@ export class GrantTabComponent extends BaseComponent implements OnInit {
if (this.isCreateNewFunder) { if (this.isCreateNewFunder) {
this.funderFormGroup.get('existFunder').disable(); this.funderFormGroup.get('existFunder').disable();
this.funderFormGroup.get('label').enable(); this.funderFormGroup.get('label').enable();
} else if (this.isClone) { } else if (this.isClone && !this.isNewVersion) {
if (this.funderFormGroup.get('existFunder')) { if (this.funderFormGroup.get('existFunder')) {
this.funderFormGroup.get('existFunder').enable(); this.funderFormGroup.get('existFunder').enable();
this.funderFormGroup.get('label').disable(); this.funderFormGroup.get('label').disable();