[master]: Fix search properties after changing the national dashboiard route.

This commit is contained in:
Konstantinos Triantafyllou 2024-04-03 18:44:24 +03:00
parent f36903494e
commit 4cb2071fd4
3 changed files with 9 additions and 1 deletions

View File

@ -86,7 +86,6 @@ export class NationalComponent extends StakeholderBaseComponent implements OnIni
this.setProperties(this.stakeholder.alias, this.stakeholder.type, this.configurationService);
this._customFilterService.setCustomFilter([new SearchCustomFilter("National", "country", "IE", "Irish National Monitor")]);
LinksResolver.resetProperties();
LinksResolver.setSearchAndResultLanding("national/");
this.loading = false;
} else {
this.loading = false;

View File

@ -57,6 +57,12 @@ export class LinksResolver {
searchLinkToAdvancedOrganizations: properties.searchLinkToAdvancedOrganizations,
errorLink: properties.errorLink
};
public static setDefaultProperties(alias: string) {
Object.keys(this.default).forEach(field => {
this.default[field] = "/" + alias + (<string>this.default[field]);
});
}
public static setProperties(alias: string) {
Object.keys(this.default).forEach(field => {

View File

@ -3,6 +3,7 @@ import {StakeholderConfiguration} from "../openaireLibrary/monitor-admin/utils/i
import {LayoutService} from "../openaireLibrary/dashboard/sharedComponents/sidebar/layout.service";
import {Role} from "../openaireLibrary/login/utils/helper.class";
import {Stakeholder} from "../openaireLibrary/monitor/entities/stakeholder";
import {LinksResolver} from "../search/links-resolver";
export class Irish {
public static irishAdminToolsPortalType = "country";
@ -12,6 +13,8 @@ export class Irish {
public portal: Portal = Portal.getMockCommunityInfo("noami", "Noami",['service'],['/search/advanced/services', '/search/find/services']);
constructor() {
LinksResolver.setDefaultProperties('national/');
StakeholderConfiguration.ENTITIES.stakeholder = 'Monitor';
StakeholderConfiguration.ENTITIES.stakeholders = 'Monitors';
StakeholderConfiguration.ENTITIES.funder = 'RFO';