[Library | develop] fos/fos.component.ts & landing-utilts/fos.component.ts & searchFields.ts: Restored checks for environment to use fos or foslabel field - foslabel not yet introduced in current prod index.

This commit is contained in:
Konstantina Galouni 2023-10-02 13:13:22 +03:00
parent af95b395bd
commit edf8ae835c
3 changed files with 7 additions and 4 deletions

View File

@ -216,6 +216,7 @@ export class FosComponent implements OnInit, OnDestroy {
}
public buildFosQueryParam(fos) {
return {'foslabel': this.urlEncodeAndQuote(fos.id+"||"+fos.label)};
// return {'foslabel': this.urlEncodeAndQuote(fos.id+"||"+fos.label)};
return (properties.environment !== 'production' ? ({'foslabel': this.urlEncodeAndQuote(fos.id+"||"+fos.label)}) : ({'fos': this.urlEncodeAndQuote(fos.id)}));
}
}

View File

@ -121,10 +121,12 @@ export class FosComponent {
}
public buildFosQueryParam(fos) {
return {'foslabel': this.urlEncodeAndQuote(fos.id+"||"+fos.label)};
// return {'foslabel': this.urlEncodeAndQuote(fos.id+"||"+fos.label)};
return (properties.environment !== 'production' ? ({'foslabel': this.urlEncodeAndQuote(fos.id+"||"+fos.label)}) : ({'fos': this.urlEncodeAndQuote(fos.id)}));
}
public buildFosHrefParam(fos): string {
return ('foslabel='+this.urlEncodeAndQuote(fos.id+"||"+fos.label));
// return ('foslabel='+this.urlEncodeAndQuote(fos.id+"||"+fos.label));
return (properties.environment !== 'production' ? ('foslabel='+this.urlEncodeAndQuote(fos.id+"||"+fos.label)) : ('fos='+this.urlEncodeAndQuote(fos.id)));
}
}

View File

@ -14,7 +14,7 @@ export class SearchFields {
// Remove Collected From Filter "collectedfrom","collectedfrom"
public RESULT_REFINE_FIELDS = [
"resultbestaccessright", "instancetypename", "foslabel", "relfunder",
"resultbestaccessright", "instancetypename", properties.environment!='production'?"foslabel":'fos', "relfunder",
"relfundinglevel0_id", "relfundinglevel1_id", "relfundinglevel2_id",
"relproject", "sdg", "country", "resultlanguagename", "resulthostingdatasource", "community"];