[SI-161]: Bugfixes
Signed-off-by: Dennis Schmitt <dennis.schmitt@pta.de>
diff --git a/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-list/grid-failure-list.component.html b/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-list/grid-failure-list.component.html
index d88f079..91e3596 100644
--- a/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-list/grid-failure-list.component.html
+++ b/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-list/grid-failure-list.component.html
@@ -61,8 +61,8 @@
</div>
<div class="grid-failure-information-overview" *ngIf="view === 'list'; else map">
- <div class="diverse-options">
- <button class="btn btn-primary diverse-btn" (click)="changeToSelectionMode()" *ngIf="!showCondensationTable">
+ <div class="diverse-options" *ngIf="!showCondensationTable">
+ <button class="btn btn-primary diverse-btn" (click)="changeToSelectionMode()">
{{ 'GridFailures.Condensation' | translate }}
</button>
</div>
diff --git a/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-list/grid-failure-list.component.ts b/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-list/grid-failure-list.component.ts
index 0140d85..5f95b92 100644
--- a/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-list/grid-failure-list.component.ts
+++ b/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-list/grid-failure-list.component.ts
@@ -75,16 +75,20 @@
}
public condenseChoosedGridFailureInformations(): void {
- this.sandbox.condenseCondensationList();
- this.clearGridFailureCondensation();
+ if (this.sandbox.condensationList.length != 0) {
+ this.sandbox.condenseCondensationList();
+ this.clearGridFailureCondensation();
+ }
}
public addCompleteTable(): void {
+ let isNotificationAlreadyShown: boolean = false;
this._gridApi.forEachNodeAfterFilter(node => {
if (this.sandbox.condensationList.length == 0 || node.data.branch === this.sandbox.condensationList[0].branch) {
this.sandbox.addItemToCondensationList(node.data);
} else {
- this._utilService.displayNotification('DifferentBranchesError', 'alert');
+ if (!isNotificationAlreadyShown) this._utilService.displayNotification('DifferentBranchesError', 'alert');
+ isNotificationAlreadyShown = true;
}
});
}