Merge branch 'SI-2944-BUG-Stationsfilter-zeigt-keine-zusammengesetzte-Zellwerte' of ssh://git.eclipse.org:29418/openk-usermodules/org.eclipse.openk-usermodules.gridFailureInformation.frontend into DEVELOP
diff --git a/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-list/grid-failure-list-column-definition.ts b/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-list/grid-failure-list-column-definition.ts
index d9ff356..eb14ef8 100644
--- a/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-list/grid-failure-list-column-definition.ts
+++ b/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-list/grid-failure-list-column-definition.ts
@@ -214,8 +214,8 @@
colId: 'radius',
headerName: 'GridFailure.RadiusInM',
sortable: true,
- comparator: sortAlphaNum,
suppressMovable: true,
+ valueGetter: param => (param.data.radius !== null ? param.data.radius.toString() : null),
filter: 'setFilterComponent',
},
{
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 b524c94..92c4216 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
@@ -147,9 +147,16 @@
public addCompleteTable(): void {
let isNotificationAlreadyShown: boolean = false;
this._gridApi.forEachNodeAfterFilter(node => {
- if ((!this.sandbox.condensationList.length || node.data.branch === this.sandbox.condensationList[0].branch) && !node.data.condensed) {
+ let publicationStatusIsPublishedOrWithdrawn: boolean =
+ node.data.publicationStatus === StateEnum.PUBLISHED || node.data.publicationStatus === StateEnum.WITHDRAWN;
+ const emptyArrayExits = !!this.sandbox.condensationList && 'length' in this.sandbox.condensationList && this.sandbox.condensationList.length === 0;
+ if (
+ (emptyArrayExits || node.data.branch === this.sandbox.condensationList[0].branch) &&
+ !node.data.condensed &&
+ !publicationStatusIsPublishedOrWithdrawn
+ ) {
this.sandbox.addItemToCondensationList(node.data);
- } else if (!isNotificationAlreadyShown) {
+ } else if (!isNotificationAlreadyShown && !node.data.condensed && !publicationStatusIsPublishedOrWithdrawn) {
this._utilService.displayNotification('DifferentBranchesWarning', 'alert');
isNotificationAlreadyShown = true;
}
diff --git a/projects/grid-failure-information-app/src/app/shared/components/cell-renderer/header-cell-renderer/header-cell-renderer.component.html b/projects/grid-failure-information-app/src/app/shared/components/cell-renderer/header-cell-renderer/header-cell-renderer.component.html
index 4946c10..bd96ffb 100644
--- a/projects/grid-failure-information-app/src/app/shared/components/cell-renderer/header-cell-renderer/header-cell-renderer.component.html
+++ b/projects/grid-failure-information-app/src/app/shared/components/cell-renderer/header-cell-renderer/header-cell-renderer.component.html
@@ -11,7 +11,7 @@
* SPDX-License-Identifier: EPL-2.0
********************************************************************************/ -->
<div>
- <button *ngIf="addIcon" (click)="clicked('addAllItems')" class="tool-icon">
+ <button *ngIf="addHeaderIcon" (click)="clicked('addAllItems')" class="tool-icon">
<fa name="plus"></fa>
</button>
</div>
diff --git a/projects/grid-failure-information-app/src/app/shared/components/cell-renderer/header-cell-renderer/header-cell-renderer.component.spec.ts b/projects/grid-failure-information-app/src/app/shared/components/cell-renderer/header-cell-renderer/header-cell-renderer.component.spec.ts
index e228d98..ffefa33 100644
--- a/projects/grid-failure-information-app/src/app/shared/components/cell-renderer/header-cell-renderer/header-cell-renderer.component.spec.ts
+++ b/projects/grid-failure-information-app/src/app/shared/components/cell-renderer/header-cell-renderer/header-cell-renderer.component.spec.ts
@@ -25,7 +25,7 @@
expect(component).toBeTruthy();
});
- it('should init the renderer and define the addIcon if there is an context icon', () => {
+ it('should init the renderer and define the addHeaderIcon if there is an context icon', () => {
const params: any = {
context: {
icons: { add: 'im_an_icon' },
@@ -35,11 +35,11 @@
},
};
component.agInit(params);
- expect(component.addIcon).toBeDefined();
- expect(component.addIcon).toBe(true);
+ expect(component.addHeaderIcon).toBeDefined();
+ expect(component.addHeaderIcon).toBe(true);
});
- it('should call updateIcon and hide addIcon if mode is InitialMode and there are no context icons', () => {
+ it('should call updateIcon and hide addHeaderIcon if mode is InitialMode and there are no context icons', () => {
const event: any = { eventType: ModeEnum.InitialMode };
const params: any = {
context: {
@@ -48,10 +48,10 @@
};
component.agInit(params);
- expect(component.addIcon).toBeFalsy();
+ expect(component.addHeaderIcon).toBeFalsy();
});
- it('should call updateIcon and show addIcon if mode is OverviewTableSelectionMode and there are no context icons', () => {
+ it('should call updateIcon and show addHeaderIcon if mode is OverviewTableSelectionMode and there are no context icons', () => {
const event: any = { eventType: ModeEnum.OverviewTableSelectionMode };
const params: any = {
context: {
@@ -60,12 +60,12 @@
};
component.agInit(params);
- expect(component.addIcon).toBeTruthy();
+ expect(component.addHeaderIcon).toBeTruthy();
});
- it('should call updateIcon and dont set addIcon if mode is anything else and there are no context icons', () => {
+ it('should call updateIcon and dont set addHeaderIcon if mode is anything else and there are no context icons', () => {
const dontChangedAddIconValue: boolean = true;
- component.addIcon = dontChangedAddIconValue;
+ component.addHeaderIcon = dontChangedAddIconValue;
const event: any = { eventType: 'im_not_initial_and_not_overview_mode' };
const params: any = {
context: {
@@ -74,7 +74,7 @@
};
component.agInit(params);
- expect(component.addIcon).toBe(dontChangedAddIconValue);
+ expect(component.addHeaderIcon).toBe(dontChangedAddIconValue);
});
it('should transfer the updated values on click ', () => {
diff --git a/projects/grid-failure-information-app/src/app/shared/components/cell-renderer/header-cell-renderer/header-cell-renderer.component.ts b/projects/grid-failure-information-app/src/app/shared/components/cell-renderer/header-cell-renderer/header-cell-renderer.component.ts
index 1ab1208..232d01d 100644
--- a/projects/grid-failure-information-app/src/app/shared/components/cell-renderer/header-cell-renderer/header-cell-renderer.component.ts
+++ b/projects/grid-failure-information-app/src/app/shared/components/cell-renderer/header-cell-renderer/header-cell-renderer.component.ts
@@ -20,7 +20,7 @@
styleUrls: ['./header-cell-renderer.component.scss'],
})
export class HeaderCellRendererComponent implements IHeaderAngularComp {
- public addIcon = null;
+ public addHeaderIcon = null;
private _params: any;
private _modeEnum = ModeEnum;
@@ -30,7 +30,7 @@
this._updateIcon();
if (params.context && params.context.icons) {
const contextIcons = params.context.icons;
- this.addIcon = !!contextIcons && !!contextIcons.add;
+ this.addHeaderIcon = !!contextIcons && !!contextIcons.add;
}
}
@@ -42,10 +42,10 @@
this._params.context.eventSubject.subscribe((event: any) => {
switch (event.eventType) {
case this._modeEnum.InitialMode:
- this.addIcon = false;
+ this.addHeaderIcon = false;
break;
case this._modeEnum.OverviewTableSelectionMode:
- this.addIcon = true;
+ this.addHeaderIcon = true;
break;
default:
break;
diff --git a/projects/grid-failure-information-app/src/app/shared/filters/ag-grid/set-filter/set-filter.component.ts b/projects/grid-failure-information-app/src/app/shared/filters/ag-grid/set-filter/set-filter.component.ts
index 1c0f9bb..6bdc12b 100644
--- a/projects/grid-failure-information-app/src/app/shared/filters/ag-grid/set-filter/set-filter.component.ts
+++ b/projects/grid-failure-information-app/src/app/shared/filters/ag-grid/set-filter/set-filter.component.ts
@@ -39,6 +39,7 @@
filterCheckboxList(text: string) {
text
+ .trim()
.toLowerCase()
.split(' ')
.forEach(filterWord => {
diff --git a/projects/grid-failure-information-app/src/app/shared/utility/utilityHelpers.ts b/projects/grid-failure-information-app/src/app/shared/utility/utilityHelpers.ts
index ba97cda..7ddcc1f 100644
--- a/projects/grid-failure-information-app/src/app/shared/utility/utilityHelpers.ts
+++ b/projects/grid-failure-information-app/src/app/shared/utility/utilityHelpers.ts
@@ -109,7 +109,9 @@
}
export function convertEmptyValueToNull(value: string): string {
- return !value || value.toString().trim() === '' ? null : value;
+ if (value === null || value.toString().trim() === '') {
+ return null;
+ } else return value;
}
export function getDependencyPropertyFromControlId(controlId: string): string {