From 1bff1460612fd2284d4f136178eaa937021f2f3c Mon Sep 17 00:00:00 2001 From: dweinholz Date: Tue, 23 Jul 2024 09:27:44 +0200 Subject: [PATCH] fix(Application):fixed edam terms --- .../information-detail.component.html | 2 +- .../application-formular.component.ts | 3 +- .../application.model/application.model.ts | 3 +- src/app/applications/edam-ontology-term.ts | 40 ++++--------------- 4 files changed, 12 insertions(+), 36 deletions(-) diff --git a/src/app/applications/application-detail/information-detail/information-detail.component.html b/src/app/applications/application-detail/information-detail/information-detail.component.html index 000ec360e6..f8753f8e24 100644 --- a/src/app/applications/application-detail/information-detail/information-detail.component.html +++ b/src/app/applications/application-detail/information-detail/information-detail.component.html @@ -7,7 +7,7 @@
*ngFor="let term of application?.project_application_edam_terms" style="margin-left: 5px" class="badge bg-info" - >{{ term.name }} + >{{ term.term }}
diff --git a/src/app/applications/application-formular/application-formular.component.ts b/src/app/applications/application-formular/application-formular.component.ts index 5e793376ff..314a352a6d 100644 --- a/src/app/applications/application-formular/application-formular.component.ts +++ b/src/app/applications/application-formular/application-formular.component.ts @@ -182,7 +182,8 @@ export class ApplicationFormularComponent extends ApplicationBaseClassComponent this.simple_vm_project = !this.openstack_project; this.application.project_application_pi = new User(); - this.searchTermsInEdamTerms(); + + // this.searchTermsInEdamTerms(); if (this.application.dissemination.someAllowed()) { this.project_application_report_allowed = true; diff --git a/src/app/applications/application.model/application.model.ts b/src/app/applications/application.model/application.model.ts index 48e46eb3f4..b1b3be3e02 100644 --- a/src/app/applications/application.model/application.model.ts +++ b/src/app/applications/application.model/application.model.ts @@ -117,9 +117,10 @@ export class Application { if (aj.project_application_edam_terms) { this.project_application_edam_terms = aj.project_application_edam_terms.map( - (term: any): EdamOntologyTerm => new EdamOntologyTerm(null, term, null, null), + (term: any): EdamOntologyTerm => new EdamOntologyTerm(null, term, null), ); } + console.log(this.project_application_edam_terms); if (aj.project_lifetime_request) { this.project_lifetime_request = new ApplicationLifetimeExtension(aj.project_lifetime_request); this.totalLifetimeExtensionCredits = this.calcLifetimeExtensionCredits(); diff --git a/src/app/applications/edam-ontology-term.ts b/src/app/applications/edam-ontology-term.ts index 9c766e1d7d..20ecd778cd 100644 --- a/src/app/applications/edam-ontology-term.ts +++ b/src/app/applications/edam-ontology-term.ts @@ -2,39 +2,13 @@ * Edam ontology term class. */ export class EdamOntologyTerm { + public name: string; + public term: string; + public uri: string; - private _name: string; - private _term: string; - private _uri: string; - - constructor(storid: number, name: string, term: string, uri: string) { - this._name = name; - this._term = term; - this._uri = uri; - } - - get name(): string { - return this._name; - } - - set name(value: string) { - this._name = value; - } - - get term(): string { - return this._term; + constructor(name: string, term: string, uri: string) { + this.name = name; + this.term = term; + this.uri = uri; } - - set term(value: string) { - this._term = value; - } - - get uri(): string { - return this._uri; - } - - set uri(value: string) { - this._uri = value; - } - }