2024-05-29 12:05:04 +02:00
|
|
|
import {BelongsTo} from "./resultLandingInfo";
|
|
|
|
|
2020-03-16 14:09:46 +01:00
|
|
|
export interface OrganizationProject {
|
|
|
|
name: string;
|
|
|
|
id: string;
|
|
|
|
code: string;
|
|
|
|
acronym: string;
|
|
|
|
funder: string;
|
|
|
|
funderId: string;
|
|
|
|
fundingStream: string;
|
|
|
|
fundingLevel1: string;
|
|
|
|
fundingLevel2: string;
|
2022-06-15 12:54:49 +02:00
|
|
|
// sc39: string;
|
2020-03-16 14:09:46 +01:00
|
|
|
startDate: string;
|
|
|
|
endDate: string;
|
|
|
|
}
|
2019-10-02 16:15:08 +02:00
|
|
|
|
2020-03-16 14:09:46 +01:00
|
|
|
export class OrganizationInfo {
|
2020-08-19 13:01:22 +02:00
|
|
|
relcanId;
|
2020-03-16 14:09:46 +01:00
|
|
|
title: { name: string; url: string; };
|
|
|
|
name: string;
|
|
|
|
country: string;
|
|
|
|
objIdentifier: string;
|
|
|
|
|
|
|
|
|
|
|
|
projects: Map<string, OrganizationProject[]>;
|
|
|
|
//dataProviders: { name: string; url: string; type: string; websiteUrl: string;
|
|
|
|
// organizations: {name: string; url: string}[]}[];
|
|
|
|
|
|
|
|
deletedByInferenceIds: string[];
|
2024-03-04 12:14:09 +01:00
|
|
|
identifiers: Map<string, string[]>; //key is the classname
|
2024-05-31 12:59:23 +02:00
|
|
|
belongsTo: boolean = true;
|
|
|
|
message: string;
|
|
|
|
|
|
|
|
setBelongsTo(id: string) {
|
|
|
|
this.belongsTo = !BelongsTo.organization || BelongsTo.organization.fields.findIndex(field => BelongsTo.check(this, field)) != -1;
|
|
|
|
this.message = !this.belongsTo ? BelongsTo.organization.message : null;
|
|
|
|
if (this.message) {
|
|
|
|
this.message = this.message.replace('((id))', id);
|
|
|
|
}
|
|
|
|
}
|
2017-12-19 13:53:46 +01:00
|
|
|
}
|