mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
adapt config for url search
This commit is contained in:
@@ -99,7 +99,7 @@ export class QualityAssuranceEventsComponent implements OnInit, OnDestroy {
|
||||
/**
|
||||
* The quality assurance source base url for project search
|
||||
*/
|
||||
public sourceUrlForProjectSearch = environment.qualityAssuranceConfig.sourceUrlForProjectSearch;
|
||||
public sourceUrlForProjectSearch: string;
|
||||
/**
|
||||
* The FindListOptions object
|
||||
*/
|
||||
@@ -136,7 +136,10 @@ export class QualityAssuranceEventsComponent implements OnInit, OnDestroy {
|
||||
this.isEventPageLoading.next(true);
|
||||
|
||||
this.activatedRoute.paramMap.pipe(
|
||||
map((params) => params.get('topicId')),
|
||||
tap((params) => {
|
||||
this.sourceUrlForProjectSearch = environment.qualityAssuranceConfig.sourceUrlMapForProjectSearch[params.get('sourceId')];
|
||||
}),
|
||||
map((params) => params.get('topicId')),
|
||||
take(1),
|
||||
switchMap((id: string) => {
|
||||
const regEx = /!/g;
|
||||
|
@@ -435,7 +435,9 @@ export class DefaultAppConfig implements AppConfig {
|
||||
};
|
||||
|
||||
qualityAssuranceConfig: QualityAssuranceConfig = {
|
||||
sourceUrlForProjectSearch: 'https://explore.openaire.eu/search/project?projectId=',
|
||||
sourceUrlMapForProjectSearch: {
|
||||
openaire: 'https://explore.openaire.eu/search/project?projectId='
|
||||
},
|
||||
pageSize: 5,
|
||||
};
|
||||
}
|
||||
|
@@ -9,7 +9,7 @@ export class QualityAssuranceConfig implements Config {
|
||||
/**
|
||||
* Url for project search on quality assurance resource
|
||||
*/
|
||||
public sourceUrlForProjectSearch: string;
|
||||
public sourceUrlMapForProjectSearch: {[key: string]: string};
|
||||
/**
|
||||
* default count of QA sources to load
|
||||
*/
|
||||
|
@@ -307,7 +307,9 @@ export const environment: BuildConfig = {
|
||||
sortDirection:'ASC',
|
||||
},
|
||||
qualityAssuranceConfig: {
|
||||
sourceUrlForProjectSearch: 'https://explore.openaire.eu/search/project?projectId=',
|
||||
sourceUrlMapForProjectSearch: {
|
||||
openaire: 'https://explore.openaire.eu/search/project?projectId='
|
||||
},
|
||||
pageSize: 5,
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user