Some fixes regarding Preview mode. Change round of numbers to over 1M and to one decimal.

This commit is contained in:
Konstantinos Triantafyllou 2023-01-11 16:09:26 +02:00
parent 7568509b95
commit b3403a65cf
6 changed files with 11 additions and 9 deletions

View File

@ -34,7 +34,7 @@
</div> </div>
<div class="uk-margin-medium-bottom"> <div class="uk-margin-medium-bottom">
<div *ngIf="!user"> <div *ngIf="!user">
If you have been already a member of this dashboard - Sign in in order to enter the dashboard If you are a member of this dashboard, please sign in.
</div> </div>
<div> <div>
If you want to be a member of this dashboard - Contact us. If you want to be a member of this dashboard - Contact us.

View File

@ -128,6 +128,9 @@ export class AppComponent implements OnInit, OnDestroy {
})); }));
this.route.queryParams.subscribe(params => { this.route.queryParams.subscribe(params => {
this.view = params['view']; this.view = params['view'];
if(this.stakeholder) {
this.setSideBar();
}
}); });
this.layoutService.setSmallScreen((this.innerWidth && this.innerWidth <= 640)); this.layoutService.setSmallScreen((this.innerWidth && this.innerWidth <= 640));
this.layoutService.setOpen(!(this.innerWidth && this.innerWidth <= 640)); this.layoutService.setOpen(!(this.innerWidth && this.innerWidth <= 640));
@ -277,7 +280,7 @@ export class AppComponent implements OnInit, OnDestroy {
let topicItem: MenuItem = new MenuItem(topic.alias, topic.name, "", '/' + this.stakeholder.alias + '/' + topic.alias, let topicItem: MenuItem = new MenuItem(topic.alias, topic.name, "", '/' + this.stakeholder.alias + '/' + topic.alias,
null, [], [], {}, {svg: topic.icon}, null, null, ( null, [], [], {}, {svg: topic.icon}, null, null, (
'/' + this.stakeholder.alias + '/' + topic.alias)); '/' + this.stakeholder.alias + '/' + topic.alias));
topicItem.items = topic.categories.map(category => { topicItem.items = topic.categories.filter(category => this.hasPermission(category.visibility)).map(category => {
return new MenuItem(category.alias, category.name, "", ('/' + this.stakeholder.alias + '/' + topic.alias + '/' + category.alias), return new MenuItem(category.alias, category.name, "", ('/' + this.stakeholder.alias + '/' + topic.alias + '/' + category.alias),
null, [], [], {}, {svg: topic.icon}, null, null, null, [], [], {}, {svg: topic.icon}, null, null,
('/' + this.stakeholder.alias + '/' + topic.alias + '/' + category.alias)); ('/' + this.stakeholder.alias + '/' + topic.alias + '/' + category.alias));

View File

@ -86,7 +86,7 @@
|| !activeTopic || !activeCategory || !activeSubCategory)" [ngIfElse]="content"> || !activeTopic || !activeCategory || !activeSubCategory)" [ngIfElse]="content">
<div class="message uk-text-center"> <div class="message uk-text-center">
<h3> <h3>
No indicators available yet. Stay tuned! Nothing to see here!
</h3> </h3>
</div> </div>
</ng-template> </ng-template>
@ -103,7 +103,7 @@
<div *ngIf="!showDescriptionOverlay[j]"> <div *ngIf="!showDescriptionOverlay[j]">
<div class="uk-text-small uk-text-truncate uk-margin-xsmall-bottom uk-margin-right">{{indicator.name}}</div> <div class="uk-text-small uk-text-truncate uk-margin-xsmall-bottom uk-margin-right">{{indicator.name}}</div>
<div class="number uk-text-small uk-text-bold uk-text-lowercase"> <div class="number uk-text-small uk-text-bold uk-text-lowercase">
<span *ngIf="numberResults.get(i + '-' + j)">{{numberResults.get(i + '-' + j) | numberRound}}</span> <span *ngIf="numberResults.get(i + '-' + j)">{{numberResults.get(i + '-' + j) | numberRound: 2:1}}</span>
<span *ngIf="!numberResults.get(i + '-' + j)">--</span> <span *ngIf="!numberResults.get(i + '-' + j)">--</span>
</div> </div>
<div *ngIf="indicator.description || indicator.additionalDescription" <div *ngIf="indicator.description || indicator.additionalDescription"

@ -1 +1 @@
Subproject commit e0c45b1065a2456620f8b4774ab27ecc17b0bb87 Subproject commit 4cd5bcd12b6d41cef384b54aa4a9c3fecbb46a1f

View File

@ -68,7 +68,7 @@
</div> </div>
<div class="uk-text-small uk-text-truncate uk-margin-xsmall-bottom uk-margin-right">{{indicator.name}}</div> <div class="uk-text-small uk-text-truncate uk-margin-xsmall-bottom uk-margin-right">{{indicator.name}}</div>
<div class="number uk-text-small uk-text-bold uk-text-lowercase"> <div class="number uk-text-small uk-text-bold uk-text-lowercase">
<span *ngIf="numberResults.get(i + '-' + j)">{{numberResults.get(i + '-' + j) | numberRound}}</span> <span *ngIf="numberResults.get(i + '-' + j)">{{numberResults.get(i + '-' + j) | numberRound: 2:1}}</span>
<span *ngIf="!numberResults.get(i + '-' + j)">--</span> <span *ngIf="!numberResults.get(i + '-' + j)">--</span>
</div> </div>
</div> </div>

View File

@ -204,12 +204,11 @@
<div #preview uk-dropdown="mode: click; pos: bottom-left; offset: 5; delay-hide: 0; flip: false"> <div #preview uk-dropdown="mode: click; pos: bottom-left; offset: 5; delay-hide: 0; flip: false">
<ul class="uk-nav uk-dropdown-nav"> <ul class="uk-nav uk-dropdown-nav">
<li><a target="_blank" <li><a target="_blank"
[routerLink]="'/' + stakeholder.alias + '/' + stakeholder.topics[topicIndex].alias" [routerLink]="'/' + stakeholder.alias"
[queryParams]="{view: 'PUBLIC'}" [queryParams]="{view: 'PUBLIC'}"
(click)="hide(preview)">Public view</a> (click)="hide(preview)">Public view</a>
</li> </li>
<li><a target="_blank" [routerLink]="'/' + stakeholder.alias + '/' + <li><a target="_blank" [routerLink]="'/' + stakeholder.alias"
stakeholder.topics[topicIndex].alias"
[queryParams]="{view: 'RESTRICTED'}" [queryParams]="{view: 'RESTRICTED'}"
(click)="hide(preview)">Restricted view</a> (click)="hide(preview)">Restricted view</a>
</li> </li>