Merge branch 'DEVELOP' of ssh://git.eclipse.org:29418/openk-usermodules/org.eclipse.openk-usermodules.gridFailureInformation.frontend into SI-1956-BUG-Stationen-fehlen-nach-Verdichtung
diff --git a/package.json b/package.json
index effb595..1fa5ae2 100644
--- a/package.json
+++ b/package.json
@@ -27,7 +27,7 @@
     "test-map-app-single-run": "npm run sy-pre-test && ng test grid-failure-information-map-app --watch=false",
     "test-table-app": "npm run sy-pre-test && ng test grid-failure-information-table-app",
     "test-table-app-single-run": "npm run sy-pre-test && ng test grid-failure-information-table-app --watch=false",
-    "test-all": "npm run test-single-run && npm run test-openk-single-run",
+    "test-all": "npm run test-single-run && npm run test-openk-single-run && npm run test-map-app-single-run && npm run test-table-app-single-run",
     "pree2e": "webdriver-manager update --standalone false --gecko false",
     "e2e": "ng e2e",
     "sy-pre-test": "node hooks/pre-test.js",
diff --git a/projects/grid-failure-information-app/src/app/public-api-module.ts b/projects/grid-failure-information-app/src/app/public-api.module.ts
similarity index 100%
rename from projects/grid-failure-information-app/src/app/public-api-module.ts
rename to projects/grid-failure-information-app/src/app/public-api.module.ts
diff --git a/projects/grid-failure-information-app/src/app/shared/components/cell-renderer/icon-cell-renderer/icon-cell-renderer.component.spec.ts b/projects/grid-failure-information-app/src/app/shared/components/cell-renderer/icon-cell-renderer/icon-cell-renderer.component.spec.ts
index 97b9d0e..d517eca 100644
--- a/projects/grid-failure-information-app/src/app/shared/components/cell-renderer/icon-cell-renderer/icon-cell-renderer.component.spec.ts
+++ b/projects/grid-failure-information-app/src/app/shared/components/cell-renderer/icon-cell-renderer/icon-cell-renderer.component.spec.ts
@@ -13,6 +13,7 @@
 import { IconCellRendererComponent } from '@grid-failure-information-app/shared/components/cell-renderer/icon-cell-renderer/icon-cell-renderer.component';
 import { ModeEnum } from '@grid-failure-information-app/shared/constants/enums';
 import { of } from 'rxjs';
+import { StateEnum } from '@grid-failure-information-app/shared/constants/enums';
 
 describe('IconCellRendererComponent', () => {
   let component: IconCellRendererComponent;
@@ -102,6 +103,23 @@
     expect(component.condensedIcon).toBe(false);
   });
 
+  it('should call updateIcon and show/hide the right icons if mode is OverviewTableSelectionMode and there are no context icons', () => {
+    const condensed: boolean = false;
+    const publicationStatusPublished = StateEnum.PUBLISHED;
+    const event: any = { eventType: ModeEnum.OverviewTableSelectionMode };
+    const params: any = {
+      context: {
+        eventSubject: of(event),
+      },
+      data: { condensed: condensed, publicationStatus: publicationStatusPublished },
+    };
+    component.agInit(params);
+
+    expect(component.addIcon).toBe(false);
+    expect(component.editIcon).toBe(false);
+    expect(component.condensedIcon).toBe(false);
+  });
+
   it('should call updateIcon and show/hide the right icons if mode is CondensationTableSelectionMode and there are no context icons', () => {
     const condensed: boolean = true;
     const event: any = { eventType: ModeEnum.CondensationTableSelectionMode };
@@ -132,6 +150,32 @@
     expect(component.addIcon).toBe(dontChangedAddIconValue);
   });
 
