Skip to content

Commit a403a9b

Browse files
committed
feat(frontend): Add subtitle for statistic card component to clarify the counting #1645
1 parent 370c5f7 commit a403a9b

File tree

4 files changed

+17
-2
lines changed

4 files changed

+17
-2
lines changed

frontend/src/app/statistics/statistics-card/statistics-card.component.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
<div class="statistic-card flex-column d-flex align-items-center gap-4">
1+
<div class="statistic-card flex-column d-flex align-items-center gap-4">
22
<h2 class="mt-4">{{ title }}</h2>
3+
<h3 class="mt-0">{{ subtitle }}</h3>
34
<div class="d-flex justify-content-center gap-2 row row-cols-auto">
45
<ng-content></ng-content>
56
</div>
@@ -11,4 +12,4 @@ <h2 class="mt-4">{{ title }}</h2>
1112
[colorPreset]="barColorPreset"
1213
[progress]="barProgress *100 || 0"
1314
></app-statistics-bar>
14-
</div>
15+
</div>

frontend/src/app/statistics/statistics-card/statistics-card.component.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,13 @@
55
border: #5d6974 1px solid;
66
border-radius: 4px;
77
}
8+
9+
.statistic-card h3 {
10+
margin: 0;
11+
padding: 0;
12+
line-height: 0 !important;
13+
}
14+
15+
.statistic-card h3:empty {
16+
display: none;
17+
}

frontend/src/app/statistics/statistics-card/statistics-card.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import { Component, Input } from '@angular/core';
99
export class StatisticsCardComponent {
1010
@Input() title = '';
1111

12+
@Input() subtitle = '';
13+
1214
@Input() barProgress?: number;
1315

1416
@Input() barColorPreset?: string;

frontend/src/app/statistics/statistics.component.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ <h1> Auswertung </h1>
6666
<app-statistics-card
6767
[attr.data-testId]="'kr-min-target'"
6868
[title]="'Key Results mit min. Target Zone erreicht'"
69+
[subtitle]="'Alle Key Results berücksichtigt'"
6970
[barProgress]="statistics.keyResultsInTargetOrStretchAmount / statistics.keyResultAmount"
7071
>
7172
<app-statistics-information [bottomContent]="statistics.keyResultsInTargetOrStretchAmount+'/'+statistics.keyResultAmount">
@@ -91,6 +92,7 @@ <h1> Auswertung </h1>
9192
<app-statistics-card
9293
[attr.data-testId]="'kr-progress-relation'"
9394
[title]="'Verteilung der Key Results'"
95+
[subtitle]="'Nur eingecheckte Key Results berücksichtigt'"
9496
*ngIf="krProgressRelation(statistics) as relation"
9597
>
9698
<app-statistics-information

0 commit comments

Comments
 (0)