diff --git a/src/app/openaireLibrary b/src/app/openaireLibrary
index 8d8eda4..3ee4129 160000
--- a/src/app/openaireLibrary
+++ b/src/app/openaireLibrary
@@ -1 +1 @@
-Subproject commit 8d8eda416b4873c50f689db54444f135396db56d
+Subproject commit 3ee4129c7e76cc7f4c8dcfcf27c135ce873f8f0d
diff --git a/src/app/pages/affiliations/affiliations.component.ts b/src/app/pages/affiliations/affiliations.component.ts
index 8cba66c..2fd937e 100644
--- a/src/app/pages/affiliations/affiliations.component.ts
+++ b/src/app/pages/affiliations/affiliations.component.ts
@@ -113,6 +113,7 @@ export class AffiliationsComponent implements OnInit, OnDestroy {
deleteAffiliationOpen(index: number) {
this.index = index;
let affiliation: Affiliation = this.affiliations[index];
+ console.log(index, affiliation)
this.removeAffiliationModal.alertTitle = 'Delete Organization';
this.removeAffiliationModal.message = 'Do you want to remove ' +
affiliation.name + ' from Organizations?';
@@ -164,7 +165,8 @@ export class AffiliationsComponent implements OnInit, OnDestroy {
removeAffiliation() {
this.loading = true;
- this.affiliationService.deleteAffiliation(this.properties.communityAPI + this.community.communityId + '/organizations',
+ console.log(this.index, this.affiliations[this.index].id)
+ this.affiliationService.deleteAffiliation(this.properties.communityAPI + this.community.communityId + '/organizations?organizationName='+this.affiliations[this.index].name,
this.affiliations[this.index].id).subscribe((deleteOK) => {
this.affiliations.splice(this.index, 1);
if (this.currentPage.length === 0) {
diff --git a/src/app/pages/content-providers/remove-content-providers.component.ts b/src/app/pages/content-providers/remove-content-providers.component.ts
index 8fce21e..068add6 100644
--- a/src/app/pages/content-providers/remove-content-providers.component.ts
+++ b/src/app/pages/content-providers/remove-content-providers.component.ts
@@ -81,7 +81,8 @@ export class RemoveContentProvidersComponent implements OnInit {
}
public confirmedDeleteContentProvider() {
- this.subscriptions.push(this._manageCommunityContentProvidersService.removeContentProvider(this.properties, this.community.communityId, this.selectedCommunityContentProvider.id).subscribe(
+ console.log(this.selectedCommunityContentProvider)
+ this.subscriptions.push(this._manageCommunityContentProvidersService.removeContentProvider(this.properties, this.community.communityId, this.selectedCommunityContentProvider.openaireId).subscribe(
() => {
let index = this.communityContentProviders.indexOf(this.selectedCommunityContentProvider);
this.communityContentProviders.splice(index, 1);
diff --git a/src/app/pages/projects/remove-projects.component.ts b/src/app/pages/projects/remove-projects.component.ts
index b48f89b..5723030 100644
--- a/src/app/pages/projects/remove-projects.component.ts
+++ b/src/app/pages/projects/remove-projects.component.ts
@@ -133,7 +133,7 @@ export class RemoveProjectsComponent implements OnInit {
}
public confirmedDeleteProject(data: any) {
- this.subscriptions.push(this._manageCommunityProjectsService.removeProject(this.properties, this.community.communityId, this.selectedCommunityProject.id).subscribe(
+ this.subscriptions.push(this._manageCommunityProjectsService.removeProject(this.properties, this.community.communityId, this.selectedCommunityProject.openaireId).subscribe(
data => {
let index = this.communityProjects.indexOf(this.selectedCommunityProject);
this.communityProjects.splice(index, 1);
@@ -189,7 +189,7 @@ export class RemoveProjectsComponent implements OnInit {
this.subscriptions.push(this._searchCommunityProjectsService.searchProjects(this.properties, this.community.communityId).subscribe(
data => {
- this.communityProjects = data;
+ this.communityProjects = data.content;
this.previewCommunityProjects = this.communityProjects;
this.sort();
diff --git a/src/app/pages/zenodo-communities/manage-zenodo-communities.component.ts b/src/app/pages/zenodo-communities/manage-zenodo-communities.component.ts
index c7c8a82..205e18c 100644
--- a/src/app/pages/zenodo-communities/manage-zenodo-communities.component.ts
+++ b/src/app/pages/zenodo-communities/manage-zenodo-communities.component.ts
@@ -88,7 +88,7 @@ export class ManageZenodoCommunitiesComponent implements OnInit, OnDestroy {
}
public confirmedDeleteCommunity(data: any) {
- this.subscriptions.push(this._manageZenodoCommunitiesService.removeZCommunity(this.properties, this.community.communityId, this.selectedToDelete.openaireId).subscribe(
+ this.subscriptions.push(this._manageZenodoCommunitiesService.removeZCommunity(this.properties, this.community.communityId, this.selectedToDelete.id).subscribe(
data => {
var pos = -1;
for (var i = 0; i < this.selectedCommunities.length; i++) {
diff --git a/src/app/pages/zenodo-communities/zenodo-communities.component.ts b/src/app/pages/zenodo-communities/zenodo-communities.component.ts
index da2d348..4c1cbc9 100644
--- a/src/app/pages/zenodo-communities/zenodo-communities.component.ts
+++ b/src/app/pages/zenodo-communities/zenodo-communities.component.ts
@@ -65,8 +65,7 @@ export class ZenodoCommunitiesComponent implements OnInit, OnDestroy {
this.masterZenodoCommunityId = this.community.zenodoCommunity;
if (this.masterZenodoCommunityId) {
this.subscriptions.push(this._zenodoCommunitieService.getZenodoCommunityById(this.properties,
- this.properties.zenodoCommunities + this.masterZenodoCommunityId,
- null).subscribe(
+ this.properties.zenodoCommunities + this.masterZenodoCommunityId).subscribe(
result => {
this.masterZenodoCommunity = result;
this.selectedCommunities.unshift(this.masterZenodoCommunity);
@@ -81,25 +80,24 @@ export class ZenodoCommunitiesComponent implements OnInit, OnDestroy {
}
this.zenodoSearchUtils.status = this.errorCodes.LOADING;
this.zenodoSearchUtils.status = this.errorCodes.LOADING;
- this._searchZenodoCommunitiesService.searchZCommunities(this.properties, this.community.communityId).subscribe(
- result => {
- this.selectedCommunityIds = result;
+ // this._searchZenodoCommunitiesService.searchZCommunities(this.properties, this.community.communityId).subscribe(
+ // result => {
+ this.selectedCommunityIds = this.community.otherZenodoCommunities;
this.zenodoSearchUtils.totalResults = this.selectedCommunityIds.length;
if (this.selectedCommunityIds.length === 0) {
this.zenodoSearchUtils.status = this.errorCodes.NONE;
}
for (let i = 0; i < this.selectedCommunityIds.length; i++) {
this.getZenodoCommunityById(
- this.selectedCommunityIds[i]['zenodoid'],
- this.selectedCommunityIds[i]['id']);
+ this.selectedCommunityIds[i]);
}
- },
- error => {
- console.log('list of zenodo communities couldn\'t be loaded');
- this.zenodoSearchUtils.status = this.errorCodes.DONE;
- }
- );
+ // },
+ // error => {
+ // console.log('list of zenodo communities couldn\'t be loaded');
+ // this.zenodoSearchUtils.status = this.errorCodes.DONE;
+ // }
+ // );
})
);
@@ -116,9 +114,9 @@ export class ZenodoCommunitiesComponent implements OnInit, OnDestroy {
});
}
- getZenodoCommunityById(zenodoid, openaireId) {
+ getZenodoCommunityById(zenodoid) {
this.subscriptions.push(this._zenodoCommunitieService.getZenodoCommunityById(this.properties,
- this.properties.zenodoCommunities + zenodoid, openaireId).subscribe(
+ this.properties.zenodoCommunities + zenodoid).subscribe(
result => {
this.selectedCommunities.push(result);
this.zenodocommunitiesloadedCount++;
@@ -131,7 +129,6 @@ export class ZenodoCommunitiesComponent implements OnInit, OnDestroy {
error => {
const emptyCommunity: ZenodoCommunityInfo = new ZenodoCommunityInfo();
emptyCommunity.id = zenodoid;
- emptyCommunity.openaireId = openaireId;
emptyCommunity.title = zenodoid;
this.selectedCommunities.push(emptyCommunity);
this.zenodocommunitiesloadedCount++;
diff --git a/src/app/services/manageContentProviders.service.ts b/src/app/services/manageContentProviders.service.ts
index 7be4c2f..0f4eacd 100644
--- a/src/app/services/manageContentProviders.service.ts
+++ b/src/app/services/manageContentProviders.service.ts
@@ -11,7 +11,7 @@ export class ManageCommunityContentProvidersService {
removeContentProvider(properties: EnvProperties, pid: string, id: string): any {
let headers = new HttpHeaders({'Content-Type': 'application/json', 'accept': 'application/json'});
- let url = properties.communityAPI + pid + '/contentproviders';
+ let url = properties.communityAPI + pid + '/contentproviders?contentproviderId=' +id;
return this.http.request('delete', url, {body: id, headers: headers});
}
diff --git a/src/app/services/manageProjects.service.ts b/src/app/services/manageProjects.service.ts
index 6f99db7..ba5f146 100644
--- a/src/app/services/manageProjects.service.ts
+++ b/src/app/services/manageProjects.service.ts
@@ -12,9 +12,9 @@ export class ManageCommunityProjectsService {
let headers = new HttpHeaders({'Content-Type': 'application/json', 'accept': 'application/json'});
- let url = properties.communityAPI+pid+"/projects";
+ let url = properties.communityAPI+pid+"/projects?projectId="+id;
//return this.http.delete(url, options)
- return this.http.request('delete', url, { body: id, headers: headers})
+ return this.http.request('delete', url, { headers: headers})
}
addProject(properties:EnvProperties, pid: string, project: any) {
diff --git a/src/app/services/manageZenodoCommunities.service.ts b/src/app/services/manageZenodoCommunities.service.ts
index 0cdd3a0..8a07c69 100644
--- a/src/app/services/manageZenodoCommunities.service.ts
+++ b/src/app/services/manageZenodoCommunities.service.ts
@@ -11,10 +11,10 @@ export class ManageZenodoCommunitiesService {
//let options = new RequestOptions({headers: headers, body: id});
let headers = new HttpHeaders({'Content-Type': 'application/json', 'accept': 'application/json'});
- let url = properties.communityAPI + pid + "/zenodocommunities";
+ let url = properties.communityAPI + pid + "/zenodocommunities?zenodocommunity="+id;
//return this.http.delete(url, options);
- return this.http.request('delete', url, { body: id, headers: headers})
+ return this.http.request('delete', url, { headers: headers})
}
addZCommunity(properties:EnvProperties, pid: string,zenodoid: string) {
@@ -23,13 +23,9 @@ export class ManageZenodoCommunitiesService {
let headers = new HttpHeaders({'Content-Type': 'application/json'});
- let url = properties.communityAPI+pid+"/zenodocommunities";
- var zCommunity: any = {
- "communityId": pid,
+ let url = properties.communityAPI+pid+"/zenodocommunities?zenodocommunity="+zenodoid;
- "zenodoid": zenodoid
- };
- return this.http.post(url, JSON.stringify(zCommunity), {headers: headers});
+ return this.http.post(url, headers);
//.map(res => res.json())
}
diff --git a/src/assets/common-assets b/src/assets/common-assets
index 39cb4e5..2fd5784 160000
--- a/src/assets/common-assets
+++ b/src/assets/common-assets
@@ -1 +1 @@
-Subproject commit 39cb4e56d0320975fbd08fb5e9c68b87b0c82a10
+Subproject commit 2fd57843f85125e54adfb95b35776755037ea359
diff --git a/src/assets/openaire-theme b/src/assets/openaire-theme
index 1e06310..2fffe0f 160000
--- a/src/assets/openaire-theme
+++ b/src/assets/openaire-theme
@@ -1 +1 @@
-Subproject commit 1e06310b8b2b56f131754eaded615b6cf32c5848
+Subproject commit 2fffe0fa672adcf5577461d10c30e34b00308c85