[master | DONE | FIXED]: irish.ts: Added static fields irishAdminToolsPortalType = "country" and irishAdminToolsCommunity = "irish" | users.component.ts & admin.component.ts & repository.component.ts & rfo.component.ts & rpo.component.ts: In ngOnDestroy(), call setProperties() with params Irish.irishAdminToolsCommunity, Irish.irishAdminToolsPortalType to reinitialize portalType and pid.
This commit is contained in:
parent
8b5354739b
commit
184b8172ed
|
@ -9,6 +9,7 @@ import {Session, User} from "../openaireLibrary/login/utils/helper.class";
|
|||
import {UserManagementService} from "../openaireLibrary/services/user-management.service";
|
||||
import {ConnectHelper} from "../openaireLibrary/connect/connectHelper";
|
||||
import {ConfigurationService} from "../openaireLibrary/utils/configuration/configuration.service";
|
||||
import {Irish} from "../shared/irish";
|
||||
|
||||
@Component({
|
||||
selector: 'admin',
|
||||
|
@ -68,6 +69,7 @@ export class AdminComponent extends SidebarBaseComponent implements OnInit {
|
|||
this.loading = false;
|
||||
}));
|
||||
} else {
|
||||
this.setProperties(Irish.irishAdminToolsCommunity, Irish.irishAdminToolsPortalType);
|
||||
this.stakeholderService.setStakeholder(null);
|
||||
this.layoutService.setRootClass(null);
|
||||
this.hasSidebar = false;
|
||||
|
@ -80,6 +82,7 @@ export class AdminComponent extends SidebarBaseComponent implements OnInit {
|
|||
ngOnDestroy() {
|
||||
super.ngOnDestroy();
|
||||
this.layoutService.setRootClass(null);
|
||||
this.setProperties(Irish.irishAdminToolsCommunity, Irish.irishAdminToolsPortalType);
|
||||
}
|
||||
|
||||
setProperties(id, type = null) {
|
||||
|
|
|
@ -10,6 +10,7 @@ import {ActivatedRoute} from "@angular/router";
|
|||
import {Title} from "@angular/platform-browser";
|
||||
import {StringUtils} from "../../openaireLibrary/utils/string-utils.class";
|
||||
import {ConfigurationService} from "../../openaireLibrary/utils/configuration/configuration.service";
|
||||
import {Irish} from "../../shared/irish";
|
||||
|
||||
type Tab = 'member' | 'manager';
|
||||
|
||||
|
@ -68,6 +69,11 @@ export class UsersComponent extends StakeholderBaseComponent {
|
|||
}));
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
super.ngOnDestroy();
|
||||
this.setProperties(Irish.irishAdminToolsCommunity, Irish.irishAdminToolsPortalType, this.configurationService);
|
||||
}
|
||||
|
||||
get users(): string {
|
||||
return StringUtils.capitalize(this.tab) + 's';
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@ import {OpenaireEntities} from "../openaireLibrary/utils/properties/searchFields
|
|||
import {SearchDataprovidersService} from "../openaireLibrary/services/searchDataproviders.service";
|
||||
import {UserManagementService} from "../openaireLibrary/services/user-management.service";
|
||||
import {ConfigurationService} from "../openaireLibrary/utils/configuration/configuration.service";
|
||||
import {Irish} from "../shared/irish";
|
||||
|
||||
@Component({
|
||||
selector: 'repository',
|
||||
|
@ -172,5 +173,6 @@ export class RepositoryComponent extends StakeholderBaseComponent implements OnI
|
|||
ngOnDestroy() {
|
||||
super.ngOnDestroy();
|
||||
this.layoutService.setRootClass(null);
|
||||
this.setProperties(Irish.irishAdminToolsCommunity, Irish.irishAdminToolsPortalType, this.configurationService);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ import {StakeholderBaseComponent} from "../openaireLibrary/monitor-admin/utils/s
|
|||
import {LayoutService} from "../openaireLibrary/dashboard/sharedComponents/sidebar/layout.service";
|
||||
import {OpenaireEntities} from "../openaireLibrary/utils/properties/searchFields";
|
||||
import {ConfigurationService} from "../openaireLibrary/utils/configuration/configuration.service";
|
||||
import {Irish} from "../shared/irish";
|
||||
|
||||
@Component({
|
||||
selector: 'rfo',
|
||||
|
@ -124,5 +125,6 @@ export class RfoComponent extends StakeholderBaseComponent implements OnInit {
|
|||
ngOnDestroy() {
|
||||
super.ngOnDestroy();
|
||||
this.layoutService.setRootClass(null);
|
||||
this.setProperties(Irish.irishAdminToolsCommunity, Irish.irishAdminToolsPortalType, this.configurationService);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@ import {OpenaireEntities} from "../openaireLibrary/utils/properties/searchFields
|
|||
import {RouterHelper} from "../openaireLibrary/utils/routerHelper.class";
|
||||
import {StringUtils} from "../openaireLibrary/utils/string-utils.class";
|
||||
import {ConfigurationService} from "../openaireLibrary/utils/configuration/configuration.service";
|
||||
import {Irish} from "../shared/irish";
|
||||
|
||||
@Component({
|
||||
selector: 'rpo',
|
||||
|
@ -126,6 +127,7 @@ export class RpoComponent extends StakeholderBaseComponent implements OnInit {
|
|||
ngOnDestroy() {
|
||||
super.ngOnDestroy();
|
||||
this.layoutService.setRootClass(null);
|
||||
this.setProperties(Irish.irishAdminToolsCommunity, Irish.irishAdminToolsPortalType, this.configurationService);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,8 @@ import {LayoutService} from "../openaireLibrary/dashboard/sharedComponents/sideb
|
|||
import {Role} from "../openaireLibrary/login/utils/helper.class";
|
||||
|
||||
export class Irish {
|
||||
public static irishAdminToolsPortalType = "country";
|
||||
public static irishAdminToolsCommunity = "irish";
|
||||
public static METADATA_PREFIX = '';
|
||||
|
||||
public portal: Portal = Portal.getMockCommunityInfo("noami", "Noami",['service'],['/search/advanced/services', '/search/find/services']);
|
||||
|
|
Loading…
Reference in New Issue