Merge branch 'DEVELOP' of ssh://git.eclipse.org:29418/openk-usermodules/org.eclipse.openk-usermodules.gridFailureInformation.frontend into SI-3105-Spannungsebene-Pflichtfeld
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 693e4d2..fc05655 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
@@ -276,12 +276,11 @@
           this._router.navigate(['/grid-failures', event.data.id]);
           break;
         case this._eventTypeEnum.InitialLoad:
-          this.showEditCondensationBtn = !(
-            this.sandbox.condensationList.length &&
-            this.sandbox.condensationList.length > 0 &&
-            this.sandbox.condensationList[0].statusIntern === StateEnum.COMPLETED
-          );
           this._changeMode();
+          this.showEditCondensationBtn = !(
+            !!this.sandbox.condenseStatusIntern &&
+            (this.sandbox.condenseStatusIntern === StateEnum.COMPLETED || this.sandbox.condenseStatusIntern === StateEnum.CANCELED)
+          );
           break;
         default:
           break;
@@ -292,7 +291,7 @@
   private _changeMode(): void {
     this.enableSelectionMode
       ? this.condensationEvents$.next({ eventType: this._modeEnum.CondensationTableSelectionMode })
-      : this.condensationEvents$.next({ eventType: this._modeEnum.InitialMode });
+      : this.condensationEvents$.next({ eventType: this._modeEnum.CondensationTableNoSelectionMode });
     this.enableSelectionMode
       ? this.events$.next({ eventType: this._modeEnum.OverviewTableSelectionMode })
       : this.events$.next({ eventType: this._modeEnum.InitialMode });
diff --git a/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-list/grid-failure.sandbox.ts b/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-list/grid-failure.sandbox.ts
index 7082a69..c420991 100644
--- a/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-list/grid-failure.sandbox.ts
+++ b/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-list/grid-failure.sandbox.ts
@@ -46,6 +46,7 @@
   public condensationList: GridFailure[] = new Array();
   public condenseId: string = null;
   public condenseBranch: string = null;
+  public condenseStatusIntern: string = null;
   public StateEnum = StateEnum;
   public RolesEnum = RolesEnum;
   public isReminderActive$: Observable<boolean> = this.appState$.select(store.getGridFailureReminderData);
@@ -126,6 +127,10 @@
     ).subscribe(([stations, condensedGridFailures]) => {
       if (condensedGridFailures && condensedGridFailures.length) {
         this.condensationList = this._getGridFailureWithReadableStationInformation(condensedGridFailures, stations);
+        const condensedGridFailureFromOverview = this.overviewGridFailureList.find(gridFailure => gridFailure.id === this.condenseId);
+        if (!!condensedGridFailureFromOverview) {
+          this.condenseStatusIntern = condensedGridFailureFromOverview.statusIntern;
+        }
         this.condenseBranch = condensedGridFailures[0].branch;
       }
     });
diff --git a/projects/grid-failure-information-app/src/app/shared/components/cell-renderer/icon-cell-renderer/icon-cell-renderer.component.ts b/projects/grid-failure-information-app/src/app/shared/components/cell-renderer/icon-cell-renderer/icon-cell-renderer.component.ts
index d90ce3b..257ae00 100644
--- a/projects/grid-failure-information-app/src/app/shared/components/cell-renderer/icon-cell-renderer/icon-cell-renderer.component.ts
+++ b/projects/grid-failure-information-app/src/app/shared/components/cell-renderer/icon-cell-renderer/icon-cell-renderer.component.ts
@@ -83,6 +83,10 @@
           this.editIcon = false;
           this.removeIcon = true;
           break;
+        case this._modeEnum.CondensationTableNoSelectionMode:
+          this.readonlyIcon = this.params.data.statusIntern === StateEnum.COMPLETED || this.params.data.statusIntern === StateEnum.CANCELED;
+          this.editIcon = !this.readonlyIcon;
+          break;
         case this._modeEnum.oldVersionMode:
           this.deleteIcon = false;
           break;
diff --git a/projects/grid-failure-information-app/src/app/shared/constants/enums.ts b/projects/grid-failure-information-app/src/app/shared/constants/enums.ts
index d3a2444..c629bba 100644
--- a/projects/grid-failure-information-app/src/app/shared/constants/enums.ts
+++ b/projects/grid-failure-information-app/src/app/shared/constants/enums.ts
@@ -60,6 +60,7 @@
   InitialMode = 'initialMode',
   OverviewTableSelectionMode = 'overviewTableSelectionMode',
   CondensationTableSelectionMode = 'condensationTableSelectionMode',
+  CondensationTableNoSelectionMode = 'condensationTableNoSelectionMode',
   oldVersionMode = 'oldVersionMode',
   currentVersionMode = 'currentVersionMode',
 }
diff --git a/projects/grid-failure-information-app/src/app/shared/store/reducers/grid-failures/grid-failure-details-form.reducer.ts b/projects/grid-failure-information-app/src/app/shared/store/reducers/grid-failures/grid-failure-details-form.reducer.ts
index 1aad4b2..fb78969 100644
--- a/projects/grid-failure-information-app/src/app/shared/store/reducers/grid-failures/grid-failure-details-form.reducer.ts
+++ b/projects/grid-failure-information-app/src/app/shared/store/reducers/grid-failures/grid-failure-details-form.reducer.ts
@@ -162,10 +162,22 @@
         return setDependentPropertyValueNull(propState, formState, [FORM_CONTROLS.__formBranch.id]);
       },
       longitude: (propState, formState): any => {
-        return setDependentPropertyValueNull(propState, formState, [FORM_CONTROLS.__formBranch.id]);
+        return setDependentPropertyValueNull(propState, formState, [
+          FORM_CONTROLS.__formBranch.id,
+          FORM_CONTROLS.city.id,
+          FORM_CONTROLS.district.id,
+          FORM_CONTROLS.postcode.id,
+          FORM_CONTROLS.street.id,
+        ]);
       },
       latitude: (propState, formState): any => {
-        return setDependentPropertyValueNull(propState, formState, [FORM_CONTROLS.__formBranch.id]);
+        return setDependentPropertyValueNull(propState, formState, [
+          FORM_CONTROLS.__formBranch.id,
+          FORM_CONTROLS.city.id,
+          FORM_CONTROLS.district.id,
+          FORM_CONTROLS.postcode.id,
+          FORM_CONTROLS.street.id,
+        ]);
       },
       expectedReasonId: (propState, formState): any => {
         return setDependentPropertyValueNull(propState, formState, [FORM_CONTROLS.__formBranch.id]);
diff --git a/projects/grid-failure-information-map-app/src/app/grid-failure/grid-failure.sandbox.ts b/projects/grid-failure-information-map-app/src/app/grid-failure/grid-failure.sandbox.ts
index 0dfac51..ec07a4c 100644
--- a/projects/grid-failure-information-map-app/src/app/grid-failure/grid-failure.sandbox.ts
+++ b/projects/grid-failure-information-map-app/src/app/grid-failure/grid-failure.sandbox.ts
@@ -44,7 +44,10 @@
 
   public filterGridFailureMapList(postcode: string = '') {
     postcode = postcode.trim();
-    this.gridFailureMapList = postcode.length > 0 ? this._gridFailureMapListAll.filter(y => y.postcode === postcode) : this._gridFailureMapListAllConfigured;
+    this.gridFailureMapList =
+      postcode.length > 0
+        ? this._gridFailureMapListAll.filter(y => y.postcode === postcode || y.freetextPostcode === postcode)
+        : this._gridFailureMapListAllConfigured;
   }
 
   public unsubscribe() {