direct linking for orps: fix checks, use type 'other' instead of 'orp'

This commit is contained in:
argirok 2024-01-10 00:03:47 +02:00
parent ae4b3b7b95
commit 0a01288a46
1 changed files with 4 additions and 4 deletions

View File

@ -29,7 +29,7 @@ export class DirectLinkingComponent {
// linkTo: string = null; // entity type (project or context or entity)
// linkToEntities: string[] = [];
showOptions:ShowOptions = new ShowOptions();
validEntityTypes = ["dataset", "publication", "software", "orp", "project", "context"];
validEntityTypes = ["dataset", "publication", "software", "other", "project", "context"];
sources: ClaimEntity[] = [];
inlineEntity: ClaimEntity = null;
validInput: boolean = null;//'true;
@ -74,7 +74,7 @@ export class DirectLinkingComponent {
this.getResearchResultById("dataset", this.id);
} else if (this.type == "software") {
this.getResearchResultById("software", this.id);
} else if (this.type == "orp") {
} else if (this.type == "other") {
this.getResearchResultById("other", this.id);
} else {
this.validInput = this.isValidInput(null);
@ -110,9 +110,9 @@ export class DirectLinkingComponent {
return false;
} else if (this.type == "project" && this.showOptions.linkTo != "result") {
return false;
} else if (["dataset", "publication", "software", "orp"].indexOf(this.type) != -1 && (["project", "context", "result"].indexOf(this.showOptions.linkTo) == -1)) {
} else if (["dataset", "publication", "software", "other"].indexOf(this.type) != -1 && (["project", "context", "result"].indexOf(this.showOptions.linkTo) == -1)) {
return false;
} else if (["project", "dataset", "publication", "software", "orp"].indexOf(this.type) == -1) {
} else if (["project", "dataset", "publication", "software", "other"].indexOf(this.type) == -1) {
return false;
} else {
return true;