add specific reference types ids to config.json

This commit is contained in:
amentis 2024-05-13 14:47:24 +03:00
parent c40a356058
commit f4b9ef1f9f
3 changed files with 27 additions and 3 deletions

View File

@ -154,6 +154,21 @@ export class ConfigurationService extends BaseComponent {
return this._authProviders;
}
private _researcherId: any;
get researcherId(): boolean {
return this._researcherId;
}
private _grantId: any;
get grantId(): boolean {
return this._grantId;
}
private _organizationId: any;
get organizationId(): boolean {
return this._organizationId;
}
public loadConfiguration(): Promise<any> {
return new Promise((r, e) => {
// We need to exclude all interceptors here, for the initial configuration request.
@ -224,6 +239,10 @@ export class ConfigurationService extends BaseComponent {
this._newReleaseNotificationLink = config.newReleaseNotification?.link;
this._newReleaseNotificationVersionCode = config.newReleaseNotification?.versionCode;
this._authProviders = AuthProviders.parseValue(config.authProviders);
this._researcherId = config.referenceTypes.researcherId;
this._grantId = config.referenceTypes.grantId;
this._organizationId = config.referenceTypes.organizationId;
}
}

View File

@ -131,14 +131,14 @@ export class ReferenceTypeService {
}
public getResearcherReferenceType(): any {
return '5a2112e7-ea99-4cfe-98a1-68665e26726e';
return this.configurationService.researcherId;
}
public getGrantReferenceType(): any {
return '5b9c284f-f041-4995-96cc-fad7ad13289c';
return this.configurationService.grantId;
}
public getOrganizationReferenceType(): any {
return '7eeffb98-58fb-4921-82ec-e27f32f8e738';
return this.configurationService.organizationId;
}
}

View File

@ -65,5 +65,10 @@
"cultures": ["en"]
}
]
},
"referenceTypes": {
"researcherId": "5a2112e7-ea99-4cfe-98a1-68665e26726e",
"grantId": "5b9c284f-f041-4995-96cc-fad7ad13289c",
"organizationId": "7eeffb98-58fb-4921-82ec-e27f32f8e738"
}
}