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