2021-11-12 11:36:16 +01:00
|
|
|
import {StringUtils} from "../../utils/string-utils.class";
|
|
|
|
import {properties} from "../../../../environments/environment";
|
2023-03-09 15:07:39 +01:00
|
|
|
import {SelectionCriteria} from "../../utils/entities/contentProvider";
|
2021-11-12 11:36:16 +01:00
|
|
|
|
2018-03-07 12:08:03 +01:00
|
|
|
export class CommunityInfo {
|
|
|
|
title: string;
|
|
|
|
shortTitle:string;
|
|
|
|
communityId: string;
|
|
|
|
queryId: string;
|
2018-03-26 16:13:28 +02:00
|
|
|
type: string;
|
2021-11-12 13:07:55 +01:00
|
|
|
/** @warning Use pipe in HTML or StringUtils.getLogoUrl in components */
|
2018-03-07 12:08:03 +01:00
|
|
|
logoUrl: string;
|
|
|
|
description: string;
|
|
|
|
managers: string[];
|
|
|
|
date:Date;
|
|
|
|
subjects: string[];
|
2018-05-03 13:27:42 +02:00
|
|
|
status:string;
|
2018-11-21 10:34:39 +01:00
|
|
|
zenodoCommunity:string;
|
2021-02-16 11:25:23 +01:00
|
|
|
isUpload: boolean;
|
2019-04-13 20:26:46 +02:00
|
|
|
isSubscribed: boolean;
|
|
|
|
isManager: boolean;
|
2023-03-09 15:07:39 +01:00
|
|
|
fos: string[] = [];
|
|
|
|
sdg: string[] = []
|
|
|
|
selectionCriteria: SelectionCriteria;
|
2021-11-12 11:36:16 +01:00
|
|
|
|
|
|
|
public static checkIsUpload(response: CommunityInfo | CommunityInfo[]): any | any[] {
|
|
|
|
if (Array.isArray(response)) {
|
|
|
|
response.forEach(value => {
|
|
|
|
value.isUpload = value.logoUrl && !StringUtils.isValidUrl(value.logoUrl);
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
response.isUpload = response.logoUrl && !StringUtils.isValidUrl(response.logoUrl);
|
|
|
|
}
|
|
|
|
return response;
|
|
|
|
}
|
2018-03-07 12:08:03 +01:00
|
|
|
}
|
2020-11-30 17:55:28 +01:00
|
|
|
// export const prodReadyCommunities = ["dh-ch", "ee", "fam", "mes", "ni", "covid-19", "dariah", "epos", "egi"];
|