From f4c10e12c080a2c263683065ada18c7fd4a3a360 Mon Sep 17 00:00:00 2001 From: "sofia.baltzi" Date: Mon, 26 Mar 2018 14:13:28 +0000 Subject: [PATCH] Add and parse type field in CommunityInfo git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@51511 d315682c-612b-4755-9ff5-7f18f6832af3 --- connect/communities/communities.service.ts | 8 ++++++++ connect/community/community.service.ts | 8 ++++++++ connect/community/communityInfo.ts | 1 + 3 files changed, 17 insertions(+) diff --git a/connect/communities/communities.service.ts b/connect/communities/communities.service.ts index b81dc831..e5069156 100644 --- a/connect/communities/communities.service.ts +++ b/connect/communities/communities.service.ts @@ -34,6 +34,10 @@ export class CommunitiesService { result['description'] = resData[0].description; result['date'] = resData[0].creationDate; + if (resData[0].type != null) { + result['type'] = resData[0].type; + } + if(resData[0].managers != null) { if(result['managers'] == undefined) { result['managers'] = new Array(); @@ -71,6 +75,10 @@ export class CommunitiesService { result['description'] = resData.description; result['date'] = resData.creationDate; + if (resData.type != null) { + result['type'] = resData.type; + } + if(resData.managers != null) { if(result['managers'] == undefined) { result['managers'] = new Array(); diff --git a/connect/community/community.service.ts b/connect/community/community.service.ts index c24f501b..b091dacc 100644 --- a/connect/community/community.service.ts +++ b/connect/community/community.service.ts @@ -52,6 +52,10 @@ export class CommunityService { community['description'] = resData[0].description; community['date'] = resData[0].creationDate; + if (resData[0].type != null) { + community['type'] = resData[0].type; + } + if(resData[0].managers != null) { if(community['managers'] == undefined) { community['managers'] = new Array(); @@ -90,6 +94,10 @@ export class CommunityService { community['description'] = resData.description; community['date'] = resData.creationDate; + if (resData.type != null) { + community['type'] = resData.type; + } + if(resData.managers != null) { if(community['managers'] == undefined) { community['managers'] = new Array(); diff --git a/connect/community/communityInfo.ts b/connect/community/communityInfo.ts index f2f745a7..61047557 100644 --- a/connect/community/communityInfo.ts +++ b/connect/community/communityInfo.ts @@ -3,6 +3,7 @@ export class CommunityInfo { shortTitle:string; communityId: string; queryId: string; + type: string; logoUrl: string; description: string; managers: string[];