Skip to content

Commit

Permalink
fix(Application):fixed edam terms
Browse files Browse the repository at this point in the history
  • Loading branch information
dweinholz committed Jul 23, 2024
1 parent 68a4ba8 commit 1bff146
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ <h5>
*ngFor="let term of application?.project_application_edam_terms"
style="margin-left: 5px"
class="badge bg-info"
><span id="topic_{{ term.name }}">{{ term.name }}</span>
><span id="topic_{{ term.term }}">{{ term.term }}</span>
</span>
</h5>
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion src/app/applications/application.model/application.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
40 changes: 7 additions & 33 deletions src/app/applications/edam-ontology-term.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

}

0 comments on commit 1bff146

Please sign in to comment.