Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@ export default class StatisticsPage extends Page {
.should('exist');
cy.contains('Anzahl erreichter Objectives')
.should('exist');
cy.contains('Key Results mit min. Target Zone')
cy.contains('Key Results mit min. Target Zone erreicht')
.should('exist');
cy.contains('Verhältnis metrische vs. ordinale Key Results')
.should('exist');
cy.contains('Verteilung der Zonen in den Key Results')
cy.contains('Verteilung der Key Results')
.should('exist');
}

validateKrsObjectives(objective: number, keyResult: number, relation: number) {
this.verifyStatisticsField('objectives-key-results', objective, 'Objectives');
this.verifyStatisticsField('objectives-key-results', keyResult, 'KeyResults');
this.verifyStatisticsField('objectives-key-results', keyResult, 'Key Results');
this.verifyStatisticsField('objectives-key-results', relation, 'KR\'s/Objective');
}

Expand All @@ -63,8 +63,8 @@ export default class StatisticsPage extends Page {
validateKrTypeRelation(
valueMetric: number, percentageMetric: string, valueOrdinal: number, percentageOrdinal: string, barProgress: number
) {
this.verifyStatisticsField('kr-type-relation', valueMetric, 'metrisch');
this.verifyStatisticsField('kr-type-relation', valueOrdinal, 'ordinal');
this.verifyStatisticsField('kr-type-relation', valueMetric, 'Metrisch');
this.verifyStatisticsField('kr-type-relation', valueOrdinal, 'Ordinal');
this.verifyStatisticsFieldSubTitle('kr-type-relation', percentageMetric);
this.verifyStatisticsFieldSubTitle('kr-type-relation', percentageOrdinal);
this.verifyStatisticsCardBar('kr-type-relation', barProgress);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<div class="statistic-card flex-column d-flex align-items-center gap-4">
<div class="statistic-card flex-column d-flex align-items-center gap-4">
<h2 class="mt-4">{{ title }}</h2>
<h3 class="mt-0">{{ subtitle }}</h3>
<div class="d-flex justify-content-center gap-2 row row-cols-auto">
<ng-content></ng-content>
</div>
Expand All @@ -11,4 +12,4 @@ <h2 class="mt-4">{{ title }}</h2>
[colorPreset]="barColorPreset"
[progress]="barProgress *100 || 0"
></app-statistics-bar>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,13 @@
border: #5d6974 1px solid;
border-radius: 4px;
}

.statistic-card h3 {
margin: 0;
padding: 0;
line-height: 0 !important;
}

.statistic-card h3:empty {
display: none;
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import { Component, Input } from '@angular/core';
export class StatisticsCardComponent {
@Input() title = '';

@Input() subtitle = '';

@Input() barProgress?: number;

@Input() barColorPreset?: string;
Expand Down
14 changes: 8 additions & 6 deletions frontend/src/app/statistics/statistics.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ <h1> Auswertung </h1>
*ngIf="statistics.objectiveAmount ==0 && statistics.keyResultAmount ==0"
[attr.data-testId]="'no-data-banner'"
>
Für diese Filterkombination sind keine Objectives bzw. KeyResults vorhanden.
Für dieses Team ist im ausgewählten Zeitraum kein Objective vorhanden.
</div>
<div class="row row-cols-1 row-cols-md-2 row-cols-xxl-3 g-4">
<app-statistics-card [title]="'Objectives und Key Results'" [attr.data-testId]="'objectives-key-results'">
<app-statistics-information [topContent]="'Objectives'"> {{ statistics.objectiveAmount }}
</app-statistics-information>
<app-statistics-information [topContent]="'KeyResults'">{{ statistics.keyResultAmount }}
<app-statistics-information [topContent]="'Key Results'">{{ statistics.keyResultAmount }}
</app-statistics-information>
<app-statistics-information [topContent]="'KR\'s/Objective'">
{{ krObjectiveRelation(statistics) | number : '1.0-1' }}
Expand Down Expand Up @@ -65,7 +65,8 @@ <h1> Auswertung </h1>

<app-statistics-card
[attr.data-testId]="'kr-min-target'"
[title]="'Key Results mit min. Target Zone'"
[title]="'Key Results mit min. Target Zone erreicht'"
[subtitle]="'Alle Key Results berücksichtigt'"
[barProgress]="statistics.keyResultsInTargetOrStretchAmount / statistics.keyResultAmount"
>
<app-statistics-information [bottomContent]="statistics.keyResultsInTargetOrStretchAmount+'/'+statistics.keyResultAmount">
Expand All @@ -80,17 +81,18 @@ <h1> Auswertung </h1>
[barProgress]="relation.metric"
[barColorPreset]="'relation'"
>
<app-statistics-information [topContent]="'metrisch'" [bottomContent]="relation.metric | percent : '1.0-1'">
<app-statistics-information [topContent]="'Metrisch'" [bottomContent]="relation.metric | percent : '1.0-1'">
{{ statistics.keyResultsMetricAmount }}
</app-statistics-information>
<app-statistics-information [topContent]="'ordinal'" [bottomContent]="relation.ordinal | percent : '1.0-1'">
<app-statistics-information [topContent]="'Ordinal'" [bottomContent]="relation.ordinal | percent : '1.0-1'">
{{ statistics.keyResultsOrdinalAmount }}
</app-statistics-information>
</app-statistics-card>

<app-statistics-card
[attr.data-testId]="'kr-progress-relation'"
[title]="'Verteilung der Zonen in den Key Results'"
[title]="'Verteilung der Key Results'"
[subtitle]="'Nur eingecheckte Key Results berücksichtigt'"
*ngIf="krProgressRelation(statistics) as relation"
>
<app-statistics-information
Expand Down
Loading