[Monitor dashboard|Trunk]

For the menu use the stakeholder name instead of index_name

redirect to error pages changed:
	-private stakeholder -- > message private data
	-public stakeholder with no topic/category/subcategory to show (either because is private, inactive or simpe they don't exist) --> message no indicators yet
	-inactive stakeholder/topic/category/subcategory OR the alias from URL doesn't exist --> error page





git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-monitor-portal/trunk/monitor_dashboard@58986 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
Argiro Kokogiannaki 2020-06-24 13:36:00 +00:00
parent 03879e7eeb
commit 286b82c01a
2 changed files with 37 additions and 21 deletions

View File

@ -14,7 +14,7 @@
<span class="uk-visible@m">
{{'OpenAIRE Monitor '+(stakeholder.type == 'ri'?'Research Initiative':stakeholder.type)+
' - ' }}</span>
<span> {{stakeholder.index_name}}</span>
<span> {{stakeholder.name}}</span>
</div>
@ -23,9 +23,10 @@
</div>
<div *ngIf="stakeholder && status === errorCodes.DONE && activeTopic"
<div *ngIf="stakeholder"
class="uk-navbar-right uk-margin-right">
<ul class="uk-navbar-nav user_actions uk-padding uk-padding-remove-vertical uk-padding-remove-right">
<ul *ngIf="!privateStakeholder"
class="uk-navbar-nav user_actions uk-padding uk-padding-remove-vertical uk-padding-remove-right">
<li title="It is comming soon. Stay tuned!">
<a class="login" [routerLink]="(isAdmin()?['/admin', this.stakeholder.alias]:null)" >
Manage
@ -46,7 +47,7 @@
</div>
</nav>
</div>
<dashboard-sidebar *ngIf="sideBarItems.length > 0 && stakeholder" [items]="sideBarItems"
<dashboard-sidebar *ngIf=" stakeholder" [items]="sideBarItems"
[activeItem]="activeTopic?activeTopic.alias:null"
[activeSubItem]="activeSubCategory?activeSubCategory.alias:null" [showHeader]=true
headerName="Monitor" [showSearch]="true" [headerUrl]="properties.baseLink"
@ -93,6 +94,13 @@
[(ngModel)]="endYear">
<button class="uk-button uk-button-primary" (click)="setIndicators()">Apply</button>
</div>-->
<div *ngIf="privateStakeholder">
<div class="uk-text-center uk-height-medium">
<div class="uk-h3 "><i ><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black" width="24px" height="24px"><path d="M0 0h24v24H0z" fill="none"/><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"/></svg></i>
Private data</div>
<div class="uk-text-large "></div>
</div>
</div>
<div
*ngIf="(activeSubCategory && (activeSubCategory.charts.length == 0 ||
(activeSubCategory.charts.length == 1 && activeSubCategory.charts[0].indicators.length == 0)))
@ -101,15 +109,22 @@
activeSubCategory.description.length > 0) ||
(activeCategory && activeCategory.description && activeCategory.description.length > 0) ||
(activeTopic && activeTopic.description && activeTopic.description.length > 0))"
class="">
<div class="">
<div class="uk-h5">
{{activeSubCategory && activeSubCategory.description && activeSubCategory.description.length > 0 ? activeSubCategory.description
: (activeCategory && activeCategory.description && activeCategory.description.length > 0 ? activeCategory.description :
(activeTopic.description && activeTopic.description.length > 0 ? activeTopic.description : ""))}}
class="uk-text-center">
<div class="uk-h5 uk-height-medium">
{{activeSubCategory && activeSubCategory.description && activeSubCategory.description.length > 0 ? activeSubCategory.description
: (activeCategory && activeCategory.description && activeCategory.description.length > 0 ? activeCategory.description :
(activeTopic.description && activeTopic.description.length > 0 ? activeTopic.description : ""))}}
</div>
</div>
<div
*ngIf="stakeholder && (!activeTopic || !activeCategory || !activeSubCategory) && !privateStakeholder"
class="uk-text-center">
<div class="uk-h5 uk-height-medium">
No indicators available yet. Stay tuned!
</div>
</div>
</div>
<div *ngIf="!loading &&
(!activeSubCategory ||
(
@ -117,7 +132,7 @@
&&
(activeSubCategory.charts.length == 0 || (activeSubCategory.charts.length == 1 && activeSubCategory.charts[0].indicators.length == 0))
))">
<div class="">
<div class=" uk-text-center">
<div class="uk-h3">
No indicators available yet. Stay tuned!
</div>
@ -200,7 +215,7 @@
</div>
</div>-->
<div *ngIf="stakeholder" id="style_switcher" class="filters_switcher"
<div *ngIf="stakeholder && !privateStakeholder" id="style_switcher" class="filters_switcher"
title="It is comming soon. Stay tuned!">
<div id="style_switcher_toggle">
<i class=" uk-text-muted">

View File

@ -58,7 +58,7 @@ export class MonitorComponent implements OnInit, OnDestroy, IDeactivateComponent
fundingL0;
startYear;
endYear;
privateStakeholder = false;
public keyword: FormControl;
constructor(
@ -133,7 +133,8 @@ export class MonitorComponent implements OnInit, OnDestroy, IDeactivateComponent
this.setView(params);
this.layoutService.setOpen(true);
} else {
this.navigateToError();
this.privateStakeholder = true;
// this.navigateToError();
subscription.unsubscribe();
}
}
@ -237,14 +238,14 @@ export class MonitorComponent implements OnInit, OnDestroy, IDeactivateComponent
if (this.activeSubCategory) {
this.setSideBar();
this.setIndicators();
} else {
this.navigateToError();
// } else {
// this.navigateToError();
}
} else {
this.navigateToError();
// } else {
// this.navigateToError();
}
} else {
this.navigateToError();
// } else {
// this.navigateToError();
}
}
}