[new-search | DONE | FIXED]: Fixed search queries for propagated organizations (Connect Admin) to follow the new search API format & Fixed queries for getOrganizationsForResults and getProjectsForResults.
1. searchProjects.service.ts: [BUG] In method "getProjectsForResults()". 2. searchOrganizations.service.ts: [BUG] In method "getOrganizationsForResults()" | Updated search query in method "searchOrganizations()" according to the new search API. 3. propagated-organizations.component.ts: Updated queries in method "getTagged()" and "enrichedOrgsNotTaggedYet()".
This commit is contained in:
parent
6b24f60c17
commit
976c10559f
|
|
@ -23,6 +23,7 @@ import {CKEditorModule} from "ng2-ckeditor";
|
|||
import {LoadingModule} from "../../openaireLibrary/utils/loading/loading.module";
|
||||
|
||||
import {IconsModule} from "../../openaireLibrary/utils/icons/icons.module";
|
||||
import {StringUtils} from "../../openaireLibrary/utils/string-utils.class";
|
||||
|
||||
@Component({
|
||||
selector: 'propagated-organizations',
|
||||
|
|
@ -78,8 +79,11 @@ export class PropagatedOrganizationsComponent extends BaseComponent {
|
|||
|
||||
getTagged(propagatedOrgs) {
|
||||
//from index
|
||||
this.subscriptions.push(this.searchOrganizationsService.searchOrganizations("fq=communityId exact " + this.community.communityId,
|
||||
"", 1, propagatedOrgs.length, [], properties).subscribe(res => {
|
||||
this.subscriptions.push(this.searchOrganizationsService.advancedSearchOrganizations("communityId=" + StringUtils.quoteAndURIEncode(this.community.communityId),
|
||||
1, propagatedOrgs.length, properties, "", []).subscribe(res => {
|
||||
|
||||
// this.subscriptions.push(this.searchOrganizationsService.searchOrganizations("communityId=" + StringUtils.quoteAndURIEncode(this.community.communityId),
|
||||
// "", 1, propagatedOrgs.length, [], properties).subscribe(res => {
|
||||
this.idsToSearch = [];
|
||||
this.enhancedOrgsInfo = new Map();
|
||||
for (let org of res[1]) {
|
||||
|
|
@ -123,15 +127,16 @@ export class PropagatedOrganizationsComponent extends BaseComponent {
|
|||
|
||||
enrichedOrgsNotTaggedYet(){
|
||||
//from index info
|
||||
this.subscriptions.push(this.searchOrganizationsService.advancedSearchOrganizations("objIdentifier="+ this.idsToSearch.join(" or objIdentifier="),
|
||||
1, this.idsToSearch.length, properties, "&type=organizations").subscribe(res => {
|
||||
this.subscriptions.push(this.searchOrganizationsService.advancedSearchOrganizations("objIdentifier=("+ this.idsToSearch.join(" OR ")+")",
|
||||
1, this.idsToSearch.length, properties, "").subscribe(res => {
|
||||
// advancedSearchOrganizations (params: string, page: number, size: number, properties:EnvProperties,
|
||||
// refineParams:string=null, refineFields:string[] =null, refineQuery:string = null, minRef: boolean = false):any {
|
||||
for (let org of res[1]) {
|
||||
console.log(org)
|
||||
this.enhancedOrgsInfo.get(org.id)['title'] = org.title.name;
|
||||
this.enhancedOrgsInfo.get(org.id)['acronym'] = org.acronym;
|
||||
this.enhancedOrgsInfo.get(org.id)['websiteURL'] = org.websiteURL;
|
||||
if(this.enhancedOrgsInfo?.get(org.id)) {
|
||||
this.enhancedOrgsInfo.get(org.id)['title'] = org.title.name;
|
||||
this.enhancedOrgsInfo.get(org.id)['acronym'] = org.acronym;
|
||||
this.enhancedOrgsInfo.get(org.id)['websiteURL'] = org.websiteURL;
|
||||
}
|
||||
}
|
||||
this.prepareAffiliationsList();
|
||||
}, error => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue