[master]: Fix links to search pages

This commit is contained in:
Konstantinos Triantafyllou 2024-04-18 12:02:41 +03:00
parent a834890ddb
commit 69550193c3
6 changed files with 8 additions and 12 deletions

View File

@ -218,5 +218,6 @@ export class RepositoryComponent extends StakeholderBaseComponent implements OnI
super.ngOnDestroy();
this.layoutService.setRootClass(null);
this.setProperties(Irish.irishAdminToolsCommunity, Irish.irishAdminToolsPortalType, this.configurationService);
LinksResolver.resetProperties();
}
}

View File

@ -133,8 +133,6 @@ export class ResearcherComponent extends ResearcherBaseComponent implements OnI
LinksResolver.resetProperties();
LinksResolver.setSearchAndResultLanding("researcher/" + this.authorId);
this.setMetadata();
},
error: () => {
this._router.navigate([properties.errorLink]);
@ -178,6 +176,7 @@ export class ResearcherComponent extends ResearcherBaseComponent implements OnI
ngOnDestroy() {
super.ngOnDestroy();
this.layoutService.setRootClass(null);
LinksResolver.resetProperties();
}
getPercentage(){

View File

@ -146,6 +146,7 @@ export class RfoComponent extends StakeholderBaseComponent implements OnInit {
super.ngOnDestroy();
this.layoutService.setRootClass(null);
this.setProperties(Irish.irishAdminToolsCommunity, Irish.irishAdminToolsPortalType, this.configurationService);
LinksResolver.resetProperties();
}
get isManager() {

View File

@ -147,6 +147,7 @@ export class RpoComponent extends StakeholderBaseComponent implements OnInit {
super.ngOnDestroy();
this.layoutService.setRootClass(null);
this.setProperties(Irish.irishAdminToolsCommunity, Irish.irishAdminToolsPortalType, this.configurationService);
LinksResolver.resetProperties();
}
get isManager() {

View File

@ -58,17 +58,12 @@ export class LinksResolver {
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 => {
properties[field] = "/" + alias + (<string>this.default[field]);
});
}
public static setSearchAndResultLanding(alias: string) {
properties.searchLinkToResult= "/" + alias + this.default.searchLinkToResult;
properties.searchLinkToPublication= "/" + alias + this.default.searchLinkToPublication;
@ -82,9 +77,8 @@ export class LinksResolver {
properties.searchLinkToAdvancedOrps= "/" + alias + this.default.searchLinkToAdvancedOrps;
}
public static resetProperties() {
Object.keys(this.default).forEach(field => {
properties[field] = this.default[field];
});
this.setProperties('national/');
}
}

View File

@ -13,7 +13,7 @@ export class Irish {
public portal: Portal = Portal.getMockCommunityInfo("noami", "Noami",['service'],['/search/advanced/services', '/search/find/services']);
constructor() {
LinksResolver.setDefaultProperties('national/');
LinksResolver.resetProperties();
StakeholderConfiguration.ROLES.manager = 'primary dashboard manager';
StakeholderConfiguration.ROLES.member = 'manager';