Add indicators page in stakeholder dashboard. Add resources in menu and add methodology and indicators as sub items
This commit is contained in:
parent
f7686f2ba4
commit
26cb6eace9
|
@ -35,7 +35,8 @@ import {RouterModule} from "@angular/router";
|
|||
loadChildren: () => import('../admin-tools/admin-tools-routing.module').then(m => m.AdminToolsRoutingModule),
|
||||
data: {
|
||||
hasAdminMenu: true,
|
||||
param: 'stakeholder'
|
||||
param: 'stakeholder',
|
||||
parentClass: 'monitor'
|
||||
}
|
||||
}
|
||||
])]
|
||||
|
|
|
@ -42,7 +42,7 @@ const routes: Routes = [
|
|||
path: 'admin/monitor/admin-tools',
|
||||
loadChildren: () => import('./admin-tools/admin-tools-routing.module').then(m => m.AdminToolsRoutingModule),
|
||||
canActivateChild: [AdminLoginGuard],
|
||||
data: {hasAdminMenu: true, portal: 'monitor'}
|
||||
data: {hasAdminMenu: true, portal: 'monitor', monitorCurator: true, parentClass: 'monitor'}
|
||||
},
|
||||
{
|
||||
path: 'admin/:stakeholder',
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<div *ngIf="loading">
|
||||
<loading [full]="true"></loading>
|
||||
</div>
|
||||
<div *ngIf="!loading" [class.stakeholderPage]="isFrontPage">
|
||||
<div *ngIf="!loading" [class.monitor]="isFrontPage">
|
||||
<div id="container" class="sidebar_main_swipe" [class.sidebar_main_active]="open && (hasSidebar || hasAdminMenu)"
|
||||
[class.sidebar_mini]="!open && hasSidebar && (!hasAdminMenu || hasAdminMenu)">
|
||||
<div id="modal-container"></div>
|
||||
|
|
|
@ -263,8 +263,9 @@ export class AppComponent implements OnInit, OnDestroy {
|
|||
}
|
||||
if (Session.isPortalAdministrator(this.user)) {
|
||||
this.userMenuItems.push(new MenuItem("adminOptions", "Super Admin options", "", "/admin/admin-tools/portals", false, [], [], {}));
|
||||
}
|
||||
if (Session.isPortalAdministrator(this.user) || Session.isMonitorCurator(this.user)) {
|
||||
this.userMenuItems.push(new MenuItem("monitorOptions", "Monitor portal options", "", "/admin/monitor/admin-tools/pages", false, [], [], {}));
|
||||
|
||||
}
|
||||
}
|
||||
if (this.stakeholder) {
|
||||
|
@ -281,15 +282,20 @@ export class AppComponent implements OnInit, OnDestroy {
|
|||
null, null, null, null),
|
||||
items: []
|
||||
});
|
||||
this.menuItems.push({
|
||||
rootItem: new MenuItem("methodology", "Methodology",
|
||||
"", "/" + this.stakeholder.alias + "/methodology", false, [], null, {}), items: [
|
||||
new MenuItem("methodology", "Terminology and construction",
|
||||
"", "/" + this.stakeholder.alias + "/methodology", false, [], null, {}),
|
||||
new MenuItem("methodology", "See how it works",
|
||||
"", "/" + this.stakeholder.alias + "/methodology", false, [], null, {}, null, "how"),
|
||||
let indicatorsPage = {
|
||||
rootItem: new MenuItem('resources', 'Resources', '', '', false, [], null, {}),
|
||||
items: [
|
||||
new MenuItem("methodology", "Methodology", "", "/" + this.stakeholder.alias + "/methodology", false, [], null, {}),
|
||||
]
|
||||
};
|
||||
this.configurationService.isPageEnabled('monitor', "/indicators/" + this.stakeholder.type, 'monitor').subscribe(isEnabled => {
|
||||
if(isEnabled) {
|
||||
indicatorsPage.items.push(
|
||||
new MenuItem("indicators-page", "Indicators", "", "/" + this.stakeholder.alias + "/indicators", false, [], null, {})
|
||||
);
|
||||
}
|
||||
});
|
||||
this.menuItems.push(indicatorsPage);
|
||||
if (this.stakeholder.type === "funder") {
|
||||
this.menuItems.push({
|
||||
rootItem: new MenuItem("develop", "Develop",
|
||||
|
@ -368,6 +374,8 @@ export class AppComponent implements OnInit, OnDestroy {
|
|||
this.adminMenuItems.push(new MenuItem("stakeholders", "Manage profiles", "", "/admin", false, [], [], {}, {name: 'settings'}));
|
||||
if (Session.isPortalAdministrator(this.user)) {
|
||||
this.adminMenuItems.push(new MenuItem("super_admin", "Super Admin Options", "", "/admin/admin-tools/portals", false, [], [], {}, {name: 'settings'}, null, null, '/admin/admin-tools'));
|
||||
}
|
||||
if (Session.isPortalAdministrator(this.user) || Session.isMonitorCurator(this.user)) {
|
||||
this.adminMenuItems.push(new MenuItem("monitor", "Monitor Options", "", "/admin/monitor/admin-tools/pages", false, [], [], {}, {name: 'settings'}, null, null, '/admin/monitor/admin-tools'));
|
||||
}
|
||||
this.hasAdminMenu = this.hasAdminMenu && this.adminMenuItems.length > 0;
|
||||
|
|
|
@ -16,6 +16,14 @@ import {OpenaireErrorPageComponent} from "../error/errorPage.component";
|
|||
activeMenuItem: "dashboard"
|
||||
}
|
||||
},
|
||||
{
|
||||
path: ':stakeholder/indicators',
|
||||
loadChildren: () => import('../openaireLibrary/monitor/indicators/indicators.module').then(m => m.IndicatorsModule),
|
||||
canDeactivate: [PreviousRouteRecorder],
|
||||
data: {
|
||||
hasSidebar: false
|
||||
}
|
||||
},
|
||||
{
|
||||
path: ':stakeholder/develop',
|
||||
loadChildren: () => import('../develop/develop.module').then(m => m.DevelopModule),
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 3eba03889355b91f4e335d1997e689ca379b4572
|
||||
Subproject commit e04d825c03fbb3114a88cd7b4de426b4976238bf
|
|
@ -1,4 +1,4 @@
|
|||
.stakeholderPage {
|
||||
.monitor {
|
||||
/* Import OpenAIRE theme*/
|
||||
@import (multiple) "~src/assets/openaire-theme/less/_import";
|
||||
@import (multiple) "~src/assets/common-assets/less/general";
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 98b30a43f1810bcdbc96f119f3f021a1d7872714
|
||||
Subproject commit 0e650a002b6f77957fcbe06b3609c8985c96dd2a
|
Loading…
Reference in New Issue