Change description in numbers card in monitor dashboard. Fix infinite loop from last commit in error page.

This commit is contained in:
Konstantinos Triantafyllou 2022-11-08 16:37:44 +02:00
parent 7e4e6e6d46
commit bfd19dfaf3
4 changed files with 32 additions and 48 deletions

View File

@ -201,11 +201,6 @@ export class AppComponent implements OnInit, OnDestroy {
} else { } else {
this.activeCategory = this.activeTopic.categories.find(category => this.isPublicOrIsMember(category.visibility)); this.activeCategory = this.activeTopic.categories.find(category => this.isPublicOrIsMember(category.visibility));
} }
if(!this.activeCategory) {
this.navigateToError();
}
} else {
this.navigateToError();
} }
} }

View File

@ -102,41 +102,33 @@
<h5 *ngIf="number.title" class="uk-width-1-1 uk-margin-bottom">{{number.title}}</h5> <h5 *ngIf="number.title" class="uk-width-1-1 uk-margin-bottom">{{number.title}}</h5>
<ng-template ngFor [ngForOf]="number.indicators" let-indicator let-j="index"> <ng-template ngFor [ngForOf]="number.indicators" let-indicator let-j="index">
<div *ngIf="isPublicOrIsMember(indicator.visibility)" [ngClass]="getNumberClassBySize(indicator.width)"> <div *ngIf="isPublicOrIsMember(indicator.visibility)" [ngClass]="getNumberClassBySize(indicator.width)">
<div class="uk-card uk-card-default uk-padding-small number-card" <div class="uk-card uk-card-default uk-padding-small number-card uk-position-relative"
[class.semiFiltered]="indicator.indicatorPaths[0].filtersApplied < countSelectedFilters()"> [class.semiFiltered]="indicator.indicatorPaths[0].filtersApplied < countSelectedFilters()">
<!--<div *ngIf="properties.environment === 'development'"> <div *ngIf="!showDescriptionOverlay[j]">
Filtered:{{indicator.indicatorPaths[0].filtersApplied}}out of{{countSelectedFilters()}} <div class="uk-text-xsmall uk-text-truncate uk-margin-xsmall-bottom uk-margin-right">{{indicator.name}}</div>
</div>-->
<div class="uk-text-xsmall uk-margin-xsmall-bottom">{{indicator.name}}</div>
<div class="number uk-text-small uk-text-bold"> <div class="number uk-text-small uk-text-bold">
<span *ngIf="numberResults.get(i + '-' + j)">{{numberResults.get(i + '-' + j) | number}}</span> <span *ngIf="numberResults.get(i + '-' + j)">{{numberResults.get(i + '-' + j) | number}}</span>
<span *ngIf="!numberResults.get(i + '-' + j)">--</span> <span *ngIf="!numberResults.get(i + '-' + j)">--</span>
</div> </div>
<!-- for printing only -->
<span *ngIf="numberResults.get(i + '-' + j)"
class="uk-text-bold uk-hidden">{{numberResults.get(i + '-' + j) | number}}</span>
<!-- ----------------- -->
<div *ngIf="indicator.description || indicator.additionalDescription" <div *ngIf="indicator.description || indicator.additionalDescription"
class="uk-position-bottom-right uk-text-center uk-margin-small-bottom uk-margin-small-right"> class="uk-position-top-right uk-text-center uk-margin-small-top uk-margin-small-right">
<a class="uk-display-inline-block uk-button uk-button-text" <a class="uk-display-inline-block uk-button uk-button-link" uk-tooltip="Note" (click)="toggleDescriptionOverlay($event, j)">
(click)="toggleDescriptionOverlay($event, j)">
<span class="uk-flex uk-flex-middle"> <span class="uk-flex uk-flex-middle">
<icon name="analytics" type="outlined" [flex]="true"></icon> <icon name="analytics" type="outlined" [flex]="true"></icon>
<span class="uk-margin-small-left">Note</span>
</span> </span>
</a> </a>
</div> </div>
<div *ngIf="showDescriptionOverlay[j] && (indicator.description || indicator.additionalDescription)"
class="indicator-description uk-card uk-card-default uk-flex uk-flex-middle uk-flex-center">
<div class="inner" click-outside-or-esc
(clickOutside)="closeDescriptionOverlay($event, j)">
<div class="uk-padding-small">
<div class="uk-flex uk-flex-right">
<button class="uk-close uk-icon" (click)="toggleDescriptionOverlay($event, j)">
<icon name="close" ratio="1"></icon>
</button>
</div> </div>
<div class="uk-padding-small uk-padding-remove-horizontal"> <div *ngIf="showDescriptionOverlay[j] && (indicator.description || indicator.additionalDescription)" click-outside-or-esc class="uk-overflow-auto"
(clickOutside)="closeDescriptionOverlay($event, j)">
<div class="uk-position-top-right uk-text-center uk-margin-small-top uk-margin-small-right">
<a class="uk-display-inline-block uk-button uk-button-link" (click)="toggleDescriptionOverlay($event, j)">
<span class="uk-flex uk-flex-middle">
<icon name="close" type="outlined" [flex]="true"></icon>
</span>
</a>
</div>
<div class="uk-margin-small-top uk-margin-right">
<p *ngIf="indicator.description"> <p *ngIf="indicator.description">
{{indicator.description}} {{indicator.description}}
</p> </p>
@ -147,8 +139,6 @@
</div> </div>
</div> </div>
</div> </div>
</div>
</div>
</ng-template> </ng-template>
</div> </div>
</ng-container> </ng-container>

View File

@ -78,7 +78,6 @@ export class MonitorComponent implements OnInit, OnDestroy {
privateStakeholder = false; privateStakeholder = false;
public keyword: UntypedFormControl; public keyword: UntypedFormControl;
public statsUpdateDate: Date; public statsUpdateDate: Date;
public stickyPageHeader: boolean = false;
public showDescriptionOverlay: boolean[] = []; public showDescriptionOverlay: boolean[] = [];
public isFullscreen: boolean = false; public isFullscreen: boolean = false;

@ -1 +1 @@
Subproject commit 75433ae50ab42a5ad1aea2a26ec26c57e78e4a25 Subproject commit 24779729b6f6bd4f099ed5645786b6452120d3d6