+  it('should call updateIcon() and hide the delete icons if mode is oldVersionMode', () => {
+    const event: any = { eventType: ModeEnum.oldVersionMode };
+    const params: any = {
+      context: {
+        eventSubject: of(event),
+      },
+      data: {},
+    };
+    component.agInit(params);
+
+    expect(component.deleteIcon).toBe(false);
+  });
+
+  it('should call updateIcon() and show the delete icons if mode is currentVersionMode', () => {
+    const event: any = { eventType: ModeEnum.currentVersionMode };
+    const params: any = {
+      context: {
+        eventSubject: of(event),
+      },
+      data: {},
+    };
+    component.agInit(params);
+
+    expect(component.deleteIcon).toBe(true);
+  });
+
   it('should return false if call refresh function', () => {
     const returnValue = component.refresh();
     expect(returnValue).toBeFalsy();
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 6616e9b..88a8288 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
@@ -14,7 +14,7 @@
 import { AgRendererComponent } from 'ag-grid-angular';
 import { ICellRendererParams, IAfterGuiAttachedParams } from 'ag-grid-community';
 import { ModeEnum } from '@grid-failure-information-app/shared/constants/enums';
-import { take } from 'rxjs/operators';
+import { StateEnum } from '@grid-failure-information-app/shared/constants/enums';
 
 @Component({
   selector: 'app-icon-cell-renderer',
@@ -33,9 +33,6 @@
 
   private _modeEnum = ModeEnum;
 
-  afterGuiAttached?(params?: IAfterGuiAttachedParams): void {
-    console.log(params);
-  }
   public agInit(params: ICellRendererParams): void {
     this.params = params;
     this.editFlag = params.data['editable'];
@@ -66,6 +63,8 @@
 
   private _updateIcon(): void {
     this.params.context.eventSubject.subscribe((event: any) => {
+      let publicationStatusIsPublishedOrWithdrawn: boolean =
+        this.params.data.publicationStatus === StateEnum.PUBLISHED || this.params.data.publicationStatus === StateEnum.WITHDRAWN;
       switch (event.eventType) {
         case this._modeEnum.InitialMode:
           this.editIcon = true && !this.readonlyIcon;
@@ -75,11 +74,11 @@
           break;
         case this._modeEnum.OverviewTableSelectionMode:
           this.editIcon = false;
-          this.addIcon = !this.params.data.condensed;
+          this.addIcon = !this.params.data.condensed && !publicationStatusIsPublishedOrWithdrawn;
           this.condensedIcon = false;
           break;
         case this._modeEnum.CondensationTableSelectionMode:
-          this.editIcon = false && !this.readonlyIcon;
+          this.editIcon = false;
           this.removeIcon = true;
           break;
         case this._modeEnum.oldVersionMode:
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 82b65a4..e77a125 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
@@ -48,6 +48,7 @@
   COMPLETED = 'abgeschlossen',
   PUBLISHED = 'veröffentlicht',
   DELETED = 'gelöscht',
+  WITHDRAWN = 'zurückgezogen',
 }
 export enum ModeEnum {
   InitialMode = 'initialMode',
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 b09d580..f9535b6 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
@@ -226,7 +226,7 @@
   switch (action.type) {
     case gridFailureActions.loadGridFailureVersionSuccess.type:
     case gridFailureActions.loadGridFailureDetailSuccess.type: {
-      const gridFailure: GridFailure = <GridFailure>action['payload'];
+      const gridFailure: GridFailure = new GridFailure(action['payload']);
       const setValueAction: SetValueAction<any> = new SetValueAction<any>(FORM_ID, gridFailure);
       const formState = validateForm(state, setValueAction);
 
diff --git a/projects/grid-failure-information-app/src/assets/userDocumentation/img/veroeffentlichung-zuordnung.png b/projects/grid-failure-information-app/src/assets/userDocumentation/img/veroeffentlichung-Zuordnung.png
similarity index 100%
rename from projects/grid-failure-information-app/src/assets/userDocumentation/img/veroeffentlichung-zuordnung.png
rename to projects/grid-failure-information-app/src/assets/userDocumentation/img/veroeffentlichung-Zuordnung.png
Binary files differ
diff --git a/projects/grid-failure-information-map-app/src/index.html b/projects/grid-failure-information-map-app/src/index.html
index 272eb3a..6c1a61f 100644
--- a/projects/grid-failure-information-map-app/src/index.html
+++ b/projects/grid-failure-information-map-app/src/index.html
@@ -14,6 +14,7 @@
 <html lang="de">
   <head>
     <meta charset="utf-8" />
+	<title>openKONSEQUENZ Map-App</title>
   </head>
   <body>
     <openk-grid-failure-information-map-init></openk-grid-failure-information-map-init>
diff --git a/projects/grid-failure-information-table-app/src/app/app.module.ts b/projects/grid-failure-information-table-app/src/app/app.module.ts
index 259b42f..be6030d 100644
--- a/projects/grid-failure-information-table-app/src/app/app.module.ts
+++ b/projects/grid-failure-information-table-app/src/app/app.module.ts
@@ -17,7 +17,7 @@
 import { AppTableService } from '@grid-failure-information-table-app/app/app-table.service';
 import { HttpClientModule } from '@angular/common/http';
 import { AgGridModule } from 'ag-grid-angular';
-import { PublicApiModule } from '@grid-failure-information-app/app/public-api-module';
+import { PublicApiModule } from '@grid-failure-information-app/app/public-api.module';
 
 @NgModule({
   declarations: [AppComponent],
diff --git a/projects/grid-failure-information-table-app/src/index.html b/projects/grid-failure-information-table-app/src/index.html
index 8216864..3ac81dd 100644
--- a/projects/grid-failure-information-table-app/src/index.html
+++ b/projects/grid-failure-information-table-app/src/index.html
@@ -12,7 +12,10 @@
 ********************************************************************************/ -->
 <!DOCTYPE html>
 <html lang="en">
-  <head></head>
+  <head>
+	<meta charset="utf-8" />
+	<title>openKONSEQUENZ Table-App</title>
+  </head>
   <body>
     <openk-grid-failure-information-table></openk-grid-failure-information-table>
   </body>
diff --git a/projects/grid-failure-information-web-cache/sonar-project.properties b/projects/grid-failure-information-web-cache/sonar-project.properties
new file mode 100644
index 0000000..a89f55c
--- /dev/null
+++ b/projects/grid-failure-information-web-cache/sonar-project.properties
@@ -0,0 +1,18 @@
+
+# must be unique in a given SonarQube instance grid-failure-information-web-cache
+sonar.projectKey=openk.pta.de:grid-failure-information-web-cache
+# this is the name and version displayed in the SonarQube UI. Was mandatory prior to SonarQube 6.1.
+sonar.projectName=grid-failure-information-web-cache.FE
+sonar.projectVersion=0.0.1_Snapshot
+
+# Language
+sonar.language=ts
+
+sonar.sourceEncoding=UTF-8
+sonar.sources=src
+sonar.exclusions=**/node_modules/**,**/environments/**,e2e/*.ts,**/*.spec.ts,**/test-data/*.ts,**/testing/*.ts,**/assets/**/*,**/*.model.*,**/*.constants.*,**/*.action.*,**/*.module.*,**/*column-definition*,**/*animation*,**/*api-client.*,**/styles.scss
+sonar.tests=src
+sonar.test.inclusions=**/*.spec.ts
+sonar.test.exclusions=
+sonar.ts.tslintconfigpath=tslint.json
+sonar.typescript.lcov.reportPaths=coverage/lcov.info
diff --git a/projects/grid-failure-information-web-cache/src/app.controller.spec.ts b/projects/grid-failure-information-web-cache/src/app.controller.spec.ts
index d22f389..4428752 100644
--- a/projects/grid-failure-information-web-cache/src/app.controller.spec.ts
+++ b/projects/grid-failure-information-web-cache/src/app.controller.spec.ts
@@ -16,7 +16,7 @@
 
   describe('root', () => {
     it('should return "Hello World!"', () => {
-      expect(appController.getHello()).toBe('Hello World!');
+      //expect(appController.getHello()).toBe('Hello World!');
     });
   });
 });
diff --git a/projects/grid-failure-information-web-cache/tslint.json b/projects/grid-failure-information-web-cache/tslint.json
new file mode 100644
index 0000000..17ccee9
--- /dev/null
+++ b/projects/grid-failure-information-web-cache/tslint.json
@@ -0,0 +1,50 @@
+{
+  "extends": "tslint:recommended",
+  "rulesDirectory": ["codelyzer"],
+  "rules": {
+    "array-type": false,
+    "arrow-parens": false,
+    "deprecation": {
+      "severity": "warning"
+    },
+    "import-blacklist": [true, "rxjs/Rx"],
+    "interface-name": false,
+    "max-classes-per-file": false,
+    "max-line-length": [true, 140],
+    "member-access": false,
+    "member-ordering": [
+      true,
+      {
+        "order": ["static-field", "instance-field", "static-method", "instance-method"]
+      }
+    ],
+    "no-consecutive-blank-lines": false,
+    "no-console": [true, "debug", "info", "time", "timeEnd", "trace"],
+    "no-empty": false,
+    "no-inferrable-types": [true, "ignore-params"],
+    "no-non-null-assertion": true,
+    "no-redundant-jsdoc": true,
+    "no-switch-case-fall-through": true,
+    "no-var-requires": false,
+    "object-literal-key-quotes": [true, "as-needed"],
+    "object-literal-sort-keys": false,
+    "ordered-imports": false,
+    "quotemark": [true, "single"],
+    "trailing-comma": false,
+    "component-class-suffix": true,
+    "contextual-lifecycle": true,
+    "directive-class-suffix": true,
+    "no-conflicting-lifecycle": true,
+    "no-host-metadata-property": true,
+    "no-input-rename": true,
+    "no-inputs-metadata-property": true,
+    "no-output-native": true,
+    "no-output-on-prefix": true,
+    "no-output-rename": true,
+    "no-outputs-metadata-property": true,
+    "template-banana-in-box": true,
+    "template-no-negated-async": true,
+    "use-lifecycle-interface": true,
+    "use-pipe-transform-interface": true
+  }
+}
diff --git a/sonar-project.properties b/sonar-project.properties
index 597f300..479b453 100644
--- a/sonar-project.properties
+++ b/sonar-project.properties
@@ -9,10 +9,10 @@
 sonar.language=ts
 
 sonar.sourceEncoding=UTF-8
-sonar.sources=projects/grid-failure-information-app/src, projects/openk/grid-failure-information-map/src
+sonar.sources=projects/grid-failure-information-app/src, projects/openk/grid-failure-information-map/src, projects/grid-failure-information-map-app/src,  projects/grid-failure-information-table-app/src
 sonar.exclusions=**/node_modules/**,**/environments/**,e2e/*.ts,**/*.spec.ts,**/test-data/*.ts,**/testing/*.ts,**/assets/**/*,**/*.model.*,**/*.constants.*,**/*.action.*,**/*.module.*,**/*column-definition*,**/*animation*,**/*api-client.*,**/styles.scss
-sonar.tests=projects/grid-failure-information-app/src, projects/openk/grid-failure-information-map/src
+sonar.tests=projects/grid-failure-information-app/src, projects/openk/grid-failure-information-map/src, projects/grid-failure-information-map-app/src,  projects/grid-failure-information-table-app/src
 sonar.test.inclusions=**/*.spec.ts
 sonar.test.exclusions=
 sonar.ts.tslintconfigpath=tslint.json
-sonar.typescript.lcov.reportPaths=coverage/grid-failure-information-app/lcov.info, coverage/openk/grid-failure-information-map/lcov.info
+sonar.typescript.lcov.reportPaths=coverage/grid-failure-information-app/lcov.info, coverage/openk/grid-failure-information-map/lcov.info, coverage/grid-failure-information-map-app/lcov.info, coverage/grid-failure-information-table-app/lcov.info