[Library|Trunk]
Result Landing: Fix issue reading the parameter id when the type changes. Read it based on the param name instead of the type. git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@59037 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
2979275c17
commit
5157c3614c
|
@ -131,31 +131,35 @@ export class ResultLandingComponent {
|
||||||
this.updateUrl(this.properties.baseLink + this._router.url);
|
this.updateUrl(this.properties.baseLink + this._router.url);
|
||||||
this.sub = this.route.queryParams.subscribe(data => {
|
this.sub = this.route.queryParams.subscribe(data => {
|
||||||
this.resultLandingInfo = null;
|
this.resultLandingInfo = null;
|
||||||
if (this.type == "publication") {
|
if (data['articleId']) {
|
||||||
|
this.type = "publication";
|
||||||
this.updateTitle("Publication");
|
this.updateTitle("Publication");
|
||||||
this.linkToLandingPage = this.properties.searchLinkToPublication;
|
this.linkToLandingPage = this.properties.searchLinkToPublication;
|
||||||
this.linkToSearchPage = this.properties.searchLinkToPublications;
|
this.linkToSearchPage = this.properties.searchLinkToPublications;
|
||||||
this.id = data['articleId'];
|
this.id = data['articleId'];
|
||||||
this.title = "Publication";
|
this.title = "Publication";
|
||||||
} else if (this.type == "dataset") {
|
} else if (data['datasetId']) {
|
||||||
this.updateTitle("Dataset");
|
this.updateTitle("Dataset");
|
||||||
|
this.type = "dataset";
|
||||||
this.linkToLandingPage = this.properties.searchLinkToDataset;
|
this.linkToLandingPage = this.properties.searchLinkToDataset;
|
||||||
this.linkToSearchPage = this.properties.searchLinkToDatasets;
|
this.linkToSearchPage = this.properties.searchLinkToDatasets;
|
||||||
this.id = data['datasetId'];
|
this.id = data['datasetId'];
|
||||||
this.title = "Research Data";
|
this.title = "Research Data";
|
||||||
} else if (this.type == "software") {
|
} else if (data['softwareId']) {
|
||||||
this.updateTitle("Software");
|
this.updateTitle("Software");
|
||||||
|
this.type = "software";
|
||||||
this.linkToLandingPage = this.properties.searchLinkToSoftware;
|
this.linkToLandingPage = this.properties.searchLinkToSoftware;
|
||||||
this.linkToSearchPage = this.properties.searchLinkToSoftwareLanding;
|
this.linkToSearchPage = this.properties.searchLinkToSoftwareLanding;
|
||||||
this.id = data['softwareId'];
|
this.id = data['softwareId'];
|
||||||
this.title = "Software";
|
this.title = "Software";
|
||||||
} else if (this.type == "orp") {
|
} else if (data['orpId']) {
|
||||||
|
this.type = "orp";
|
||||||
this.updateTitle("Other Research Product");
|
this.updateTitle("Other Research Product");
|
||||||
this.linkToLandingPage = this.properties.searchLinkToOrp;
|
this.linkToLandingPage = this.properties.searchLinkToOrp;
|
||||||
this.linkToSearchPage = this.properties.searchLinkToOrps;
|
this.linkToSearchPage = this.properties.searchLinkToOrps;
|
||||||
this.id = data['orpId'];
|
this.id = data['orpId'];
|
||||||
this.title = "Other Research Product";
|
this.title = "Other Research Product";
|
||||||
} else if (this.type == "result") {
|
} else if (data["id"]) {
|
||||||
this.id = data["id"];
|
this.id = data["id"];
|
||||||
this.updateTitle("Research Result");
|
this.updateTitle("Research Result");
|
||||||
this.linkToLandingPage = this.properties.searchLinkToOrp;
|
this.linkToLandingPage = this.properties.searchLinkToOrp;
|
||||||
|
@ -165,7 +169,7 @@ export class ResultLandingComponent {
|
||||||
this.updateDescription("");
|
this.updateDescription("");
|
||||||
|
|
||||||
this.metricsClicked = false;
|
this.metricsClicked = false;
|
||||||
|
|
||||||
if (this.id && StringUtils.isOpenAIREID(this.id)) {
|
if (this.id && StringUtils.isOpenAIREID(this.id)) {
|
||||||
this.getProvenanceVocabularyAndResultLandingInfo();
|
this.getProvenanceVocabularyAndResultLandingInfo();
|
||||||
} else {
|
} else {
|
||||||
|
@ -512,7 +516,6 @@ export class ResultLandingComponent {
|
||||||
updateUrlWithType() {
|
updateUrlWithType() {
|
||||||
this.type = this.resultLandingInfo.resultType;
|
this.type = this.resultLandingInfo.resultType;
|
||||||
if (this.type == "publication") {
|
if (this.type == "publication") {
|
||||||
this._location.go("test");
|
|
||||||
this.linkToLandingPage = this.properties.searchLinkToPublication;
|
this.linkToLandingPage = this.properties.searchLinkToPublication;
|
||||||
this.linkToSearchPage = this.properties.searchLinkToPublications;
|
this.linkToSearchPage = this.properties.searchLinkToPublications;
|
||||||
} else if (this.type == "dataset") {
|
} else if (this.type == "dataset") {
|
||||||
|
|
Loading…
Reference in New Issue