38 lines
1.2 KiB
TypeScript
38 lines
1.2 KiB
TypeScript
import {BelongsTo, Measure} from "./resultLandingInfo";
|
|
import {StringUtils} from "../string-utils.class";
|
|
|
|
export class ProjectInfo {
|
|
id:string;
|
|
acronym: string;
|
|
title: string;
|
|
funding: {funderName: string, funderShortName: string, code: string, callIdentifier: string,
|
|
fundingStream: string, budget: string, contribution: string, currency: string};
|
|
startDate: number;
|
|
endDate: number;
|
|
currentDate: number;
|
|
status: string;
|
|
openAccessMandatePublications: string;
|
|
openAccessMandateDatasets: string;
|
|
// specialClause39: string;
|
|
organizations: { "acronym": string, "name": string, "id": string }[];//Map<string, string>;
|
|
url: string;
|
|
urlInfo: string;
|
|
description: string;
|
|
//publications: any;
|
|
researchData: any;
|
|
totalPublications: number;
|
|
totalDatasets: number;
|
|
publicationsStatus: any;
|
|
measure: Measure;
|
|
belongsTo: boolean = true;
|
|
message: string;
|
|
|
|
setBelongsTo(id: string) {
|
|
this.belongsTo = !BelongsTo.project || BelongsTo.project.fields.findIndex(field => BelongsTo.check(this, field)) != -1;
|
|
this.message = !this.belongsTo?BelongsTo.project.message:null;
|
|
if(this.message) {
|
|
this.message = this.message.replace('((id))', id);
|
|
}
|
|
}
|
|
}
|