Fix DMP's funder tab
This commit is contained in:
parent
093837c395
commit
5885e3ae5c
|
@ -435,9 +435,17 @@ export class FundingInfoComponent extends BaseComponent implements OnInit {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private hasNewFunder(funder: any) {
|
||||||
|
return funder.label !== null && funder.label !== undefined && funder.label !== '' && funder.reference !== undefined && funder.reference !== undefined && funder.reference !== '';
|
||||||
|
}
|
||||||
|
|
||||||
|
private hasExistingFunder(funder: any) {
|
||||||
|
return funder.existFunder !== null && funder.existFunder !== undefined && funder.existFunder.reference !== null && funder.existFunder.reference !== undefined;
|
||||||
|
}
|
||||||
|
|
||||||
funderValueChanged(funder: any) {
|
funderValueChanged(funder: any) {
|
||||||
if ((funder.label !== "" && funder.label !== null && funder.label !== undefined && !isNullOrUndefined(funder.reference) && funder.reference.length )
|
|
||||||
|| (funder.existFunder !== null && funder.existFunder !== undefined && funder.existFunder.id !== undefined)) {
|
if (this.hasNewFunder(funder) || this.hasExistingFunder(funder)) {
|
||||||
//this.grantformGroup.reset();
|
//this.grantformGroup.reset();
|
||||||
this.grantformGroup.enable();
|
this.grantformGroup.enable();
|
||||||
this.setGrantValidators();
|
this.setGrantValidators();
|
||||||
|
|
Loading…
Reference in New Issue