GNM-1226 Merge to master
diff --git a/angular.json b/angular.json
index fe0a7e2..b834345 100644
--- a/angular.json
+++ b/angular.json
@@ -18,7 +18,8 @@
"polyfills": "src/polyfills.ts",
"assets": [
"src/assets",
- "src/favicon.ico"
+ "src/favicon.ico",
+ "src/userDocumentation.html"
],
"styles": [
"src/app/custom_modules/calendar/angular-calendar-openk.css",
@@ -44,12 +45,10 @@
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
- "fileReplacements": [
- {
- "replace": "src/environments/environment.ts",
- "with": "src/environments/environment.prod.ts"
- }
- ]
+ "fileReplacements": [{
+ "replace": "src/environments/environment.ts",
+ "with": "src/environments/environment.prod.ts"
+ }]
}
}
},
@@ -145,4 +144,4 @@
"prefix": "app"
}
}
-}
\ No newline at end of file
+}
diff --git a/package.json b/package.json
index ee5521f..13c6c03 100644
--- a/package.json
+++ b/package.json
@@ -38,7 +38,7 @@
"font-awesome": "4.7.0",
"jquery": "3.3.1",
"ng2-daterangepicker": "2.0.12",
- "ng2-tree": "^2.0.0-rc.11",
+ "ng2-tree": "2.0.0-rc.11",
"popper.js": "1.14.3",
"primeicons": "1.0.0-beta.10",
"primeng": "6.1.3",
@@ -74,4 +74,4 @@
"tslint": "5.9.1",
"typescript": "2.5.3"
}
-}
\ No newline at end of file
+}
diff --git a/src/app/app.component.css b/src/app/app.component.css
index 6b92ab3..1f98cef 100644
--- a/src/app/app.component.css
+++ b/src/app/app.component.css
@@ -1,15 +1,19 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
.app-content {
padding-top: 33px;
}
@@ -18,4 +22,4 @@
.app-content {
padding-top: 100px;
}
-}
\ No newline at end of file
+}
diff --git a/src/app/app.component.html b/src/app/app.component.html
index bd74741..ed41fd0 100644
--- a/src/app/app.component.html
+++ b/src/app/app.component.html
@@ -1,16 +1,20 @@
<!--
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
-->
+
<app-main-navigation [hidden]="router.url == '/logout' ||router.url == '/loggedout' "></app-main-navigation>
<app-toaster></app-toaster>
<div class="app-content">
<router-outlet></router-outlet>
-</div>
\ No newline at end of file
+</div>
diff --git a/src/app/app.component.spec.ts b/src/app/app.component.spec.ts
index b0928ff..6e2dc2d 100644
--- a/src/app/app.component.spec.ts
+++ b/src/app/app.component.spec.ts
@@ -1,26 +1,30 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { TestBed, async } from '@angular/core/testing';
import { ActivatedRoute, Router } from '@angular/router';
import { AppComponent } from './app.component';
import { SessionContext } from './common/session-context';
import { HttpResponseInterceptorService } from './services/http-response-interceptor.service';
import { BaseDataLoaderService } from './services/jobs/base-data-loader.service';
-import { MessageServiceCustom } from './services/message.service';
import { ReminderCallerJobService } from './services/jobs/reminder-caller-job.service';
import { AbstractMockObservableService } from './testing/abstract-mock-observable.service';
import { MockComponent } from './testing/mock.component';
import { HttpClient } from '@angular/common/http';
import { ToasterMessageService } from './services/toaster-message.service';
+import { MessageService } from 'primeng/api';
class FakeRouter {
navigate(commands: any[]) {
@@ -43,11 +47,13 @@
const mockService = new MockHttp();
let sessionContext: SessionContext;
let routerStub: FakeRouter;
-
-
+ let messageService;
+ let toasterMessageService;
beforeEach(() => {
+ messageService = new MessageService();
sessionContext = new SessionContext();
+ toasterMessageService = new ToasterMessageService(sessionContext, messageService);
routerStub = {
navigate: jasmine.createSpy('navigate').and.callThrough()
};
@@ -66,8 +72,7 @@
{ provide: ActivatedRoute },
{ provide: HttpResponseInterceptorService },
{ provide: SessionContext, useValue: sessionContext },
- { provide: MessageServiceCustom },
- { provide: ToasterMessageService },
+ { provide: ToasterMessageService, useValue: toasterMessageService },
{ provide: ReminderCallerJobService }
],
});
diff --git a/src/app/app.component.ts b/src/app/app.component.ts
index 5621017..4bcf96d 100644
--- a/src/app/app.component.ts
+++ b/src/app/app.component.ts
@@ -1,21 +1,24 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { Component, OnInit } from '@angular/core';
import { Router, ActivatedRoute, Params } from '@angular/router';
import { BaseDataLoaderService } from './services/jobs/base-data-loader.service';
import { HttpResponseInterceptorService } from './services/http-response-interceptor.service';
import { SessionContext } from './common/session-context';
-import { MessageServiceCustom, MessageDefines } from './services/message.service';
-import { BannerMessageStatusEn } from './common/enums';
+import { ToasterMessageService, MessageDefines } from './services/toaster-message.service';
import { User } from './model/user';
import { JwtHelperService } from '@auth0/angular-jwt';
import { HttpClient } from '@angular/common/http';
@@ -29,7 +32,6 @@
})
export class AppComponent implements OnInit {
title = 'app';
- private bannerMessageStatus = BannerMessageStatusEn;
constructor(private http: HttpClient, public router: Router,
public baseDataLoader: BaseDataLoaderService,
@@ -37,7 +39,7 @@
private activatedRoute: ActivatedRoute,
public httpInterceptor: HttpResponseInterceptorService,
private sessionContext: SessionContext,
- private messageService: MessageServiceCustom) {
+ private messageService: ToasterMessageService) {
this.http.get('assets/settings.json')
.subscribe(res => this.sessionContext.settings = res);
diff --git a/src/app/app.module.ts b/src/app/app.module.ts
index 070ee77..032b803 100644
--- a/src/app/app.module.ts
+++ b/src/app/app.module.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { BrowserModule } from '@angular/platform-browser';
import { CalendarModule } from 'angular-calendar';
import { Daterangepicker } from 'ng2-daterangepicker';
@@ -16,7 +20,6 @@
import { ButtonsContainerComponent } from './common-components/buttons-container/buttons-container.component';
import { LoadingSpinnerComponent } from './common-components/loading-spinner/loading-spinner.component';
import { MainNavigationComponent } from './common-components/main-navigation/main-navigation.component';
-import { MessageBannerComponent } from './common-components/message-banner/message-banner.component';
import { FormattedDatePipe } from './common-components/pipes/formatted-date.pipe';
import { FormattedTimestampPipe } from './common-components/pipes/formatted-timestamp.pipe';
import { StringToDatePipe } from './common-components/pipes/string-to-date.pipe';
@@ -47,7 +50,6 @@
import { BaseDataLoaderService } from './services/jobs/base-data-loader.service';
import { LockHelperService } from './services/lock-helper.service';
import { LockService } from './services/lock.service';
-import { MessageServiceCustom } from './services/message.service';
import { ReminderCallerJobService } from './services/jobs/reminder-caller-job.service';
import { ReminderService } from './services/reminder.service';
import { UserSettingsService } from './services/user-settings.service';
@@ -88,7 +90,6 @@
MainNavigationComponent,
VersionInfoComponent,
LoadingSpinnerComponent,
- MessageBannerComponent,
GridMeasuresComponent,
StatusChangesComponent,
StepsComponent,
@@ -137,7 +138,6 @@
multi: true
},
{ provide: LOCALE_ID, useValue: 'de' },
- MessageServiceCustom,
MessageService,
ToasterMessageService,
RoleAccessService,
diff --git a/src/app/common-components/buttons-container/buttons-container.component.css b/src/app/common-components/buttons-container/buttons-container.component.css
index a08ae7b..303e58f 100644
--- a/src/app/common-components/buttons-container/buttons-container.component.css
+++ b/src/app/common-components/buttons-container/buttons-container.component.css
@@ -1,13 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-******************************************************************************
- */
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
.button-container {
position: fixed;
@@ -27,4 +32,4 @@
#statuschange {
margin-left: 60px;
-}
\ No newline at end of file
+}
diff --git a/src/app/common-components/buttons-container/buttons-container.component.html b/src/app/common-components/buttons-container/buttons-container.component.html
index 862f5aa..f46de7c 100644
--- a/src/app/common-components/buttons-container/buttons-container.component.html
+++ b/src/app/common-components/buttons-container/buttons-container.component.html
@@ -1,13 +1,18 @@
<!--
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
-->
+
<div class="button-container col-md-12">
<button id="quit" (click)="onClickEvents('quit')" type="button" class="btn btn-primary pull-left">{{Globals.STATUS_BUTTON_LABEL['quit']}}</button>
@@ -24,4 +29,4 @@
<button id="duplicate" *ngIf="!hideDuplicateButtonForRole" (click)="onClickEvents('duplicate')" type="button" class="btn btn-primary pull-right btn-margin-right">{{Globals.STATUS_BUTTON_LABEL['duplicate']}}</button>
-</div>
\ No newline at end of file
+</div>
diff --git a/src/app/common-components/buttons-container/buttons-container.component.spec.ts b/src/app/common-components/buttons-container/buttons-container.component.spec.ts
index 1b0aa87..a732713 100644
--- a/src/app/common-components/buttons-container/buttons-container.component.spec.ts
+++ b/src/app/common-components/buttons-container/buttons-container.component.spec.ts
@@ -1,13 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-******************************************************************************
- */
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
import { async, ComponentFixture, TestBed, fakeAsync } from '@angular/core/testing';
import { SimpleChange } from '@angular/core';
import { SessionContext } from '../../common/session-context';
diff --git a/src/app/common-components/buttons-container/buttons-container.component.ts b/src/app/common-components/buttons-container/buttons-container.component.ts
index c256d04..8815bff 100644
--- a/src/app/common-components/buttons-container/buttons-container.component.ts
+++ b/src/app/common-components/buttons-container/buttons-container.component.ts
@@ -1,13 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-******************************************************************************
- */
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
import { SessionContext } from './../../common/session-context';
import { Controls } from './../../model/role-access';
import { Component, Input, EventEmitter, Output, SimpleChanges, OnChanges } from '@angular/core';
diff --git a/src/app/common-components/loading-spinner/loading-spinner.component.css b/src/app/common-components/loading-spinner/loading-spinner.component.css
index 0a7f644..26a9a72 100644
--- a/src/app/common-components/loading-spinner/loading-spinner.component.css
+++ b/src/app/common-components/loading-spinner/loading-spinner.component.css
@@ -1,14 +1,18 @@
-/**
-******************************************************************************
-* Copyright © 2017-2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
.spinner {
margin: 10px auto;
width: 50px;
@@ -60,4 +64,4 @@
@keyframes sk-stretchdelay {
0%, 40%, 100% { transform: scaleY(0.4); -webkit-transform: scaleY(0.4);}
20% { transform: scaleY(1.0); -webkit-transform: scaleY(1.0);}
- }
\ No newline at end of file
+ }
diff --git a/src/app/common-components/loading-spinner/loading-spinner.component.html b/src/app/common-components/loading-spinner/loading-spinner.component.html
index da9aa27..dbd216c 100644
--- a/src/app/common-components/loading-spinner/loading-spinner.component.html
+++ b/src/app/common-components/loading-spinner/loading-spinner.component.html
@@ -1,13 +1,16 @@
<!--
-******************************************************************************
-* Copyright © 2017-2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
-->
<div class="spinner">
@@ -16,4 +19,4 @@
<div class="rect3"></div>
<div class="rect4"></div>
<div class="rect5"></div>
- </div>
\ No newline at end of file
+ </div>
diff --git a/src/app/common-components/loading-spinner/loading-spinner.component.spec.ts b/src/app/common-components/loading-spinner/loading-spinner.component.spec.ts
index c80a5c4..43339a8 100644
--- a/src/app/common-components/loading-spinner/loading-spinner.component.spec.ts
+++ b/src/app/common-components/loading-spinner/loading-spinner.component.spec.ts
@@ -1,11 +1,15 @@
-/**
-******************************************************************************
-* Copyright � 2017-2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
diff --git a/src/app/common-components/loading-spinner/loading-spinner.component.ts b/src/app/common-components/loading-spinner/loading-spinner.component.ts
index 535b62f..dafa4b8 100644
--- a/src/app/common-components/loading-spinner/loading-spinner.component.ts
+++ b/src/app/common-components/loading-spinner/loading-spinner.component.ts
@@ -1,14 +1,18 @@
-/**
-******************************************************************************
-* Copyright © 2017-2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { Component, OnInit, Input } from '@angular/core';
@Component({
diff --git a/src/app/common-components/main-navigation/main-navigation.component.css b/src/app/common-components/main-navigation/main-navigation.component.css
index 7f3837a..cf0cfa1 100644
--- a/src/app/common-components/main-navigation/main-navigation.component.css
+++ b/src/app/common-components/main-navigation/main-navigation.component.css
@@ -1,15 +1,20 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
-.navbar-nav{
+
+
+.navbar-nav {
display: inline-flex;
}
@@ -21,7 +26,7 @@
float: right;
vertical-align: middle;
padding-top: 13px;
- padding-right: 20px;
+ padding-right: 20px;
}
.divider-right {
@@ -52,12 +57,12 @@
cursor: default;
}
-.dropdown-open:hover {
- background-color: transparent;
+.dropdown-open:hover {
+ background-color: transparent;
}
-.navbar-default .navbar-nav > .open > a,
-.navbar-default .navbar-nav > .open > a:focus {
+.navbar-default .navbar-nav>.open>a,
+.navbar-default .navbar-nav>.open>a:focus {
filter: brightness(95%);
}
@@ -82,5 +87,4 @@
.version-info-simple {
position: inherit;
-
}
diff --git a/src/app/common-components/main-navigation/main-navigation.component.html b/src/app/common-components/main-navigation/main-navigation.component.html
index b416bb6..a0689e1 100644
--- a/src/app/common-components/main-navigation/main-navigation.component.html
+++ b/src/app/common-components/main-navigation/main-navigation.component.html
@@ -1,15 +1,19 @@
<!--
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
-->
+
<nav class="navbar navbar-default navbar-fixed-top masthead overview-navbar" role="banner">
<div class="container-fluid">
<div class="navbar-header">
@@ -22,18 +26,28 @@
<div *ngIf="router.url === '/overview' || router.url === '/reminders'" style="border-right: solid 1px #c3c3c3; margin: 10px 0 10px 0">
</div>
- <div>
- <button style="float: right" type="button" class="btn btn-link navbar-btn" (click)="goToOverview()">
- <span class="glyphicon glyphicon-home active-navitem-hover" [ngClass]="{'active-navitem': router.url === '/overview'}"></span>
- </button>
- <span style="float: right; cursor: default" type="text" class="btn btn-link navbar-btn">
- <span class="glyphicon glyphicon-bell" id="bell" [title]="sessionContext.getUpcomingReminder()? 'Es gibt mindestens einen fälligen Maßnahmeantrag' : ''"
- [style.color]="sessionContext.setBellColor()">
- </span>
+
+ <div class="btn btn-link navbar-btn">
+ <span class="glyphicon glyphicon-bell" id="bell" [title]="sessionContext.getUpcomingReminder()? 'Es gibt mindestens einen fälligen Maßnahmeantrag' : ''"
+ [style.color]="sessionContext.setBellColor()">
</span>
</div>
+
+ <div>
+ <button type="button" class="btn btn-link navbar-btn" (click)="goToOverview()">
+ <span class="glyphicon glyphicon-home active-navitem-hover" [ngClass]="{'active-navitem': router.url === '/overview'}"></span>
+ </button>
+ </div>
+
+ <div class="btn btn-link navbar-btn">
+ <a href="./assets/userDocumentation.html" title="Hilfe" target="_blank">
+ <img src="./assets/img/question mark_openK_color_is_infoColor_RegularSvg.svg" alt="question mark" height="16px">
+ </a>
+ </div>
+
<div class="dropdown-open nav-user nav-overview-user" style="padding-top: 10px">
- <a class="btn btn-logout dropdown-toggle" style="min-width: 160px;" type="button" data-toggle="dropdown" href="#" aria-expanded="true">
+ <a class="btn btn-logout dropdown-toggle" style="min-width: 160px;" type="button" data-toggle="dropdown" href="#"
+ aria-expanded="true">
{{sessionContext.getAccessTokenDecoded()?.name}}
<span class="caret"></span>
</a>
@@ -46,4 +60,4 @@
</div>
</div>
<app-version-info class="version-info-simple"></app-version-info>
-</nav>
\ No newline at end of file
+</nav>
diff --git a/src/app/common-components/main-navigation/main-navigation.component.spec.ts b/src/app/common-components/main-navigation/main-navigation.component.spec.ts
index 957f86a..c47655a 100644
--- a/src/app/common-components/main-navigation/main-navigation.component.spec.ts
+++ b/src/app/common-components/main-navigation/main-navigation.component.spec.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { NgModule } from '@angular/core';
import { MockComponent } from '../../testing/mock.component';
@@ -84,5 +88,4 @@
expect(routerStub.navigate).toHaveBeenCalledWith(['/logout']);
});
-
});
diff --git a/src/app/common-components/main-navigation/main-navigation.component.ts b/src/app/common-components/main-navigation/main-navigation.component.ts
index 9709a6a..53f2265 100644
--- a/src/app/common-components/main-navigation/main-navigation.component.ts
+++ b/src/app/common-components/main-navigation/main-navigation.component.ts
@@ -1,14 +1,18 @@
-/**
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { Component, OnInit } from '@angular/core';
import { SessionContext } from '../../common/session-context';
import { Router } from '@angular/router';
diff --git a/src/app/common-components/pipes/formatted-date.pipe.spec.ts b/src/app/common-components/pipes/formatted-date.pipe.spec.ts
index 911a007..a754370 100644
--- a/src/app/common-components/pipes/formatted-date.pipe.spec.ts
+++ b/src/app/common-components/pipes/formatted-date.pipe.spec.ts
@@ -1,15 +1,19 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { TestBed } from '@angular/core/testing';
import { FormattedDatePipe } from './formatted-date.pipe';
diff --git a/src/app/common-components/pipes/formatted-date.pipe.ts b/src/app/common-components/pipes/formatted-date.pipe.ts
index 4c4cc22..2585f14 100644
--- a/src/app/common-components/pipes/formatted-date.pipe.ts
+++ b/src/app/common-components/pipes/formatted-date.pipe.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import {Pipe, PipeTransform} from '@angular/core';
import * as moment from 'moment';
/**
diff --git a/src/app/common-components/pipes/formatted-timestamp.pipe.spec.ts b/src/app/common-components/pipes/formatted-timestamp.pipe.spec.ts
index 4e28e72..844afb1 100644
--- a/src/app/common-components/pipes/formatted-timestamp.pipe.spec.ts
+++ b/src/app/common-components/pipes/formatted-timestamp.pipe.spec.ts
@@ -1,15 +1,19 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { FormattedTimestampPipe } from './formatted-timestamp.pipe';
describe('Test FormattedTimestampPipe ', () => {
diff --git a/src/app/common-components/pipes/formatted-timestamp.pipe.ts b/src/app/common-components/pipes/formatted-timestamp.pipe.ts
index 140bde5..7044ee9 100644
--- a/src/app/common-components/pipes/formatted-timestamp.pipe.ts
+++ b/src/app/common-components/pipes/formatted-timestamp.pipe.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { Pipe, PipeTransform } from '@angular/core';
import * as moment from 'moment';
diff --git a/src/app/common-components/pipes/string-to-date.pipe.spec.ts b/src/app/common-components/pipes/string-to-date.pipe.spec.ts
index 4e61b9b..39c2cfe 100644
--- a/src/app/common-components/pipes/string-to-date.pipe.spec.ts
+++ b/src/app/common-components/pipes/string-to-date.pipe.spec.ts
@@ -1,15 +1,19 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { TestBed } from '@angular/core/testing';
import { StringToDatePipe } from './string-to-date.pipe';
diff --git a/src/app/common-components/pipes/string-to-date.pipe.ts b/src/app/common-components/pipes/string-to-date.pipe.ts
index d138011..7730af3 100644
--- a/src/app/common-components/pipes/string-to-date.pipe.ts
+++ b/src/app/common-components/pipes/string-to-date.pipe.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { Pipe, PipeTransform } from '@angular/core';
import * as moment from 'moment';
/**
diff --git a/src/app/common-components/pipes/unique.pipe.spec.ts b/src/app/common-components/pipes/unique.pipe.spec.ts
index 371c1e5..769a5e5 100644
--- a/src/app/common-components/pipes/unique.pipe.spec.ts
+++ b/src/app/common-components/pipes/unique.pipe.spec.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { UniquePipe } from './unique.pipe';
describe('Pipe: Uniquee', () => {
diff --git a/src/app/common-components/pipes/unique.pipe.ts b/src/app/common-components/pipes/unique.pipe.ts
index e8c134b..ee9fb01 100644
--- a/src/app/common-components/pipes/unique.pipe.ts
+++ b/src/app/common-components/pipes/unique.pipe.ts
@@ -1,15 +1,19 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
diff --git a/src/app/common-components/toaster/toaster.component.css b/src/app/common-components/toaster/toaster.component.css
index 7bf7f3a..c032a76 100644
--- a/src/app/common-components/toaster/toaster.component.css
+++ b/src/app/common-components/toaster/toaster.component.css
@@ -1,15 +1,19 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
#deleteSGMYesDiv {
padding-left: 15%;
}
@@ -29,4 +33,4 @@
#unlockButton {
width: 180px;
-}
\ No newline at end of file
+}
diff --git a/src/app/common-components/toaster/toaster.component.html b/src/app/common-components/toaster/toaster.component.html
index b37ee9a..ed4a185 100644
--- a/src/app/common-components/toaster/toaster.component.html
+++ b/src/app/common-components/toaster/toaster.component.html
@@ -1,22 +1,26 @@
<!--
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
-->
-<p-toast [style]="{marginTop: '80px'}"></p-toast>
-<p-toast [style]="{marginTop: '80px'}" position="top-left" key="tl"></p-toast>
+<p-toast [style]="{marginTop: '90px'}"></p-toast>
-<p-toast [style]="{marginTop: '80px'}" position="top-center" key="tc"></p-toast>
+<p-toast [style]="{marginTop: '90px'}" position="top-left" key="tl"></p-toast>
-<p-toast [style]="{marginTop: '80px'}" styleClass="custom-toast" key="custom" position="bottom-center"></p-toast>
+<p-toast [style]="{marginTop: '90px'}" position="top-center" key="tc"></p-toast>
+
+<p-toast [style]="{marginTop: '90px'}" styleClass="custom-toast" key="custom" position="bottom-center"></p-toast>
<p-toast position="center" key="deletec" (onClose)="onSingleGMReject()" [modal]="true" [baseZIndex]="5000">
<ng-template let-message pTemplate="message">
@@ -49,4 +53,4 @@
</div>
</div>
</ng-template>
-</p-toast>
\ No newline at end of file
+</p-toast>
diff --git a/src/app/common-components/toaster/toaster.component.spec.ts b/src/app/common-components/toaster/toaster.component.spec.ts
index d156061..713c05c 100644
--- a/src/app/common-components/toaster/toaster.component.spec.ts
+++ b/src/app/common-components/toaster/toaster.component.spec.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ToasterComponent } from './toaster.component';
import { MessageService } from 'primeng/api';
diff --git a/src/app/common-components/toaster/toaster.component.ts b/src/app/common-components/toaster/toaster.component.ts
index f706627..7b54f73 100644
--- a/src/app/common-components/toaster/toaster.component.ts
+++ b/src/app/common-components/toaster/toaster.component.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { Component, NgModule } from '@angular/core';
import { ToasterButtonEventEn } from '../../common/enums';
import { ToasterMessageService } from '../../services/toaster-message.service';
diff --git a/src/app/common-components/version-info/version-info.component.css b/src/app/common-components/version-info/version-info.component.css
index 4d83e67..ac6608d 100644
--- a/src/app/common-components/version-info/version-info.component.css
+++ b/src/app/common-components/version-info/version-info.component.css
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
.version-info {
position: fixed;
bottom: 0;
diff --git a/src/app/common-components/version-info/version-info.component.html b/src/app/common-components/version-info/version-info.component.html
index e3ea9ab..848f780 100644
--- a/src/app/common-components/version-info/version-info.component.html
+++ b/src/app/common-components/version-info/version-info.component.html
@@ -1,15 +1,19 @@
<!--
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
-->
+
<div class="version-info">
Version: {{currVersion.frontendVersion}} / {{currVersion.backendVersion}} / {{currVersion.dbVersion}}
</div>
diff --git a/src/app/common-components/version-info/version-info.component.spec.ts b/src/app/common-components/version-info/version-info.component.spec.ts
index cdf35cc..fbc0f8a 100644
--- a/src/app/common-components/version-info/version-info.component.spec.ts
+++ b/src/app/common-components/version-info/version-info.component.spec.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { DebugElement } from '@angular/core';
diff --git a/src/app/common-components/version-info/version-info.component.ts b/src/app/common-components/version-info/version-info.component.ts
index 2f1464f..2d9c651 100644
--- a/src/app/common-components/version-info/version-info.component.ts
+++ b/src/app/common-components/version-info/version-info.component.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { Component, OnInit } from '@angular/core';
import { VersionInfo } from '../../model/version-info';
import { VersionInfoService } from '../../services/version-info.service';
diff --git a/src/app/common/banner-message.ts b/src/app/common/banner-message.ts
index 8cf8d8b..807ec49 100644
--- a/src/app/common/banner-message.ts
+++ b/src/app/common/banner-message.ts
@@ -1,26 +1,21 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
-import { Component, Optional, OnInit } from '@angular/core';
-import { ErrorType, MessageScopeEn } from '../common/enums';
-export class BannerMessage {
+
+import { ErrorType } from '../common/enums';
+export class ToasterMessage {
status: number;
text: string;
- isActive = false;
- showButton = false;
- showDecisionButtons = false;
- isSetTimeout = true;
errorType: ErrorType;
- scope?: MessageScopeEn;
- public hide() {
- this.isActive = false;
- }
}
diff --git a/src/app/common/enums.ts b/src/app/common/enums.ts
index 6fe9bee..c2713be 100644
--- a/src/app/common/enums.ts
+++ b/src/app/common/enums.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
export enum StatusEn {
open = 1,
inWork = 2,
@@ -27,12 +31,6 @@
datedependency = 8,
stornoLocked = 9
}
-export enum BannerMessageStatusEn {
- warning = 1,
- success = 2,
- error = 3,
- info = 4
-}
export enum ToasterButtonEventEn {
@@ -40,8 +38,3 @@
deleteSingleGridMeasure = 2
}
-export enum MessageScopeEn {
- local = 0,
- global = 1
-}
-
diff --git a/src/app/common/globals.ts b/src/app/common/globals.ts
index d781c0f..9035e71 100644
--- a/src/app/common/globals.ts
+++ b/src/app/common/globals.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
export class Globals {
static ROLE_ACCESS = 'ROLE_ACCESS';
static FRONTEND_VERSION = '0.0.1_SNAPSHOT';
@@ -51,7 +55,7 @@
static NO_FORCE_UNLOCK = 'NO_FORCE';
static APPOINTMENT_NUMBER_OF_MAX_VALUE = 999;
static MAX_NUMBER_OF_TABS = 10;
-
+ static GRID_ROW_HEIGHT = 32;
static AUTH_AND_AUTH_SERVICE_NAME = 'authNauth.openK';
static OAUTH2CONF_SUPERUSER_ROLE = 'planned-policies-superuser';
@@ -62,6 +66,9 @@
static TIME_TO_HIDE_MESSAGE_BANNER = 20 * 1000;
static MEGABYT_UNIT = 1000 * 1000;
static MAX_UPLOADFILE_SIZE = 20;
+
+ static CALENDAR_COLOR_TRANSPARENCY_VALUE = '0.4';
+
static BRANCHES = class Branches {
static power = '1';
static gas = '2';
diff --git a/src/app/common/list-helper-tool.spec.ts b/src/app/common/list-helper-tool.spec.ts
index 04b2c77..0af5647 100644
--- a/src/app/common/list-helper-tool.spec.ts
+++ b/src/app/common/list-helper-tool.spec.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { TestBed, async, inject } from '@angular/core/testing';
import { ListHelperTool } from './list-helper-tool';
diff --git a/src/app/common/list-helper-tool.ts b/src/app/common/list-helper-tool.ts
index 3484a6c..255daee 100644
--- a/src/app/common/list-helper-tool.ts
+++ b/src/app/common/list-helper-tool.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
export class ListHelperTool {
public checkIfToday( compareDateString: string ): boolean {
diff --git a/src/app/common/session-context.spec.ts b/src/app/common/session-context.spec.ts
index 594c309..695f714 100644
--- a/src/app/common/session-context.spec.ts
+++ b/src/app/common/session-context.spec.ts
@@ -1,27 +1,33 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
-import { TestBed, async, inject } from '@angular/core/testing';
+
+import { TestBed, async, inject, fakeAsync, tick } from '@angular/core/testing';
import { SessionContext } from './session-context';
import { User } from '../model/user';
import { USERS } from '../test-data/users';
import { UserMap } from './user-map';
import { Branch } from '../model/branch';
-import { UserDepartment } from '../model/user-department';
import { CostCenter } from '../model/cost-center';
import { GRIDMEASURE } from '../test-data/grid-measures';
import { GridMeasure } from '../model/grid-measure';
import { StatusMainFilter } from '../model/status-main-filter';
import { UserSettings, SettingType, SettingValue } from '../model/user-settings';
import { Territory } from '../model/territory';
+import { Component } from 'ag-grid';
+import { componentFactoryName } from '@angular/compiler';
+import { Globals } from './globals';
describe('SessionContext', () => {
@@ -73,17 +79,9 @@
expect(um.findUser('otto').username).toBe('otto');
}));
- it('should get and set the collapse state correctly', inject([SessionContext], (sessionContext: SessionContext) => {
- sessionContext.setCollapseState(true, 'Bruno');
- expect(sessionContext.getCollapseState('Bruno')).toBeTruthy();
-
- sessionContext.setCollapseState(false, 'Balduin');
- expect(sessionContext.getCollapseState('Balduin')).toBeFalsy();
-
- }));
-
it('should return the correct statusById', inject([SessionContext], (sessionContext: SessionContext) => {
- sessionContext.setStatuses([{ id: 1, name: 'offen' }, { id: 2, name: 'in Bearbeitung' }, { id: 3, name: 'beendet' }]);
+ sessionContext.setStatuses([{ id: 1, name: 'offen', colorCode: '#990000' }, { id: 2, name: 'in Bearbeitung', colorCode: '#990000' },
+ { id: 3, name: 'beendet', colorCode: '#990000' }]);
expect(sessionContext.getStatusById(666)).toBeNull();
expect(sessionContext.getStatusById(3).id).toBe(3);
@@ -188,15 +186,6 @@
expect(sessionContext.getFilterExpansionState()).toBeFalsy();
}));
-
- it('should get and set AllUserDepartments', inject([SessionContext], (sessionContext: SessionContext) => {
- const depts: UserDepartment[] = [{ id: 666, name: 'Claudio' }];
- sessionContext.setAllUserDepartments(depts);
-
- expect(sessionContext.getAllUserDepartments()[0].id).toBe(666);
- }));
-
-
it('should get and set CostCenters correctly', inject([SessionContext], (sessionContext: SessionContext) => {
const cc: CostCenter[] = [{ id: 666, name: 'Claudio' }, { id: 4711, name: 'Bertil' }];
sessionContext.setCostCenters(null);
@@ -281,4 +270,43 @@
expect(sessionContext.isInCancelPage()).toBeFalsy();
}));
+ it('should set bell color', inject([SessionContext], (sessionContext: SessionContext) => {
+ spyOn(sessionContext, 'setBellColor').and.callThrough();
+ // error case - red color
+ sessionContext.setOverdueReminder(true);
+ sessionContext.setUpcomingReminder(false);
+ const errorcolor: string = sessionContext.setBellColor();
+ expect(errorcolor).toBe('red');
+
+ // warning case - orange color
+ sessionContext.setOverdueReminder(false);
+ sessionContext.setUpcomingReminder(true);
+ const warningcolor: string = sessionContext.setBellColor();
+ expect(warningcolor).toBe('#f79e60');
+
+ // nothing case - grey color
+ sessionContext.setOverdueReminder(false);
+ sessionContext.setUpcomingReminder(false);
+ const nothingcolor: string = sessionContext.setBellColor();
+ expect(nothingcolor).toBe('grey');
+ }));
+
+ it('should return false if it is new or applied staus', inject([SessionContext], (sessionContext: SessionContext) => {
+ spyOn(sessionContext, 'isReadOnlyForStatus').and.callThrough();
+ const gridMeasureDetail = JSON.parse(JSON.stringify(gridmeasures[0]));
+ gridMeasureDetail.statusId = Globals.STATUS.NEW;
+
+ const isReadOnly: boolean = sessionContext.isReadOnlyForStatus(gridMeasureDetail);
+ expect(isReadOnly).toBeFalsy();
+ }));
+
+ it('should return true if it is NOT new or applied staus', inject([SessionContext], (sessionContext: SessionContext) => {
+ spyOn(sessionContext, 'isReadOnlyForStatus').and.callThrough();
+ const gridMeasureDetail = JSON.parse(JSON.stringify(gridmeasures[0]));
+ gridMeasureDetail.statusId = Globals.STATUS.IN_WORK;
+
+ const isReadOnly: boolean = sessionContext.isReadOnlyForStatus(gridMeasureDetail);
+ expect(isReadOnly).toBeTruthy();
+ }));
+
});
diff --git a/src/app/common/session-context.ts b/src/app/common/session-context.ts
index 6a9b862..6b512dc 100644
--- a/src/app/common/session-context.ts
+++ b/src/app/common/session-context.ts
@@ -1,24 +1,27 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { Branch } from './../model/branch';
import { Injectable, EventEmitter } from '@angular/core';
import { User } from '../model/user';
import { Status } from '../model/status';
-import { BannerMessage } from '../common/banner-message';
+import { ToasterMessage } from '../common/banner-message';
import { Globals } from '../common/globals';
import { UserMap } from '../common/user-map';
import { JwtPayload } from '../model/jwt-payload';
import { JwtHelperService } from '@auth0/angular-jwt';
-import { UserDepartment } from '../model/user-department';
import { CostCenter } from '../model/cost-center';
import { BackendSettings } from './../model/backend-settings';
import { GridMeasure } from '../model/grid-measure';
@@ -29,7 +32,6 @@
@Injectable()
export class SessionContext {
- private timeoutId: any;
public centralHttpResultCode$: EventEmitter<number> = new EventEmitter<number>();
public settings;
public reminderAvailable = false;
@@ -39,12 +41,12 @@
public userAuthenticated: boolean;
public inactiveFields: Array<string> = [];
public collapseState: boolean;
- bannerMessage: BannerMessage = new BannerMessage();
+ bannerMessage: ToasterMessage = new ToasterMessage();
getCurrSessionId(): string { return localStorage.getItem(Globals.LOCALSTORAGE_SESSION_ID); }
setCurrSessionId(sid: string): void { localStorage.setItem(Globals.LOCALSTORAGE_SESSION_ID, sid); }
initBannerMessage() {
- this.bannerMessage = new BannerMessage();
+ this.bannerMessage = new ToasterMessage();
}
clearStorage() {
@@ -52,18 +54,6 @@
localStorage.clear();
}
- getCollapseState(type: string): boolean {
- const colapseState = localStorage.getItem(Globals.COLLAPSE_STATE + type);
- if (!colapseState) {
- return false;
- }
- return JSON.parse(colapseState);
- }
-
- setCollapseState(colapseState: boolean, type: string): void {
- localStorage.setItem(Globals.COLLAPSE_STATE + type, JSON.stringify(colapseState));
- }
-
setGridMeasureDetail(gm: GridMeasure): void {
localStorage.setItem(Globals.GRID_MEASURE, JSON.stringify(gm));
}
@@ -131,22 +121,6 @@
return JSON.parse(retValue);
}
- setBannerMessage(bannerMessage: BannerMessage): void {
- this.bannerMessage = bannerMessage;
-
- if (this.timeoutId) {
- clearTimeout(this.timeoutId);
- this.timeoutId = null;
- }
-
- if (bannerMessage.isSetTimeout) {
- this.timeoutId = setTimeout(() => {
- this.bannerMessage.hide();
- }, Globals.TIME_TO_HIDE_MESSAGE_BANNER);
- }
-
- }
-
setFilterExpansionState(filterExpanded: boolean): void {
this.filterExpanded = filterExpanded;
}
@@ -155,15 +129,6 @@
return this.filterExpanded;
}
- setAllUserDepartments(usrDep: UserDepartment[]): void {
- localStorage.setItem(Globals.ALL_USER_DEPARTMENTS, JSON.stringify(usrDep));
- }
-
- getAllUserDepartments(): UserDepartment[] {
- const usrDep = localStorage.getItem(Globals.ALL_USER_DEPARTMENTS);
- return JSON.parse(usrDep);
- }
-
setBranches(branches: Branch[]): void {
localStorage.setItem(Globals.BRANCHESNAME, JSON.stringify(branches));
}
@@ -173,24 +138,6 @@
return JSON.parse(branches);
}
- setResponsiblesOnSiteFromGridmeasures(responsibilities: string[]): void {
- localStorage.setItem(Globals.RESPONSIBILITIESNAME, JSON.stringify(responsibilities));
- }
-
- getResponsiblesOnSiteFromGridmeasures(): string[] {
- const responsibilities = localStorage.getItem(Globals.RESPONSIBILITIESNAME);
- return JSON.parse(responsibilities);
- }
-
- setNetworkControlsFromSingleGridmeasures(networkControls: string[]): void {
- localStorage.setItem(Globals.NETWORKCONTROLSNAME, JSON.stringify(networkControls));
- }
-
- getNetworkControlsFromSingleGridmeasures(): string[] {
- const networkControls = localStorage.getItem(Globals.NETWORKCONTROLSNAME);
- return JSON.parse(networkControls);
- }
-
setStatuses(statuses: Status[]): void {
localStorage.setItem(Globals.STATUSES, JSON.stringify(statuses));
}
@@ -244,7 +191,7 @@
return null;
}
}
- return { id: 0, name: 'NOSTATUS' };
+ return { id: 0, name: 'NOSTATUS', colorCode: 'NOCOLOR' };
}
getBranchById(id: number): Branch {
diff --git a/src/app/common/user-map.spec.ts b/src/app/common/user-map.spec.ts
index 6793df3..eebaf30 100644
--- a/src/app/common/user-map.spec.ts
+++ b/src/app/common/user-map.spec.ts
@@ -1,15 +1,19 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { TestBed, async, inject } from '@angular/core/testing';
import { USERS } from '../test-data/users';
import { UserMap } from './user-map';
diff --git a/src/app/common/user-map.ts b/src/app/common/user-map.ts
index 11b152d..28350d4 100644
--- a/src/app/common/user-map.ts
+++ b/src/app/common/user-map.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { User } from '../model/user';
export class UserMap {
diff --git a/src/app/common/util.spec.ts b/src/app/common/util.spec.ts
index 9b1971b..b745885 100644
--- a/src/app/common/util.spec.ts
+++ b/src/app/common/util.spec.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { Util } from './util';
import { Globals } from './globals';
import {
diff --git a/src/app/common/util.ts b/src/app/common/util.ts
index 611c1a2..05af9ac 100644
--- a/src/app/common/util.ts
+++ b/src/app/common/util.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { Globals } from './globals';
import { StringToDatePipe } from '../common-components/pipes/string-to-date.pipe';
import { isDate } from '../../../node_modules/moment';
diff --git a/src/app/custom_modules/calendar/angular-calendar-openk.css b/src/app/custom_modules/calendar/angular-calendar-openk.css
index 52e47e3..a7e64b5 100644
--- a/src/app/custom_modules/calendar/angular-calendar-openk.css
+++ b/src/app/custom_modules/calendar/angular-calendar-openk.css
@@ -1,15 +1,19 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
.cal-month-view .cal-header {
text-align: center;
font-weight: bolder;
@@ -438,4 +442,4 @@
.glyphicon-eye-open:hover,
.glyphicon-pencil:hover {
filter: brightness(200%);
-}
\ No newline at end of file
+}
diff --git a/src/app/custom_modules/calendar/calendar.component.css b/src/app/custom_modules/calendar/calendar.component.css
index 69579f4..c957825 100644
--- a/src/app/custom_modules/calendar/calendar.component.css
+++ b/src/app/custom_modules/calendar/calendar.component.css
@@ -1,15 +1,19 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
.btn-group {
margin-top: 15px;
}
@@ -30,4 +34,4 @@
.table-bordered>thead>tr>td,
.table-bordered>thead>tr>th {
border: 0px;
-}
\ No newline at end of file
+}
diff --git a/src/app/custom_modules/calendar/calendar.component.html b/src/app/custom_modules/calendar/calendar.component.html
index 8950bd5..ed226f6 100644
--- a/src/app/custom_modules/calendar/calendar.component.html
+++ b/src/app/custom_modules/calendar/calendar.component.html
@@ -1,14 +1,18 @@
<!--
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
-->
+
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
@@ -16,7 +20,8 @@
<div class="row text-center">
<div class="col-md-4">
<div class="btn-group paging">
- <div class="btn btn-primary" mwlCalendarPreviousView [view]="view" [(viewDate)]="currDate" (viewDateChange)="activeDayIsOpen = false">
+ <div class="btn btn-primary" mwlCalendarPreviousView [view]="view" [(viewDate)]="currDate"
+ (viewDateChange)="activeDayIsOpen = false">
{{view === 'week' ? 'Vorherige' : 'Vorheriger'}}
</div>
<div class="btn btn-primary" mwlCalendarToday [(viewDate)]="currDate">
@@ -56,11 +61,11 @@
[events]="events" [refresh]="refresh" [activeDayIsOpen]="activeDayIsOpen" (eventClicked)="eventClicked( 'Clicked', $event.event)"
(dayClicked)="dayClicked($event.day)" (eventTimesChanged)="eventTimesChanged($event)">
</mwl-calendar-month-view>
- <mwl-calendar-week-view [weekStartsOn]="weekStartsOn" [locale]="locale" *ngSwitchCase=" 'week' " [viewDate]="currDate" [events]="events"
- [refresh]="refresh" (eventTimesChanged)="eventTimesChanged($event)" (eventClicked)="eventClicked( 'Clicked', $event.event)">
+ <mwl-calendar-week-view [weekStartsOn]="weekStartsOn" [locale]="locale" *ngSwitchCase=" 'week' " [viewDate]="currDate"
+ [events]="events" [refresh]="refresh" (eventTimesChanged)="eventTimesChanged($event)" (eventClicked)="eventClicked( 'Clicked', $event.event)">
</mwl-calendar-week-view>
- <mwl-calendar-day-view [locale]="locale" *ngSwitchCase=" 'day' " [viewDate]="currDate" [events]="events" [refresh]="refresh"
- (eventTimesChanged)="eventTimesChanged($event)" (eventClicked)="eventClicked( 'Clicked', $event.event)">
+ <mwl-calendar-day-view [locale]="locale" *ngSwitchCase=" 'day' " [viewDate]="currDate" [events]="events"
+ [refresh]="refresh" (eventTimesChanged)="eventTimesChanged($event)" (eventClicked)="eventClicked( 'Clicked', $event.event)">
</mwl-calendar-day-view>
</div>
@@ -68,4 +73,4 @@
</div>
</div>
-<br>
\ No newline at end of file
+<br>
diff --git a/src/app/custom_modules/calendar/calendar.component.spec.ts b/src/app/custom_modules/calendar/calendar.component.spec.ts
index 221fb47..ffe2979 100644
--- a/src/app/custom_modules/calendar/calendar.component.spec.ts
+++ b/src/app/custom_modules/calendar/calendar.component.spec.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { ComponentFixture, TestBed, async, fakeAsync, tick, inject } from '@angular/core/testing';
import { AbstractMockObservableService } from '../../testing/abstract-mock-observable.service';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
@@ -28,7 +32,6 @@
import { GridMeasure } from '../../model/grid-measure';
import { UserSettings } from './../../model/user-settings';
import { USERS } from './../../test-data/users';
-import { GRIDMEASURE } from '../../test-data/grid-measures';
import {
startOfDay,
@@ -54,7 +57,8 @@
CalendarDayViewComponent
} from 'angular-calendar';
import { ModeValidator } from '../helpers/mode-validator';
-import { MessageServiceCustom } from '../../services/message.service';
+import { CalendarEntry } from '../../model/calendar-entry';
+import { CALENDARENTRY } from '../../test-data/calendar-entry';
class FakeRouter {
navigate(commands: any[]) {
@@ -66,7 +70,7 @@
registerLocaleData(localeDe);
let component: CustomCalendarComponent;
let fixture: ComponentFixture<CustomCalendarComponent>;
- const gridmeasures: GridMeasure[] = JSON.parse(JSON.stringify(GRIDMEASURE));
+ const calendarEntries: CalendarEntry[] = JSON.parse(JSON.stringify(CALENDARENTRY));
let routerStub: FakeRouter;
let sessionContext;
@@ -75,7 +79,7 @@
};
class GridmeasureToEventHelper {
- public createEventsFromGridMeasures(gridMeasures: GridMeasure[], mode: string) {
+ public createEventsFromSingleGridMeasures(singleGMs: CalendarEntry[], mode: string) {
const events: CalendarEvent<GridMeasure>[] = new Array<CalendarEvent>();
const editAction = <CalendarEventAction>{
label: '<i class="glyphicon glyphicon-pencil"></i>'
@@ -83,17 +87,17 @@
const viewAction = <CalendarEventAction>{
label: '<i class="glyphicon glyphicon-eye-open"></i>'
};
- gridMeasures.forEach(gridMeasure => {
- if (!gridMeasure.plannedStarttimeFirstSinglemeasure || !gridMeasure.plannedEndtimeGridmeasure) {
- console.log('No valide date values for ' + gridMeasure.title);
- console.log('Planned End Time Gridmeasure ' + gridMeasure.plannedEndtimeGridmeasure);
- console.log('Start Time First Sequence: ' + gridMeasure.plannedStarttimeFirstSinglemeasure);
+ singleGMs.forEach(singleGM => {
+ if (!singleGM.plannedStarttimSinglemeasure || !singleGM.plannedEndtimeSinglemeasure) {
+ console.log('No valide date values for ' + singleGM.singleGridMeasureTitle);
+ console.log('Planned End Time Gridmeasure ' + singleGM.plannedEndtimeSinglemeasure);
+ console.log('Start Time First Sequence: ' + singleGM.plannedStarttimSinglemeasure);
} else {
events.push(<CalendarEvent><GridMeasure>{
- id: gridMeasure.id,
- title: gridMeasure.title || 'TITLE NOT DEFINED',
- start: new Date(gridMeasure.plannedStarttimeFirstSinglemeasure),
- end: new Date(gridMeasure.plannedEndtimeGridmeasure),
+ id: singleGM.gridMeasureId,
+ title: singleGM.singleGridMeasureTitle || 'TITLE NOT DEFINED',
+ start: new Date(singleGM.plannedStarttimSinglemeasure),
+ end: new Date(singleGM.plannedEndtimeSinglemeasure),
color: {
primary: '#ad2121',
secondary: '#FAE3E3'
@@ -104,7 +108,7 @@
beforeStart: true,
afterEnd: true
},
- meta: gridMeasure
+ meta: singleGM
});
}
});
@@ -116,6 +120,9 @@
getGridMeasures() {
return this;
}
+ getCalender() {
+ return this;
+ }
}
class MockUserSettingService extends AbstractMockObservableService {
@@ -165,7 +172,6 @@
})
],
providers: [
- MessageServiceCustom,
ModeValidator,
{ provide: SessionContext, useValue: sessionContext },
{ provide: Router, useValue: routerStub },
@@ -195,7 +201,7 @@
fixture.detectChanges();
// we need to init the component and the path... because of OnInit
- mockGridMeasureService.content = JSON.parse(JSON.stringify(GRIDMEASURE[0]));
+ mockGridMeasureService.content = JSON.parse(JSON.stringify(CALENDARENTRY[0]));
const roleAcess: RoleAccess = {
editRoles: [{
name: 'planned-policies-measureplanner',
@@ -330,166 +336,12 @@
});
- it('should show correct number of grid-measures for a day', async(() => {
- mockGridMeasureService.content = JSON.parse(JSON.stringify(GRIDMEASURE[0]));
-
+ it('should set trasparency to rgba color if this has a vlaue from 1', () => {
+ spyOn(component, 'setRGBAColorTransparency').and.callThrough();
fixture.detectChanges();
-
- fixture.whenRenderingDone().then(() => {
- fixture.detectChanges();
- expect(component.events.length).toBe(1);
- });
- const calEvent: CalendarEvent = component.events[0];
- component.removeEvent(calEvent);
-
- fixture.whenRenderingDone().then(() => {
- fixture.detectChanges();
- expect(component.events.length).toBe(0);
- });
-
- component.addEvent();
- component.currDate = new Date();
- fixture.whenRenderingDone().then(() => {
- fixture.detectChanges();
- expect(component.events.length).toBe(1);
- });
- }));
-
- xit('should navigate to grid-measure-detail for in edit-mode', (() => {
- mockGridMeasureService.content = JSON.parse(JSON.stringify(GRIDMEASURE[0]));
- component.events = new GridmeasureToEventHelper().createEventsFromGridMeasures(gridmeasures, 'edit');
+ component.setRGBAColorTransparency('rgba(111,222,333,1)');
fixture.detectChanges();
- fixture.whenStable().then(() => {
- fixture.detectChanges();
- console.log('component.events[0] : ' + component.events[0]);
- const calEvent: CalendarEvent<GridMeasure> = component.events[0];
- console.log('calEvent : ' + calEvent);
-
- component.eventClicked('edit', calEvent);
-
- expect(routerStub.navigate).toHaveBeenCalledWith(['/gridMeasureDetail/', 1111, 'edit']);
- });
- }));
-
- xit('should check if there are grid measure for actual day and show them', async(() => {
- component.events.push(<CalendarEvent><GridMeasure>{
- id: 1,
- title: 'TITLE',
- start: new Date('2017-01-12'),
- end: new Date('2017-01-18')
- });
- fixture.detectChanges();
- component.currDate = new Date('2017-01-16');
- spyOn((component as any), 'showGridMeasuresIfThere').and.callThrough();
- (component as any).showGridMeasuresIfThere();
- fixture.whenRenderingDone().then(() => {
- fixture.detectChanges();
- expect((component as any).showGridMeasuresIfThere).toHaveBeenCalled();
- expect(component.activeDayIsOpen).toBeTruthy();
- });
-
- }));
-
- xit('should check if there are grid measure for actual day(no event actual) and dont show them', async(() => {
- component.events.push(<CalendarEvent><GridMeasure>{
- id: 1,
- title: 'TITLE',
- start: new Date('2017-01-12'),
- end: new Date('2017-01-18')
- });
- fixture.detectChanges();
- component.currDate = new Date('2017-01-25');
- spyOn((component as any), 'showGridMeasuresIfThere').and.callThrough();
- (component as any).showGridMeasuresIfThere();
- fixture.whenRenderingDone().then(() => {
- fixture.detectChanges();
- expect((component as any).showGridMeasuresIfThere).toHaveBeenCalled();
- expect(component.activeDayIsOpen).toBeFalsy();
- });
-
- }));
-
- xit('should leave open the gm dialog in month overview if there are events', async(() => {
- const events: CalendarEvent<GridMeasure>[] = new Array<CalendarEvent>();
- events.push(<CalendarEvent><GridMeasure>{
- id: 1,
- title: 'TITLE',
- start: new Date('2017-01-12'),
- end: new Date('2017-01-18')
- });
- fixture.detectChanges();
- component.activeDayIsOpen = true;
- component.currDate = new Date('2017-01-16');
- const date = new Date('2017-01-16');
- spyOn(component, 'dayClicked').and.callThrough();
- fixture.detectChanges();
- component.dayClicked({ date, events });
- fixture.whenRenderingDone().then(() => {
- fixture.detectChanges();
- expect(component.dayClicked).toHaveBeenCalled();
- expect(component.activeDayIsOpen).toBeFalsy();
- });
-
- }));
-
- xit('should close gm dialog if there are no events', async(() => {
- const events: CalendarEvent<GridMeasure>[] = new Array<CalendarEvent>();
- fixture.detectChanges();
- component.activeDayIsOpen = true;
- component.currDate = new Date('2017-01-16');
- const date = new Date('2017-01-16');
- spyOn(component, 'dayClicked').and.callThrough();
- fixture.detectChanges();
- component.dayClicked({ date, events });
- fixture.whenRenderingDone().then(() => {
- fixture.detectChanges();
- expect(component.dayClicked).toHaveBeenCalled();
- expect(component.activeDayIsOpen).toBeFalsy();
- });
-
- }));
-
- xit('should open gm dialog if there are events and not even open', async(() => {
- const events: CalendarEvent<GridMeasure>[] = new Array<CalendarEvent>();
- events.push(<CalendarEvent><GridMeasure>{
- id: 1,
- title: 'TITLE',
- start: new Date('2017-01-12'),
- end: new Date('2017-01-18')
- });
- fixture.detectChanges();
- component.activeDayIsOpen = false;
- component.currDate = new Date('2017-01-17');
- const date = new Date('2017-01-17');
- spyOn(component, 'dayClicked').and.callThrough();
- fixture.detectChanges();
- component.dayClicked({ date, events });
- fixture.whenRenderingDone().then(() => {
- fixture.detectChanges();
- expect(component.dayClicked).toHaveBeenCalled();
- expect(component.activeDayIsOpen).toBeTruthy();
- });
-
- }));
-
- xit('should check the action of an event and navigate there with edit', async(() => {
- const events: CalendarEvent<GridMeasure>[] = new Array<CalendarEvent>();
- events.push(<CalendarEvent><GridMeasure>{
- id: 1,
- title: 'TITLE',
- start: new Date('2017-01-12'),
- end: new Date('2017-01-18')
- });
- fixture.detectChanges();
- component.activeDayIsOpen = false;
- spyOn(component, 'eventClicked').and.callThrough();
- fixture.detectChanges();
- component.eventClicked(Globals.MODE.EDIT, events[0]);
- fixture.whenRenderingDone().then(() => {
- fixture.detectChanges();
- expect(routerStub.navigate).toHaveBeenCalledWith(['/gridMeasureDetail/', events[0].id, Globals.MODE.EDIT]);
- });
-
- }));
-
+ expect(component.setRGBAColorTransparency('rgba(111,222,333,1)')).toBe('rgba(111,222,333,' +
+ Globals.CALENDAR_COLOR_TRANSPARENCY_VALUE + ')');
+ });
});
diff --git a/src/app/custom_modules/calendar/calendar.component.ts b/src/app/custom_modules/calendar/calendar.component.ts
index 1cc1957..fb64c34 100644
--- a/src/app/custom_modules/calendar/calendar.component.ts
+++ b/src/app/custom_modules/calendar/calendar.component.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { Component, OnInit, ViewChild, TemplateRef } from '@angular/core';
import { GridMeasureService } from './../../services/grid-measure.service';
import { GridMeasure } from './../../model/grid-measure';
@@ -34,22 +38,9 @@
import { CustomDateFormatter } from './custom-date-formatter-provider';
import { Router } from '@angular/router';
import { ModeValidator } from '../helpers/mode-validator';
-import { StatusMainFilterItem, StatusMainFilter } from '../../model/status-main-filter';
+import { SessionContext } from '../../common/session-context';
+import { Globals } from '../../common/globals';
-const colors: any = {
- red: {
- primary: '#ad2121',
- secondary: '#FAE3E3'
- },
- blue: {
- primary: '#1e90ff',
- secondary: '#D1E8FF'
- },
- yellow: {
- primary: '#e3bc08',
- secondary: '#FDF1BA'
- }
-};
@Component({
selector: 'app-custom-calendar',
templateUrl: './calendar.component.html',
@@ -61,15 +52,16 @@
}
]
})
-export class CustomCalendarComponent implements OnInit {
+
+export class CustomCalendarComponent implements OnInit {
@ViewChild('modalContent') modalContent: TemplateRef<any>;
+
+ colorsForStatus: any;
weekStartsOn = 1;
locale = 'de';
undoRedoStack = new UndoRedoStackComponent();
- eventTypes = colors;
- eventTypeKeys = ['blue', 'red', 'yellow'];
-
+ eventTypes = this.colorsForStatus;
activeDayIsOpen = true;
refresh: Subject<any> = new Subject();
@@ -78,39 +70,23 @@
event: CalendarEvent;
};
- view: any = 'month';
+ view: any = 'week';
currDate: Date = new Date();
currentEditEventStart: Date = new Date();
currentEditEventEnd: Date = new Date();
- actions: CalendarEventAction[] = [
- {
- label: '<i class="fa fa-fw fa-times"></i>',
- onClick: ({ event }: { event: CalendarEvent }): void => {
- this.removeEvent(event);
- }
- }
- ];
currentEditEvent: CalendarEvent;
-
events = new Array<CalendarEvent>();
constructor(
private gridMeasureService: GridMeasureService,
private router: Router,
- public modeValidator: ModeValidator) { }
+ public modeValidator: ModeValidator,
+ private sessionContext: SessionContext) { }
ngOnInit() {
-
- const calendarStatusMainFilterItem = new StatusMainFilterItem;
- calendarStatusMainFilterItem.isClosedStatusActive = true;
- calendarStatusMainFilterItem.isCanceledStatusActive = false;
- calendarStatusMainFilterItem.onlyUsersGMsDesired = false;
-
- const calendarStatusMainFilter = new StatusMainFilter;
- calendarStatusMainFilter.item = calendarStatusMainFilterItem;
-
- this.gridMeasureService.getGridMeasures(calendarStatusMainFilter)
- .subscribe(gridMeasures => {
+ this.setColors();
+ this.gridMeasureService.getCalender()
+ .subscribe(singleGridMeasures => {
const editAction = <CalendarEventAction>{
label: '<span class="glyphicon glyphicon-pencil"></span>',
onClick: ({ event }: { event: CalendarEvent }): void => {
@@ -123,25 +99,25 @@
this.eventClicked('view', event);
}
};
- gridMeasures.forEach(gridMeasure => {
- if (!gridMeasure.plannedStarttimeFirstSinglemeasure || !gridMeasure.endtimeGridmeasure) {
- console.log('No valide date values for ' + gridMeasure.title);
- console.log('Planned End Time Gridmeasure ' + gridMeasure.endtimeGridmeasure);
- console.log('Start Time First Sequence: ' + gridMeasure.plannedStarttimeFirstSinglemeasure);
+ singleGridMeasures.forEach(singleGM => {
+ if (!singleGM.plannedStarttimSinglemeasure || !singleGM.plannedEndtimeSinglemeasure) {
+ console.log('No valide date values for ' + singleGM.singleGridMeasureTitle);
+ console.log('Planned End Time Gridmeasure ' + singleGM.plannedEndtimeSinglemeasure);
+ console.log('Start Time First Sequence: ' + singleGM.plannedStarttimSinglemeasure);
} else {
this.events.push(<CalendarEvent><GridMeasure>{
- id: gridMeasure.id,
- title: gridMeasure.title || 'TITLE NOT DEFINED',
- start: new Date(gridMeasure.plannedStarttimeFirstSinglemeasure),
- end: new Date(gridMeasure.endtimeGridmeasure),
- color: colors.red,
+ id: singleGM.gridMeasureId,
+ title: singleGM.singleGridMeasureTitle || 'TITLE NOT DEFINED',
+ start: new Date(singleGM.plannedStarttimSinglemeasure),
+ end: new Date(singleGM.plannedEndtimeSinglemeasure),
+ color: this.colorsForStatus[singleGM.gridMeasureStatusId],
draggable: false,
- actions: [this.modeValidator.isEditModeAllowed(gridMeasure) ? editAction : viewAction],
+ actions: [this.modeValidator.isEditModeAllowed(singleGM.gridMeasureStatusId) ? editAction : viewAction],
resizable: {
beforeStart: false,
afterEnd: false
},
- meta: gridMeasure
+ meta: singleGM
});
}
});
@@ -158,10 +134,6 @@
this.activeDayIsOpen = numberOfGMsInActualDay.length > 0;
}
- removeEvent(event: CalendarEvent) {
- this.events = this.events.filter(iEvent => iEvent !== event);
- }
-
dayClicked({ date, events }: { date: Date; events: CalendarEvent[] }): void {
this.currentEditEvent = null;
if (isSameMonth(date, this.currDate)) {
@@ -178,32 +150,94 @@
}
eventClicked(action: string, event: CalendarEvent<GridMeasure>): void {
- const isEditModeAllowed = this.modeValidator.isEditModeAllowed(event.meta);
+ const isEditModeAllowed = this.modeValidator.isEditModeAllowed(event.meta.statusId);
this.router.navigate(['/gridMeasureDetail/', event.id, isEditModeAllowed ? 'edit' : 'view']);
}
eventTimesChanged(eventchanged: CalendarEventTimesChangedEvent): void {
const event = <CalendarEvent><GridMeasure>eventchanged.event;
- event.meta.starttimeFirstSequence = eventchanged.newStart;
- event.meta.endtimeGridmeasure = eventchanged.newEnd;
+ event.meta.plannedStarttimSinglemeasure = eventchanged.newStart;
+ event.meta.plannedEndtimeSinglemeasure = eventchanged.newEnd;
event.start = eventchanged.newStart;
event.end = eventchanged.newEnd;
this.refresh.next();
}
- addEvent(): void {
- this.events.push({
- title: 'New event',
- start: startOfDay(new Date()),
- end: endOfDay(new Date()),
- color: colors.red,
- draggable: true,
- resizable: {
- beforeStart: true,
- afterEnd: true
+
+ setColors() {
+ const newColor = this.sessionContext.getStatusById(Globals.STATUS.NEW).colorCode;
+ const appliedColor = this.sessionContext.getStatusById(Globals.STATUS.APPLIED).colorCode;
+ const canceledColor = this.sessionContext.getStatusById(Globals.STATUS.CANCELED).colorCode;
+ const forApprovalColor = this.sessionContext.getStatusById(Globals.STATUS.FORAPPROVAL).colorCode;
+ const approvedColor = this.sessionContext.getStatusById(Globals.STATUS.APPROVED).colorCode;
+ const requestedColor = this.sessionContext.getStatusById(Globals.STATUS.REQUESTED).colorCode;
+ const releasedColor = this.sessionContext.getStatusById(Globals.STATUS.RELEASED).colorCode;
+ const activeColor = this.sessionContext.getStatusById(Globals.STATUS.ACTIVE).colorCode;
+ const inWorkColor = this.sessionContext.getStatusById(Globals.STATUS.IN_WORK).colorCode;
+ const workFinishedColor = this.sessionContext.getStatusById(Globals.STATUS.WORK_FINISHED).colorCode;
+ const finishedColor = this.sessionContext.getStatusById(Globals.STATUS.FINISHED).colorCode;
+ const closedColor = this.sessionContext.getStatusById(Globals.STATUS.CLOSED).colorCode;
+ const rejectedColor = this.sessionContext.getStatusById(Globals.STATUS.REJECTED).colorCode;
+
+ this.colorsForStatus = {
+ 0: {
+ primary: newColor,
+ secondary: this.setRGBAColorTransparency(newColor)
+ },
+ 1: {
+ primary: appliedColor,
+ secondary: this.setRGBAColorTransparency(appliedColor)
+ },
+ 2: {
+ primary: canceledColor,
+ secondary: this.setRGBAColorTransparency(canceledColor)
+ },
+ 3: {
+ primary: forApprovalColor,
+ secondary: this.setRGBAColorTransparency(forApprovalColor)
+ },
+ 4: {
+ primary: approvedColor,
+ secondary: this.setRGBAColorTransparency(approvedColor)
+ },
+ 5: {
+ primary: requestedColor,
+ secondary: this.setRGBAColorTransparency(requestedColor)
+ },
+ 6: {
+ primary: releasedColor,
+ secondary: this.setRGBAColorTransparency(releasedColor)
+ },
+ 7: {
+ primary: activeColor,
+ secondary: this.setRGBAColorTransparency(activeColor)
+ },
+ 8: {
+ primary: inWorkColor,
+ secondary: this.setRGBAColorTransparency(inWorkColor)
+ },
+ 9: {
+ primary: workFinishedColor,
+ secondary: this.setRGBAColorTransparency(workFinishedColor)
+ },
+ 10: {
+ primary: finishedColor,
+ secondary: this.setRGBAColorTransparency(finishedColor)
+ },
+ 11: {
+ primary: closedColor,
+ secondary: this.setRGBAColorTransparency(closedColor)
+ },
+ 12: {
+ primary: rejectedColor,
+ secondary: this.setRGBAColorTransparency(rejectedColor)
}
- });
- this.refresh.next();
+ };
}
+
+ setRGBAColorTransparency(colorRGBA: string): string {
+ return colorRGBA.replace('1)', Globals.CALENDAR_COLOR_TRANSPARENCY_VALUE + ')');
+ }
+
}
diff --git a/src/app/custom_modules/calendar/calendar.module.ts b/src/app/custom_modules/calendar/calendar.module.ts
index 921f9aa..16ad89b 100644
--- a/src/app/custom_modules/calendar/calendar.module.ts
+++ b/src/app/custom_modules/calendar/calendar.module.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { BrowserModule } from '@angular/platform-browser';
diff --git a/src/app/custom_modules/calendar/custom-date-formatter-provider.spec.ts b/src/app/custom_modules/calendar/custom-date-formatter-provider.spec.ts
index 756e633..b56fd8e 100644
--- a/src/app/custom_modules/calendar/custom-date-formatter-provider.spec.ts
+++ b/src/app/custom_modules/calendar/custom-date-formatter-provider.spec.ts
@@ -1,15 +1,19 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { CustomDateFormatter } from './custom-date-formatter-provider';
describe('CustomDateFormatter', () => {
diff --git a/src/app/custom_modules/calendar/custom-date-formatter-provider.ts b/src/app/custom_modules/calendar/custom-date-formatter-provider.ts
index 33c5392..00dc193 100644
--- a/src/app/custom_modules/calendar/custom-date-formatter-provider.ts
+++ b/src/app/custom_modules/calendar/custom-date-formatter-provider.ts
@@ -1,13 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-******************************************************************************
- */
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
import { CalendarDateFormatter, DateFormatterParams } from 'angular-calendar';
import { getISOWeek, getISODay } from 'date-fns';
import { DatePipe } from '@angular/common';
diff --git a/src/app/custom_modules/helpers/clone-grid-measure-helper.spec.ts b/src/app/custom_modules/helpers/clone-grid-measure-helper.spec.ts
index 09ed8e5..9fbb529 100644
--- a/src/app/custom_modules/helpers/clone-grid-measure-helper.spec.ts
+++ b/src/app/custom_modules/helpers/clone-grid-measure-helper.spec.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { TestBed, async } from '@angular/core/testing';
import { GridMeasure } from '../../model/grid-measure';
import { GRIDMEASURE } from '../../test-data/grid-measures';
@@ -64,21 +68,6 @@
expect(inv_sgm2.title).toBe('Rückschaltung von ' + sgm2.title);
}));
- xit('should reverse the steps correctly', async(() => {
- expect(inv_sgm1.listSteps.length).toBe(sgm1.listSteps.length);
-
- for (let i = 0; i < sgm1.listSteps.length; i++) {
- expect(inv_sgm1.listSteps[inv_sgm1.listSteps.length - 1 - i]).toEqual(sgm1.listSteps[i]);
- }
-
- expect(inv_sgm2.listSteps.length).toBe(sgm2.listSteps.length);
-
- for (let i = 0; i < sgm2.listSteps.length; i++) {
- expect(inv_sgm2.listSteps[inv_sgm2.listSteps.length - 1 - i]).toEqual(sgm2.listSteps[i]);
- }
-
- }));
-
it('should set sort order correctly', async(() => {
expect(inv_sgm1.sortorder).toBe(gm.listSingleGridmeasures[gm.listSingleGridmeasures.length - 1].sortorder + 1);
expect(inv_sgm2.sortorder).toBe(gm.listSingleGridmeasures[gm.listSingleGridmeasures.length - 1].sortorder + 1);
diff --git a/src/app/custom_modules/helpers/clone-grid-measure-helper.ts b/src/app/custom_modules/helpers/clone-grid-measure-helper.ts
index c3374ea..d9d82c4 100644
--- a/src/app/custom_modules/helpers/clone-grid-measure-helper.ts
+++ b/src/app/custom_modules/helpers/clone-grid-measure-helper.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { SingleGridMeasure } from '../../model/single-grid-measure';
import { GridMeasure } from '../../model/grid-measure';
import { Globals } from '../../common/globals';
diff --git a/src/app/custom_modules/helpers/entity-validator.spec.ts b/src/app/custom_modules/helpers/entity-validator.spec.ts
index 09af8b1..9e132c8 100644
--- a/src/app/custom_modules/helpers/entity-validator.spec.ts
+++ b/src/app/custom_modules/helpers/entity-validator.spec.ts
@@ -1,15 +1,19 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { TestBed } from '@angular/core/testing';
import { EntityValidator, ValidationFunc } from './entity-validator';
import { SessionContext } from '../../common/session-context';
diff --git a/src/app/custom_modules/helpers/entity-validator.ts b/src/app/custom_modules/helpers/entity-validator.ts
index f5811dc..3610900 100644
--- a/src/app/custom_modules/helpers/entity-validator.ts
+++ b/src/app/custom_modules/helpers/entity-validator.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { ToasterMessageService } from '../../services/toaster-message.service';
export abstract class ValidationFunc<T> {
diff --git a/src/app/custom_modules/helpers/grid-measure-validator.spec.ts b/src/app/custom_modules/helpers/grid-measure-validator.spec.ts
index dcb089e..e02197e 100644
--- a/src/app/custom_modules/helpers/grid-measure-validator.spec.ts
+++ b/src/app/custom_modules/helpers/grid-measure-validator.spec.ts
@@ -1,18 +1,21 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { TestBed, async } from '@angular/core/testing';
import { EntityValidator } from './entity-validator';
import { GridMeasureValidatorFactory } from './grid-measure-validator';
-import { MessageServiceCustom } from '../../services/message.service';
import { SessionContext } from '../../common/session-context';
import { GridMeasure } from '../../model/grid-measure';
import { GRIDMEASURE } from '../../test-data/grid-measures';
diff --git a/src/app/custom_modules/helpers/grid-measure-validator.ts b/src/app/custom_modules/helpers/grid-measure-validator.ts
index 85cc038..e571988 100644
--- a/src/app/custom_modules/helpers/grid-measure-validator.ts
+++ b/src/app/custom_modules/helpers/grid-measure-validator.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { EntityValidator, ValidationFunc } from './entity-validator';
import { GridMeasure } from '../../model/grid-measure';
import { SingleGridMeasure } from '../../model/single-grid-measure';
diff --git a/src/app/custom_modules/helpers/mode-validator.spec.ts b/src/app/custom_modules/helpers/mode-validator.spec.ts
index abc1136..d95a15c 100644
--- a/src/app/custom_modules/helpers/mode-validator.spec.ts
+++ b/src/app/custom_modules/helpers/mode-validator.spec.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { TestBed, inject } from '@angular/core/testing';
import { RoleAccessHelperService } from '../../services/jobs/role-access-helper.service';
import { Router, ActivatedRoute } from '@angular/router';
@@ -136,14 +140,14 @@
it('should check if edit mode is allowed for superuser', inject([ModeValidator], (modeValidator: ModeValidator) => {
sessionContext.setCurrUser(USERS[1]);
- modeValidator.isEditModeAllowed(gridmeasures[0]);
+ modeValidator.isEditModeAllowed(gridmeasures[0].statusId);
expect(modeValidator.isEditModeAllowed).toBeTruthy();
}));
it('should check if edit mode is allowed for planner and status new', inject([ModeValidator], (modeValidator: ModeValidator) => {
sessionContext.setCurrUser(USERS[0]);
- modeValidator.isEditModeAllowed(gridmeasures[0]);
+ modeValidator.isEditModeAllowed(gridmeasures[0].statusId);
expect(modeValidator.isEditModeAllowed).toBeTruthy();
}));
diff --git a/src/app/custom_modules/helpers/mode-validator.ts b/src/app/custom_modules/helpers/mode-validator.ts
index 161a825..ae49703 100644
--- a/src/app/custom_modules/helpers/mode-validator.ts
+++ b/src/app/custom_modules/helpers/mode-validator.ts
@@ -1,15 +1,20 @@
-
-
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-******************************************************************************
- */
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
+
+
import { GridMeasure } from '../../model/grid-measure';
import { RoleAccessHelperService } from '../../services/jobs/role-access-helper.service';
import { Router } from '@angular/router';
@@ -44,16 +49,16 @@
}
}
- isEditModeAllowed(gridmeasure: GridMeasure): boolean {
+ isEditModeAllowed(statusId: number): boolean {
const user = this.sessionContext.getCurrUser();
return (user.roles.includes(Globals.OAUTH2CONF_SUPERUSER_ROLE) ||
- this.roleAccessHelper.editPossibleForRoles(user.roles, gridmeasure.statusId))
- && gridmeasure.statusId !== Globals.STATUS.CLOSED;
+ this.roleAccessHelper.editPossibleForRoles(user.roles, statusId))
+ && statusId !== Globals.STATUS.CLOSED;
}
isEmailEditModeAllowed(gridmeasure: GridMeasure): boolean {
const user = this.sessionContext.getCurrUser();
- return this.isEditModeAllowed(gridmeasure) &&
+ return this.isEditModeAllowed(gridmeasure.statusId) &&
(user.roles.includes(Globals.OAUTH2CONF_SUPERUSER_ROLE) ||
user.roles.includes(Globals.OAUTH2CONF_MEASUREAPPLICANT_ROLE) ||
user.roles.includes(Globals.OAUTH2CONF_MEASUREPLANNER_ROLE));
diff --git a/src/app/custom_modules/routing/app-routing.module.spec.ts b/src/app/custom_modules/routing/app-routing.module.spec.ts
index cc36d6d..cd34a24 100644
--- a/src/app/custom_modules/routing/app-routing.module.spec.ts
+++ b/src/app/custom_modules/routing/app-routing.module.spec.ts
@@ -1,13 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-******************************************************************************
- */
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
import { TestBed } from '@angular/core/testing';
import { AppRoutingModule } from './app-routing.module';
diff --git a/src/app/custom_modules/routing/app-routing.module.ts b/src/app/custom_modules/routing/app-routing.module.ts
index 89e13f2..dc03b33 100644
--- a/src/app/custom_modules/routing/app-routing.module.ts
+++ b/src/app/custom_modules/routing/app-routing.module.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { OverviewComponent } from '../../pages/overview/overview.component';
diff --git a/src/app/custom_modules/undo-redo-stack/commands/base-command.ts b/src/app/custom_modules/undo-redo-stack/commands/base-command.ts
index 18dc6d8..5bf50a6 100644
--- a/src/app/custom_modules/undo-redo-stack/commands/base-command.ts
+++ b/src/app/custom_modules/undo-redo-stack/commands/base-command.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { Command } from './command';
export abstract class BaseCommand implements Command {
diff --git a/src/app/custom_modules/undo-redo-stack/commands/command.ts b/src/app/custom_modules/undo-redo-stack/commands/command.ts
index 8898d03..be52150 100644
--- a/src/app/custom_modules/undo-redo-stack/commands/command.ts
+++ b/src/app/custom_modules/undo-redo-stack/commands/command.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
export interface Command {
undo();
redo();
diff --git a/src/app/custom_modules/undo-redo-stack/commands/simple-field-command.spec.ts b/src/app/custom_modules/undo-redo-stack/commands/simple-field-command.spec.ts
index 4f6ef0c..657ee8b 100644
--- a/src/app/custom_modules/undo-redo-stack/commands/simple-field-command.spec.ts
+++ b/src/app/custom_modules/undo-redo-stack/commands/simple-field-command.spec.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { TestBed, inject } from '@angular/core/testing';
import { SimpleFieldCommand } from './simple-field-command';
import { BaseCommand } from './base-command';
diff --git a/src/app/custom_modules/undo-redo-stack/commands/simple-field-command.ts b/src/app/custom_modules/undo-redo-stack/commands/simple-field-command.ts
index b1fc24a..a49c6bd 100644
--- a/src/app/custom_modules/undo-redo-stack/commands/simple-field-command.ts
+++ b/src/app/custom_modules/undo-redo-stack/commands/simple-field-command.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { Command } from './command';
import { BaseCommand } from './base-command';
diff --git a/src/app/custom_modules/undo-redo-stack/undo-redo-stack.component.ts b/src/app/custom_modules/undo-redo-stack/undo-redo-stack.component.ts
index babe042..7a094d9 100644
--- a/src/app/custom_modules/undo-redo-stack/undo-redo-stack.component.ts
+++ b/src/app/custom_modules/undo-redo-stack/undo-redo-stack.component.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { Component } from '@angular/core';
import { Command } from './commands/command';
diff --git a/src/app/custom_modules/undo-redo-stack/undo-redo-stack.module.ts b/src/app/custom_modules/undo-redo-stack/undo-redo-stack.module.ts
index 25d8fe0..58c692f 100644
--- a/src/app/custom_modules/undo-redo-stack/undo-redo-stack.module.ts
+++ b/src/app/custom_modules/undo-redo-stack/undo-redo-stack.module.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
diff --git a/src/app/custom_modules/undo-redo-stack/undo-redo-stack.spec.ts b/src/app/custom_modules/undo-redo-stack/undo-redo-stack.spec.ts
index a23f3a8..66dd7ec 100644
--- a/src/app/custom_modules/undo-redo-stack/undo-redo-stack.spec.ts
+++ b/src/app/custom_modules/undo-redo-stack/undo-redo-stack.spec.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { TestBed, inject } from '@angular/core/testing';
import { BaseCommand } from './commands/base-command';
import { Command } from './commands/command';
diff --git a/src/app/lists/common-components/abstract-list/abstract-list.component.css b/src/app/lists/common-components/abstract-list/abstract-list.component.css
index 5e32c2a..8e75647 100644
--- a/src/app/lists/common-components/abstract-list/abstract-list.component.css
+++ b/src/app/lists/common-components/abstract-list/abstract-list.component.css
@@ -1,15 +1,19 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
table {
width: 100%;
}
diff --git a/src/app/lists/common-components/abstract-list/abstract-list.component.html b/src/app/lists/common-components/abstract-list/abstract-list.component.html
index ef2876a..2289016 100644
--- a/src/app/lists/common-components/abstract-list/abstract-list.component.html
+++ b/src/app/lists/common-components/abstract-list/abstract-list.component.html
@@ -1,15 +1,19 @@
<!--
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
-->
+
<p>
abstract-list works!
</p>
diff --git a/src/app/lists/common-components/abstract-list/abstract-list.component.spec.ts b/src/app/lists/common-components/abstract-list/abstract-list.component.spec.ts
index 5451810..b14ea20 100644
--- a/src/app/lists/common-components/abstract-list/abstract-list.component.spec.ts
+++ b/src/app/lists/common-components/abstract-list/abstract-list.component.spec.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { async, fakeAsync, ComponentFixture, TestBed, tick } from '@angular/core/testing';
import { AbstractMockObservableService } from '../../../testing/abstract-mock-observable.service';
import { AbstractListComponent } from './abstract-list.component';
@@ -33,7 +37,6 @@
import { GridOptions } from 'ag-grid/dist/lib/entities/gridOptions';
import { ToasterMessageService } from '../../../services/toaster-message.service';
import { MessageService } from 'primeng/api';
-import { MessageServiceCustom } from '../../../services/message.service';
export class AbstractListMocker {
public static getComponentMocks() {
@@ -144,8 +147,7 @@
{ provide: UserSettingsService, useValue: mockUserSettingService },
{ provide: Router },
{ provide: RoleAccessHelperService, useValue: roleAccessHelper },
- { provide: ToasterMessageService, useValue: toasterMessageService },
- MessageServiceCustom
+ { provide: ToasterMessageService, useValue: toasterMessageService }
]
})
.compileComponents();
@@ -270,44 +272,6 @@
}));
- xit('should work with onGridReadyCorrectly -> empty', () => {
- const abstractComp: any = component; // used to access privates
- const param = {
- api: {},
- columnApi: {
- getAllColumns: () => [],
- autoSizeColumns: (allColIds) => { }
- }
- };
-
- const mockState = new ParamsMockState();
- abstractComp.onGridReady(getParamsMock(mockState));
-
- expect(mockState.setColumnStateCalled).toBeFalsy();
- expect(mockState.setFilterCalled).toBeFalsy();
- expect(mockState.onFilterChangedCalled).toBeFalsy();
- expect(mockState.setSortModelCalled).toBeFalsy();
- expect(mockState.getAllColumnsCalled).toBeTruthy();
- expect(mockState.autoSizeColumnsCalled).toBeTruthy();
- });
-
- xit('should work with onGridReadyCorrectly -> complete', () => {
- const abstractComp: any = component; // used to access privates
- abstractComp.columnState = {};
- abstractComp.filteringSearchText = 'holla';
- abstractComp.sortingState = {};
-
- const mockState = new ParamsMockState();
- abstractComp.onGridReady(getParamsMock(mockState));
-
- expect(mockState.setColumnStateCalled).toBeTruthy();
- expect(mockState.setFilterCalled).toBeTruthy();
- expect(mockState.onFilterChangedCalled).toBeTruthy();
- expect(mockState.setSortModelCalled).toBeTruthy();
- expect(mockState.getAllColumnsCalled).toBeTruthy();
- expect(mockState.autoSizeColumnsCalled).toBeTruthy();
- });
-
class ParamsMockState {
setFilterCalled = false;
onFilterChangedCalled = false;
diff --git a/src/app/lists/common-components/abstract-list/abstract-list.component.ts b/src/app/lists/common-components/abstract-list/abstract-list.component.ts
index 69faf6b..242fb8c 100644
--- a/src/app/lists/common-components/abstract-list/abstract-list.component.ts
+++ b/src/app/lists/common-components/abstract-list/abstract-list.component.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import {
Component, OnDestroy, OnInit,
Input, ChangeDetectorRef
@@ -23,7 +27,6 @@
import { User } from '../../../model/user';
import { SessionContext } from '../../../common/session-context';
import { ListHelperTool } from '../../../common/list-helper-tool';
-import { GridMeasure } from '../../../model/grid-measure';
import { SettingType, UserSettings, SettingValue } from '../../../model/user-settings';
import { UserSettingsService } from '../../../services/user-settings.service';
import { RoleAccess } from '../../../model/role-access';
@@ -33,7 +36,6 @@
import { StatusMainFilter } from '../../../model/status-main-filter';
import { RowDragEndEvent } from '../../../../../node_modules/ag-grid';
import { ToasterMessageService } from '../../../services/toaster-message.service';
-import { MessageServiceCustom } from '../../../services/message.service';
@Component({
selector: 'app-abstract-list',
@@ -49,7 +51,6 @@
@Input() withDatePicker = true;
@Input() withEditButtons = false;
@Input() isCollapsible = true;
- @Input() stayCollapsedGridMeasures = false;
@Input() gridId: string;
showSpinner = true;
@@ -67,20 +68,21 @@
subscription: any;
filteringSearchText: any;
statusMainFilter = new StatusMainFilter();
- gridmeasures: GridMeasure[];
+ gridmeasures: any;
+ stayCollapsedGridMeasures: boolean;
roleAccessDefinition: RoleAccess;
gridApi: any;
gridColumnApi: any;
+ calculatedPaginationPageSize: number;
protected globalGridOptions: any = <GridOptions>{
context: {
componentParent: this
},
pagination: true,
- paginationPageSize: 15,
enableSorting: true,
enableColResize: true,
floatingFilter: true,
- rowHeight: 32,
+ rowHeight: Globals.GRID_ROW_HEIGHT,
localeText: {
equals: 'ist gleich',
contains: 'enthält',
@@ -92,7 +94,10 @@
greaterThan: 'ist großer als',
lessThan: 'ist kleiner als',
inRange: 'ist zwischen',
- clearFilter: 'Filter zurücksetzen'
+ clearFilter: 'Filter zurücksetzen',
+ page: 'Seite',
+ to: 'bis',
+ of: 'von'
},
onSortChanged: (model) => {
const currentState = JSON.stringify(model.api.getSortModel());
@@ -143,8 +148,7 @@
protected daterangepickerConfig: DaterangepickerConfig,
protected roleAccessHelper: RoleAccessHelperService,
protected modeValidator: ModeValidator,
- protected toasterMessageService: ToasterMessageService,
- protected messageServiceCustom: MessageServiceCustom) {
+ protected toasterMessageService: ToasterMessageService) {
this.gridOptions = <GridOptions>{};
}
@@ -154,7 +158,6 @@
}
ngOnInit() {
- this.stayCollapsedGridMeasures = this.sessionContext.getCollapseState(Globals.GRID_MEASURE_COLLAPSABLE);
this.settingsIsDirty = this.sessionContext.getFilterDirtyState();
this.init();
}
@@ -255,7 +258,8 @@
}
-
+ protected calculatePaginationPageSize(gridMeasure: number) {
+ }
protected onRowDragEnd(e) {
console.log('onRowDragEnd', e);
diff --git a/src/app/lists/email-distribution-list/email-distribution-ag-grid-configuration.spec.ts b/src/app/lists/email-distribution-list/email-distribution-ag-grid-configuration.spec.ts
index 1bd9cf9..9f1635d 100644
--- a/src/app/lists/email-distribution-list/email-distribution-ag-grid-configuration.spec.ts
+++ b/src/app/lists/email-distribution-list/email-distribution-ag-grid-configuration.spec.ts
@@ -1,16 +1,20 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { TestBed } from '@angular/core/testing';
import { EmailDistributionListAgGridConfiguration } from './email-distribution-ag-grid-configuration';
import { SessionContext } from '../../common/session-context';
diff --git a/src/app/lists/email-distribution-list/email-distribution-ag-grid-configuration.ts b/src/app/lists/email-distribution-list/email-distribution-ag-grid-configuration.ts
index 037adf5..17e0520 100644
--- a/src/app/lists/email-distribution-list/email-distribution-ag-grid-configuration.ts
+++ b/src/app/lists/email-distribution-list/email-distribution-ag-grid-configuration.ts
@@ -1,15 +1,19 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
export class EmailDistributionListAgGridConfiguration {
static createColumnDefs() {
diff --git a/src/app/lists/email-distribution-list/email-distribution-list.component.css b/src/app/lists/email-distribution-list/email-distribution-list.component.css
index c78b871..962a643 100644
--- a/src/app/lists/email-distribution-list/email-distribution-list.component.css
+++ b/src/app/lists/email-distribution-list/email-distribution-list.component.css
@@ -1,15 +1,19 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
.email-distribution-entry-container {
padding-left: 0;
}
@@ -25,4 +29,4 @@
.email-distribution-list-grid-container {
padding: 30px 0 0 0;
}
-}
\ No newline at end of file
+}
diff --git a/src/app/lists/email-distribution-list/email-distribution-list.component.html b/src/app/lists/email-distribution-list/email-distribution-list.component.html
index 6171d3a..ab54b96 100644
--- a/src/app/lists/email-distribution-list/email-distribution-list.component.html
+++ b/src/app/lists/email-distribution-list/email-distribution-list.component.html
@@ -1,17 +1,21 @@
<!--
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
-->
+
<div class="col-md-8 email-distribution-list-grid-container">
<ag-grid-angular *ngIf="!showSpinner" style="height: 280px; margin-top: 33px;" class="ag-theme-balham" [gridOptions]="gridOptions"
[rowData]="gridMeasureDetail.listEmailDistribution">
</ag-grid-angular>
<app-loading-spinner *ngIf="showSpinner"></app-loading-spinner>
-</div>
\ No newline at end of file
+</div>
diff --git a/src/app/lists/email-distribution-list/email-distribution-list.component.spec.ts b/src/app/lists/email-distribution-list/email-distribution-list.component.spec.ts
index 44bad2b..6d4bf68 100644
--- a/src/app/lists/email-distribution-list/email-distribution-list.component.spec.ts
+++ b/src/app/lists/email-distribution-list/email-distribution-list.component.spec.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
import { FormsModule } from '@angular/forms';
import { SimpleChange } from '@angular/core';
diff --git a/src/app/lists/email-distribution-list/email-distribution-list.component.ts b/src/app/lists/email-distribution-list/email-distribution-list.component.ts
index 36c57b7..f472a80 100644
--- a/src/app/lists/email-distribution-list/email-distribution-list.component.ts
+++ b/src/app/lists/email-distribution-list/email-distribution-list.component.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { Component, Input, Output, EventEmitter } from '@angular/core';
import { AbstractListComponent } from '../common-components/abstract-list/abstract-list.component';
import { Globals } from './../../common/globals';
diff --git a/src/app/lists/grid-measures/grid-measures-ag-grid-configuration.spec.ts b/src/app/lists/grid-measures/grid-measures-ag-grid-configuration.spec.ts
index 5881202..2d7c10f 100644
--- a/src/app/lists/grid-measures/grid-measures-ag-grid-configuration.spec.ts
+++ b/src/app/lists/grid-measures/grid-measures-ag-grid-configuration.spec.ts
@@ -1,17 +1,21 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
-import { TestBed, inject } from '@angular/core/testing';
+
+import { TestBed } from '@angular/core/testing';
import { GridMeasuresAgGridConfiguration } from './grid-measures-ag-grid-configuration';
import { SessionContext } from '../../common/session-context';
import { BRANCHES } from '../../test-data/branches';
diff --git a/src/app/lists/grid-measures/grid-measures-ag-grid-configuration.ts b/src/app/lists/grid-measures/grid-measures-ag-grid-configuration.ts
index ac7be03..044823f 100644
--- a/src/app/lists/grid-measures/grid-measures-ag-grid-configuration.ts
+++ b/src/app/lists/grid-measures/grid-measures-ag-grid-configuration.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { FormattedTimestampPipe } from '../../common-components/pipes/formatted-timestamp.pipe';
import { SessionContext } from '../../common/session-context';
import { Globals } from '../../common/globals';
@@ -27,7 +31,8 @@
suppressFilter: true,
cellClass: 'grid-measure-mode',
colId: 'modeButton',
- minWidth: 100
+ minWidth: 100,
+ maxWidth: 150
},
{
headerName: 'Beginnt am',
@@ -56,7 +61,8 @@
return null;
}
},
- minWidth: 180,
+ minWidth: 150,
+ maxWidth: 300,
filter: 'agDateColumnFilter',
filterParams: {
inRangeInclusive: true,
@@ -90,7 +96,8 @@
headerClass: 'grid-measures-header',
cellClass: 'grid-measure-tab-id',
colId: 'descriptiveId',
- minWidth: 100
+ minWidth: 150,
+ maxWidth: 300
},
{
headerName: 'Sparte',
@@ -124,7 +131,8 @@
headerClass: 'grid-measures-header grid-measure-tab-branche',
cellClass: 'grid-measure-tab-branche',
colId: 'branchId',
- minWidth: 110
+ minWidth: 85,
+ maxWidth: 120
},
{
headerName: 'Titel der Maßnahme',
@@ -133,8 +141,8 @@
headerClass: 'grid-measures-header',
cellClass: 'grid-measure-tab-title',
colId: 'title',
- minWidth: 530,
- maxWidth: 700
+ minWidth: 300,
+ maxWidth: 625
},
{
headerName: 'Name des Erstellers',
@@ -142,7 +150,8 @@
headerClass: 'grid-measures-header',
cellClass: 'grid-measure-tab-createUser',
colId: 'createUser',
- minWidth: 295
+ minWidth: 175,
+ maxWidth: 300
},
{
headerName: 'Betroffenes Objekt / Betriebsmittel',
@@ -150,7 +159,8 @@
headerClass: 'grid-measures-header',
cellClass: 'grid-measure-tab-affectedResource',
colId: 'affectedResource',
- minWidth: 300
+ minWidth: 275,
+ maxWidth: 400
},
{
headerName: 'Status',
@@ -170,7 +180,8 @@
cellClass: 'grid-measure-tab-status',
filter: 'agTextColumnFilter',
colId: 'statusId',
- minWidth: 171
+ minWidth: 150,
+ maxWidth: 200
}
];
}
@@ -185,7 +196,7 @@
if (!params || !params.data) {
return;
}
- const isEditMode = params.context.componentParent.modeValidator.isEditModeAllowed(params.data);
+ const isEditMode = params.context.componentParent.modeValidator.isEditModeAllowed(params.data.statusId);
const isCancelAllowed = params.context.componentParent.modeValidator.isCancelAllowed(params.data);
const span = document.createElement('span');
const modeHtmlTemplate = isEditMode ? '<button id="modeButton" class="btn btn-primary btn-sm" ' + editBtnStyle + ' >' +
diff --git a/src/app/lists/grid-measures/grid-measures.component.css b/src/app/lists/grid-measures/grid-measures.component.css
index 5047cef..e6341a2 100644
--- a/src/app/lists/grid-measures/grid-measures.component.css
+++ b/src/app/lists/grid-measures/grid-measures.component.css
@@ -1,15 +1,19 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
.ag-theme-balham,
ag-header {
font-size: 14px;
diff --git a/src/app/lists/grid-measures/grid-measures.component.html b/src/app/lists/grid-measures/grid-measures.component.html
index d90e11a..e49c3a5 100644
--- a/src/app/lists/grid-measures/grid-measures.component.html
+++ b/src/app/lists/grid-measures/grid-measures.component.html
@@ -1,19 +1,25 @@
<!--
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
-->
+
<div class="panel panel-default" style="width:100%;">
<div class="panel-heading" style="display: inline-flex; width: 100%;padding: 0px 0px 0px 0px">
<h4 class="panel-title" style="width: 100%;padding: 10px 15px">
- <a *ngIf="isCollapsible" data-toggle="collapse" href="#collapse4" (click)="sessionContext.setCollapseState(!stayCollapsedGridMeasures, Globals.GRID_MEASURE_COLLAPSABLE)">Aktuelle
+ <a [ngClass]="(!isExpanded)?'glyphicon glyphicon-chevron-down':'glyphicon glyphicon-chevron-up'" href="#collapse4"
+ (click)="isExpanded = !isExpanded" data-toggle="collapse"></a>
+ <a *ngIf="isCollapsible" data-toggle="collapse" href="#collapse4" (click)="isExpanded = !isExpanded">Aktuelle
Netzmaßnahmen
</a>
<div *ngIf="!isCollapsible">Aktuelle Netzmaßnahmen</div>
@@ -39,17 +45,18 @@
</div>
<div class="save-filter ">
<button [disabled]="!settingsIsDirty" type="button " class="btn btn-default btn-sm " (click)="saveSettings()
- " title="Einstellungen speichern ">
+ "
+ title="Einstellungen speichern ">
<i class="fa fa-floppy-o fa-lg " aria-hidden="true "></i>Filter Speichern
</button>
</div>
</div>
- <div id="collapse4" style="width:100%; " class="panel-collapse collapse in " [ngClass]="{ 'in': !isCollapsible || !stayCollapsedGridMeasures} ">
- <div id="grid-wrapper " class="panel-body " style="width:100%; ">
- <ag-grid-angular *ngIf="!showSpinner " [style.height.px]="calcGridHeight()" class="ag-theme-balham" [gridOptions]="gridOptions"
+ <div id="collapse4" style="width:100%;" class="panel-collapse collapse in " [ngClass]="{ 'in': isCollapsible}">
+ <div id="grid-wrapper" class="panel-body" style="width:100%;">
+ <ag-grid-angular *ngIf="!showSpinner" [style.height.px]="calcGridHeight()" class="ag-theme-balham" [gridOptions]="gridOptions"
[rowData]="gridmeasures">
</ag-grid-angular>
<app-loading-spinner *ngIf="showSpinner "></app-loading-spinner>
</div>
</div>
-</div>
\ No newline at end of file
+</div>
diff --git a/src/app/lists/grid-measures/grid-measures.component.spec.ts b/src/app/lists/grid-measures/grid-measures.component.spec.ts
index f6b9f08..c6a2605 100644
--- a/src/app/lists/grid-measures/grid-measures.component.spec.ts
+++ b/src/app/lists/grid-measures/grid-measures.component.spec.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { ComponentFixture, TestBed, async, fakeAsync, tick } from '@angular/core/testing';
import { FormsModule } from '@angular/forms';
import { Router } from '@angular/router';
@@ -20,7 +24,6 @@
import { GridMeasureService } from '../../services/grid-measure.service';
import { ReminderService } from '../../services/reminder.service';
import { LockService } from '../../services/lock.service';
-import { MessageServiceCustom } from '../../services/message.service';
import { UserSettingsService } from '../../services/user-settings.service';
import { GRIDMEASURE } from '../../test-data/grid-measures';
import { AbstractMockObservableService } from '../../testing/abstract-mock-observable.service';
@@ -130,7 +133,6 @@
providers: [
ModeValidator,
{ provide: SessionContext, useValue: sessionContext },
- MessageServiceCustom,
{ provide: UserSettingsService, useValue: mockUserSettingService },
{ provide: Router, useValue: routerStub },
{ provide: GridMeasureService, useValue: mockGridMeasureService },
diff --git a/src/app/lists/grid-measures/grid-measures.component.ts b/src/app/lists/grid-measures/grid-measures.component.ts
index eb2a771..af8ea89 100644
--- a/src/app/lists/grid-measures/grid-measures.component.ts
+++ b/src/app/lists/grid-measures/grid-measures.component.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { Component } from '@angular/core';
import { AbstractListComponent } from '../common-components/abstract-list/abstract-list.component';
import { ErrorType } from '../../common/enums';
@@ -26,9 +30,8 @@
export class GridMeasuresComponent extends AbstractListComponent implements OnInit {
Globals = Globals;
- gridmeasures: any;
currentDate = new Date();
-
+ isExpanded = true;
isCancelClosedFilterButtons: boolean;
windowHeight: number = window.innerHeight;
@@ -88,10 +91,21 @@
calcGridHeight(): number {
const gridOffset = document.getElementsByTagName('ag-grid-angular')[0].getBoundingClientRect().top;
- const appOffset = 130;
-
- return this.windowHeight - appOffset - gridOffset;
+ const appOffset = 80;
+ const gridHeight = this.windowHeight - appOffset - gridOffset;
+ this.calculatePaginationPageSize(gridHeight);
+ return gridHeight;
}
+
+ calculatePaginationPageSize(gridHeight: number) {
+ const headerAndBottomRows = 4;
+ this.calculatedPaginationPageSize = Math.round(gridHeight / Globals.GRID_ROW_HEIGHT - headerAndBottomRows);
+ const localGridOptions = <GridOptions>{
+ paginationPageSize: this.calculatedPaginationPageSize
+ };
+ this.gridOptions = Object.assign(this.globalGridOptions, localGridOptions);
+ }
+
changeAllSelection(): void {
if (this.selectAll) {
for (const info of this.gridmeasures) {
diff --git a/src/app/lists/status-changes/status-changes-ag-grid-configuration.spec.ts b/src/app/lists/status-changes/status-changes-ag-grid-configuration.spec.ts
index aaea02a..7085403 100644
--- a/src/app/lists/status-changes/status-changes-ag-grid-configuration.spec.ts
+++ b/src/app/lists/status-changes/status-changes-ag-grid-configuration.spec.ts
@@ -1,16 +1,20 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { TestBed, inject } from '@angular/core/testing';
import { StatusChangesAgGridConfiguration } from './status-changes-ag-grid-configuration';
import { SessionContext } from '../../common/session-context';
diff --git a/src/app/lists/status-changes/status-changes-ag-grid-configuration.ts b/src/app/lists/status-changes/status-changes-ag-grid-configuration.ts
index 8b075b5..fa0d7ec 100644
--- a/src/app/lists/status-changes/status-changes-ag-grid-configuration.ts
+++ b/src/app/lists/status-changes/status-changes-ag-grid-configuration.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { FormattedTimestampPipe } from '../../common-components/pipes/formatted-timestamp.pipe';
import { SessionContext } from '../../common/session-context';
@@ -58,17 +62,6 @@
colId: 'modUser',
width: 300
}
- /* ,
- {
- headerName: 'Bemerkung',
- filter: 'agTextColumnFilter',
- field: 'remark',
- headerClass: 'grid-measures-header',
- cellClass: 'grid-measure-tab-remark',
- colId: 'remark',
- minWidth: 530
- }
- */
];
}
diff --git a/src/app/lists/status-changes/status-changes.component.css b/src/app/lists/status-changes/status-changes.component.css
index 1998c70..0a7c0ae 100644
--- a/src/app/lists/status-changes/status-changes.component.css
+++ b/src/app/lists/status-changes/status-changes.component.css
@@ -1,11 +1,14 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
-*/
\ No newline at end of file
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
diff --git a/src/app/lists/status-changes/status-changes.component.html b/src/app/lists/status-changes/status-changes.component.html
index c5d6c07..8105c6b 100644
--- a/src/app/lists/status-changes/status-changes.component.html
+++ b/src/app/lists/status-changes/status-changes.component.html
@@ -1,29 +1,37 @@
<!--
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
-->
+
<div class="panel panel-default" style="width:100%;">
<div class="panel-heading" style="display: inline-flex; width: 100%;padding: 0px 0px 0px 0px">
<h4 class="panel-title" style="width: 100%;padding: 10px 15px">
- <a *ngIf="isStatusCollapsed" data-toggle="collapse" href="#collapse5">Statuswechsel</a>
+ <a [ngClass]="(!isExpandedStatus)?'glyphicon glyphicon-chevron-down':'glyphicon glyphicon-chevron-up'"
+ data-toggle="collapse" href="#collapse5" (click)="isExpandedStatus = !isExpandedStatus"></a>
+ <a *ngIf="isStatusCollapsed" data-toggle="collapse" href="#collapse5" (click)="isExpandedStatus = !isExpandedStatus">Statuswechsel</a>
+
<div *ngIf="!isStatusCollapsed">Statuswechsel</div>
</h4>
</div>
<div id="collapse5" style="width:100%;" class="panel-collapse collapse in" [ngClass]="{'in': !isStatusCollapsed }">
<div id="grid-wrapper" class="panel-body" style="width:100%;">
- <ag-grid-angular *ngIf="!showSpinner" style="height: 600px;" class="ag-theme-balham" [gridOptions]="gridOptions" [rowData]="statuschanges">
+ <ag-grid-angular *ngIf="!showSpinner" style="height: 600px;" class="ag-theme-balham" [gridOptions]="gridOptions"
+ [rowData]="statuschanges">
</ag-grid-angular>
<app-loading-spinner *ngIf="showSpinner"></app-loading-spinner>
</div>
</div>
-</div>
\ No newline at end of file
+</div>
diff --git a/src/app/lists/status-changes/status-changes.component.spec.ts b/src/app/lists/status-changes/status-changes.component.spec.ts
index 732f3ba..ee124c7 100644
--- a/src/app/lists/status-changes/status-changes.component.spec.ts
+++ b/src/app/lists/status-changes/status-changes.component.spec.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { ComponentFixture, TestBed, async, fakeAsync, tick } from '@angular/core/testing';
import { FormsModule } from '@angular/forms';
import { Router } from '@angular/router';
@@ -16,15 +20,11 @@
import { FormattedDatePipe } from '../../common-components/pipes/formatted-date.pipe';
import { FormattedTimestampPipe } from '../../common-components/pipes/formatted-timestamp.pipe';
import { StringToDatePipe } from '../../common-components/pipes/string-to-date.pipe';
-import { BannerMessage } from '../../common/banner-message';
-import { BannerMessageStatusEn } from '../../common/enums';
import { Lock } from '../../model/lock';
import { GridMeasureService } from '../../services/grid-measure.service';
import { ReminderService } from '../../services/reminder.service';
import { LockService } from '../../services/lock.service';
-import { MessageServiceCustom } from '../../services/message.service';
import { UserSettingsService } from '../../services/user-settings.service';
-import { GRIDMEASURE } from '../../test-data/grid-measures';
import { AbstractMockObservableService } from '../../testing/abstract-mock-observable.service';
import { MockComponent } from '../../testing/mock.component';
import { AbstractListComponent } from '../common-components/abstract-list/abstract-list.component';
@@ -135,7 +135,6 @@
providers: [
ModeValidator,
{ provide: SessionContext, useValue: sessionContext },
- MessageServiceCustom,
{ provide: UserSettingsService, useValue: mockUserSettingService },
{ provide: Router, useValue: routerStub },
{ provide: GridMeasureService, useValue: mockGridMeasureService },
diff --git a/src/app/lists/status-changes/status-changes.component.ts b/src/app/lists/status-changes/status-changes.component.ts
index 4471d50..eb6e05d 100644
--- a/src/app/lists/status-changes/status-changes.component.ts
+++ b/src/app/lists/status-changes/status-changes.component.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { Component } from '@angular/core';
import { AbstractListComponent } from '../common-components/abstract-list/abstract-list.component';
import { ErrorType } from '../../common/enums';
@@ -28,6 +32,7 @@
statuschanges: any;
currentDate = new Date();
isStatusCollapsed = true;
+ isExpandedStatus = false;
initAgGrid() {
const localGridOptions = <GridOptions>{
diff --git a/src/app/lists/steps/steps-ag-grid-configuration.spec.ts b/src/app/lists/steps/steps-ag-grid-configuration.spec.ts
index 392bb44..5aaa485 100644
--- a/src/app/lists/steps/steps-ag-grid-configuration.spec.ts
+++ b/src/app/lists/steps/steps-ag-grid-configuration.spec.ts
@@ -1,16 +1,20 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { TestBed } from '@angular/core/testing';
import { StepsAgGridConfiguration } from './steps-ag-grid-configuration';
@@ -41,18 +45,25 @@
{
componentParent:
{
+ gridMeasureDetail: { statusId: 1 },
sessionContext: {
- isLocked: function (data: any) { return true; }
+ isLocked: function (data: any) { return true; },
+ isReadOnlyForStatus: function (data: any) { return true; }
},
modeValidator:
{
isEditModeAllowed: function (data: any) { return true; }
},
- deleteStep: function (data: any) { return true; }
+ steps: {
+ deleteStep: function (data: any) { return true; }
+ }
}
},
params: {},
- data: { id: 1, sortorder: 1, switchingObject: 'Schalter 1', targetState: 'aus', singleGridmeasureId: 3, delete: false }
+ data: {
+ id: 1, sortorder: 1, switchingObject: 'Schalter 1', targetState: 'aus',
+ singleGridmeasureId: 3, delete: false
+ }
}
);
diff --git a/src/app/lists/steps/steps-ag-grid-configuration.ts b/src/app/lists/steps/steps-ag-grid-configuration.ts
index 5a453c2..36f549d 100644
--- a/src/app/lists/steps/steps-ag-grid-configuration.ts
+++ b/src/app/lists/steps/steps-ag-grid-configuration.ts
@@ -1,15 +1,19 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
export class StepsAgGridConfiguration {
@@ -99,7 +103,8 @@
}
private static modeCellRenderer(params) {
- const isEditMode = params.context.componentParent.modeValidator.isEditModeAllowed(params.context.componentParent.gridMeasureDetail);
+ const isEditMode = params.context.componentParent.modeValidator.isEditModeAllowed(
+ params.context.componentParent.gridMeasureDetail.statusId);
const span = document.createElement('span');
const modeHtmlTemplate = (isEditMode && !params.data.delete) &&
!params.context.componentParent.sessionContext.isLocked() &&
diff --git a/src/app/lists/steps/steps.component.css b/src/app/lists/steps/steps.component.css
index 1998c70..0a7c0ae 100644
--- a/src/app/lists/steps/steps.component.css
+++ b/src/app/lists/steps/steps.component.css
@@ -1,11 +1,14 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
-*/
\ No newline at end of file
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
diff --git a/src/app/lists/steps/steps.component.html b/src/app/lists/steps/steps.component.html
index 0b2566e..2d06034 100644
--- a/src/app/lists/steps/steps.component.html
+++ b/src/app/lists/steps/steps.component.html
@@ -1,15 +1,19 @@
<!--
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
-->
+
<label>Schrittsequenzen</label>
<ag-grid-angular *ngIf="!showSpinner" style="height: 400px;" class="ag-theme-balham" [gridOptions]="gridOptions" [rowData]="singleGridMeasure.listSteps">
</ag-grid-angular>
-<app-loading-spinner *ngIf="showSpinner"></app-loading-spinner>
\ No newline at end of file
+<app-loading-spinner *ngIf="showSpinner"></app-loading-spinner>
diff --git a/src/app/lists/steps/steps.component.spec.ts b/src/app/lists/steps/steps.component.spec.ts
index 0cfc1fd..d67019d 100644
--- a/src/app/lists/steps/steps.component.spec.ts
+++ b/src/app/lists/steps/steps.component.spec.ts
@@ -1,28 +1,29 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
-import { ComponentFixture, TestBed, async, fakeAsync, tick } from '@angular/core/testing';
+
+import { ComponentFixture, TestBed, async } from '@angular/core/testing';
import { FormsModule } from '@angular/forms';
import { Router } from '@angular/router';
import { DaterangepickerConfig } from 'ng2-daterangepicker';
import { FormattedDatePipe } from '../../common-components/pipes/formatted-date.pipe';
import { FormattedTimestampPipe } from '../../common-components/pipes/formatted-timestamp.pipe';
import { StringToDatePipe } from '../../common-components/pipes/string-to-date.pipe';
-import { BannerMessage } from '../../common/banner-message';
-import { BannerMessageStatusEn } from '../../common/enums';
import { Lock } from '../../model/lock';
import { GridMeasureService } from '../../services/grid-measure.service';
import { ReminderService } from '../../services/reminder.service';
import { LockService } from '../../services/lock.service';
-import { MessageServiceCustom } from '../../services/message.service';
import { UserSettingsService } from '../../services/user-settings.service';
import { GRIDMEASURE } from '../../test-data/grid-measures';
import { AbstractMockObservableService } from '../../testing/abstract-mock-observable.service';
@@ -128,7 +129,6 @@
providers: [
ModeValidator,
{ provide: SessionContext, useValue: sessionContext },
- MessageServiceCustom,
{ provide: UserSettingsService, useValue: mockUserSettingService },
{ provide: Router, useValue: routerStub },
{ provide: GridMeasureService, useValue: mockGridMeasureService },
@@ -151,60 +151,6 @@
expect(component).toBeTruthy();
});
- xit('should call init', async(() => {
- const abstractComp: any = component; // used to access privates
- spyOn((component as any), 'init').and.callThrough();
- spyOn(component, 'initAgGrid').and.callThrough();
- spyOn(component, 'retrieveData').and.callThrough();
- spyOn(abstractComp, 'initAgGridStructure').and.callThrough();
- sessionContext.setCurrUser(USERS[2]);
- sessionContext.setUserAuthenticated(true);
- mockGridMeasureService.content = JSON.parse(JSON.stringify(GRIDMEASURE[0].listSingleGridmeasures[0].listSteps));
- mockReminderService.content = [];
- mockUserSettingService.content = {};
- component.user = USERS[1];
- component.gridId = 'steps';
- component.gridMeasureDetail = JSON.parse(JSON.stringify(GRIDMEASURE[0]));
- component.singleGridMeasure = GRIDMEASURE[0].listSingleGridmeasures[0];
-
- component.sortingState = {
- column: 'shorty',
- counter: 1,
- defaultState: true,
- isDesc: true
- };
-
- component.filteringSearchText = {
- branchId: 'filty',
- title: 'fix',
- statusId: 'foxy'
- };
-
- mockUserSettingService.savedUserSettings = {};
-
- abstractComp.saveSettings();
- fixture.detectChanges();
- component.ngOnInit();
- fixture.detectChanges();
- fixture.whenStable().then(() => {
- fixture.detectChanges();
-
- expect((component as any).init).toHaveBeenCalled();
- expect(component.initAgGrid).toHaveBeenCalled();
- expect(component.retrieveData).toHaveBeenCalled();
- expect((component as any).gridOptions).toBeTruthy();
-
- // (component as any).onGridReady({type: 'gridReady', api: GridApi, columnApi: ColumnApi});
-
- fixture.whenRenderingDone().then(() => {
- fixture.detectChanges();
- expect((component as any).gridOptions).toBeTruthy();
- // expect((component as any).gridApi).toBeTruthy();
- // expect(abstractComp.initAgGridStructure).toHaveBeenCalled();
- });
- });
- }));
-
it('should retrieveData (steps) on init', async(() => {
mockGridMeasureService.content = JSON.parse(JSON.stringify(GRIDMEASURE[0].listSingleGridmeasures[0].listSteps));
mockReminderService.content = [];
@@ -236,42 +182,6 @@
});
}));
- xit('should raise an message on error in retrieveData (gridmeasures)', fakeAsync(() => {
- let msgRisen = false;
- sessionContext.setUserAuthenticated(true);
- mockGridMeasureService.error = 'Error in GridmeasureService';
- const abstractComp: any = component; // used to access privates
- component.user = USERS[1];
- component.gridId = 'steps';
- component.gridMeasureDetail = GRIDMEASURE[0];
- component.singleGridMeasure = GRIDMEASURE[0].listSingleGridmeasures[0];
- component.sortingState = {
- column: 'shorty',
- counter: 1,
- defaultState: true,
- isDesc: true
- };
- component.filteringSearchText = {
- branchId: 'filty',
- title: 'fix',
- statusId: 'foxy'
- };
- mockUserSettingService.savedUserSettings = {};
-
- (component as any).messageService.errorOccured$.subscribe((msg: BannerMessage) => {
- expect(msg.status).toBe(BannerMessageStatusEn.error);
- msgRisen = true;
- });
-
- abstractComp.saveSettings();
- component.retrieveData();
- fixture.detectChanges();
- tick();
- expect(msgRisen).toBeTruthy('Error message was risen');
-
- }));
-
-
it('should add step to deleted list', async(() => {
mockGridMeasureService.content = JSON.parse(JSON.stringify(GRIDMEASURE[0].listSingleGridmeasures[0].listSteps));
mockReminderService.content = [];
diff --git a/src/app/lists/steps/steps.component.ts b/src/app/lists/steps/steps.component.ts
index 537192b..441cd0d 100644
--- a/src/app/lists/steps/steps.component.ts
+++ b/src/app/lists/steps/steps.component.ts
@@ -1,16 +1,18 @@
-import { OnChanges, SimpleChanges } from '@angular/core';
/*
-******************************************************************************
-* Copyright 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
-import { Component, OnInit, Input } from '@angular/core';
+import { Component, Input } from '@angular/core';
import { AbstractListComponent } from '../common-components/abstract-list/abstract-list.component';
import { Globals } from './../../common/globals';
import { GridOptions } from 'ag-grid/dist/lib/entities/gridOptions';
@@ -46,7 +48,10 @@
onRowDragEnd: (ev: RowDragEvent) => {
this.setNewSortOrderAfterDrag();
},
- pagination: false
+ pagination: false,
+ enableSorting: false,
+ enterMovesDown: true,
+ enterMovesDownAfterEdit: true
};
this.gridOptions = Object.assign(this.globalGridOptions, localGridOptions);
diff --git a/src/app/model/TreeModelImpl.ts b/src/app/model/TreeModelImpl.ts
index 92a864f..aff5580 100644
--- a/src/app/model/TreeModelImpl.ts
+++ b/src/app/model/TreeModelImpl.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { TreeModel } from 'ng2-tree';
export class TreeModelImpl implements TreeModel {
diff --git a/src/app/model/backend-settings.ts b/src/app/model/backend-settings.ts
index b575f7f..33b10a1 100644
--- a/src/app/model/backend-settings.ts
+++ b/src/app/model/backend-settings.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
export class BackendSettings {
reminderPeriod: number;
appointmentRepetition: AppointmentRepetition[];
diff --git a/src/app/model/branch-level.ts b/src/app/model/branch-level.ts
index b564810..6989f0f 100644
--- a/src/app/model/branch-level.ts
+++ b/src/app/model/branch-level.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
export class BranchLevel {
id?: number;
name?: string;
diff --git a/src/app/model/branch.ts b/src/app/model/branch.ts
index 817887d..8ce4d02 100644
--- a/src/app/model/branch.ts
+++ b/src/app/model/branch.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
export class Branch {
id: number;
name: string;
diff --git a/src/app/model/cost-center.ts b/src/app/model/cost-center.ts
index 1cb6ff5..1797797 100644
--- a/src/app/model/cost-center.ts
+++ b/src/app/model/cost-center.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
export class CostCenter {
id?: number;
name?: string;
diff --git a/src/app/model/document.ts b/src/app/model/document.ts
index e6e4378..779a8f6 100644
--- a/src/app/model/document.ts
+++ b/src/app/model/document.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
export class Document {
id: number;
documentName: string;
diff --git a/src/app/model/email-distribution-entry.ts b/src/app/model/email-distribution-entry.ts
index 1e98d8d..9c79f8d 100644
--- a/src/app/model/email-distribution-entry.ts
+++ b/src/app/model/email-distribution-entry.ts
@@ -1,15 +1,19 @@
/*
-******************************************************************************
-* Copyright 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
export class EmailDistributionEntry {
id?: number;
emailAddress?: string;
diff --git a/src/app/model/grid-config.ts b/src/app/model/grid-config.ts
index 8cf036d..18005fd 100644
--- a/src/app/model/grid-config.ts
+++ b/src/app/model/grid-config.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
export class GridConfig {
skipForApproval: boolean;
endAfterApproved: boolean;
diff --git a/src/app/model/grid-measure.ts b/src/app/model/grid-measure.ts
index 4723b07..8a87a7b 100644
--- a/src/app/model/grid-measure.ts
+++ b/src/app/model/grid-measure.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { SingleGridMeasure } from './single-grid-measure';
import { EmailDistributionEntry } from './email-distribution-entry';
@@ -27,20 +31,12 @@
statusId?: number;
switchingObject?: string;
costCenter?: string;
- // responsibleOnSiteName?: string; // TODO: gehört hier nicht rein, ist ein Attribut der SGM
- // responsibleOnSiteDepartment?: string; // TODO: gehört hier nicht rein, ist ein Attribut der SGM
approvalBy?: string;
areaOfSwitching?: string;
appointmentRepetition?: string;
appointmentStartdate?: string;
appointmentNumberOf?: number;
- plannedStarttimeFirstSequence?: string;
plannedStarttimeFirstSinglemeasure?: string;
- plannedEndtimeLastSinglemeasure?: string;
- plannedEndtimeGridmeasure?: string;
- starttimeFirstSequence?: string;
- starttimeFirstSinglemeasure?: string;
- endtimeLastSinglemeasure?: string;
endtimeGridmeasure?: string;
timeOfReallocation?: string;
description?: string;
diff --git a/src/app/model/jwt-payload.ts b/src/app/model/jwt-payload.ts
index 9f009b2..7b73b93 100644
--- a/src/app/model/jwt-payload.ts
+++ b/src/app/model/jwt-payload.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
/* Model for the contents of the accessToken, decoded and parsed. It is not completed,
only the properties actually used are defined. To be completed if needed. */
export class JwtPayload {
diff --git a/src/app/model/lock.ts b/src/app/model/lock.ts
index 2e92ecc..fd42ccf 100644
--- a/src/app/model/lock.ts
+++ b/src/app/model/lock.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
export class Lock {
id: number;
key: number;
diff --git a/src/app/model/power-system-resource.ts b/src/app/model/power-system-resource.ts
index 0fcdee1..f356c3f 100644
--- a/src/app/model/power-system-resource.ts
+++ b/src/app/model/power-system-resource.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
export class PowerSystemResource {
cimId: string;
cimName?: string;
diff --git a/src/app/model/role-access.ts b/src/app/model/role-access.ts
index ba6d801..ce618dd 100644
--- a/src/app/model/role-access.ts
+++ b/src/app/model/role-access.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
export class RoleAccess {
editRoles: Array<EditRoleItems>;
controls: Array<Controls>;
diff --git a/src/app/model/single-grid-measure.ts b/src/app/model/single-grid-measure.ts
index 3d77915..02a05d4 100644
--- a/src/app/model/single-grid-measure.ts
+++ b/src/app/model/single-grid-measure.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { PowerSystemResource } from './power-system-resource';
import { Step } from './step';
diff --git a/src/app/model/status-change.ts b/src/app/model/status-change.ts
index 15bdce5..f41fac5 100644
--- a/src/app/model/status-change.ts
+++ b/src/app/model/status-change.ts
@@ -1,15 +1,19 @@
/*
-******************************************************************************
-* Copyright 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
export class StatusChange {
statusId?: number;
modDate?: string;
diff --git a/src/app/model/status-main-filter.ts b/src/app/model/status-main-filter.ts
index aa15064..8775b50 100644
--- a/src/app/model/status-main-filter.ts
+++ b/src/app/model/status-main-filter.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
export class StatusMainFilterItem {
isClosedStatusActive = false;
isCanceledStatusActive = false;
diff --git a/src/app/model/status.ts b/src/app/model/status.ts
index 1261581..d5b034b 100644
--- a/src/app/model/status.ts
+++ b/src/app/model/status.ts
@@ -1,15 +1,20 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
export class Status {
id: number;
name: string;
+ colorCode: string;
}
diff --git a/src/app/model/step.ts b/src/app/model/step.ts
index bd8c2a5..2dc6d06 100644
--- a/src/app/model/step.ts
+++ b/src/app/model/step.ts
@@ -1,15 +1,19 @@
/*
-******************************************************************************
-* Copyright 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
export class Step {
id?: number;
sortorder?: number;
diff --git a/src/app/model/territory.ts b/src/app/model/territory.ts
index 3e765a6..25f0914 100644
--- a/src/app/model/territory.ts
+++ b/src/app/model/territory.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
export class Territory {
id: number;
name: string;
diff --git a/src/app/model/user-settings.ts b/src/app/model/user-settings.ts
index a3c04cb..ccbd9f8 100644
--- a/src/app/model/user-settings.ts
+++ b/src/app/model/user-settings.ts
@@ -1,15 +1,19 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
export class UserSettings {
username: string;
settingType: SettingType;
diff --git a/src/app/model/user.ts b/src/app/model/user.ts
index a1ce997..707cf35 100644
--- a/src/app/model/user.ts
+++ b/src/app/model/user.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
export class User {
id: string;
itemName: string;
diff --git a/src/app/model/version-info.ts b/src/app/model/version-info.ts
index 8b9f277..033b265 100644
--- a/src/app/model/version-info.ts
+++ b/src/app/model/version-info.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
export class VersionInfo {
public backendVersion?: string;
public dbVersion?: string;
diff --git a/src/app/pages/cancel-grid-measure/cancel-grid-measure.component.css b/src/app/pages/cancel-grid-measure/cancel-grid-measure.component.css
index cf6778b..81885d2 100644
--- a/src/app/pages/cancel-grid-measure/cancel-grid-measure.component.css
+++ b/src/app/pages/cancel-grid-measure/cancel-grid-measure.component.css
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
div.panel-default {
margin: 1px 1px;
}
diff --git a/src/app/pages/cancel-grid-measure/cancel-grid-measure.component.html b/src/app/pages/cancel-grid-measure/cancel-grid-measure.component.html
index 49a4b48..cdf734b 100644
--- a/src/app/pages/cancel-grid-measure/cancel-grid-measure.component.html
+++ b/src/app/pages/cancel-grid-measure/cancel-grid-measure.component.html
@@ -1,14 +1,18 @@
<!--
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
-->
+
<div class="grid-measure-body ">
<div class="maincontent">
<div class="panel panel-default">
diff --git a/src/app/pages/cancel-grid-measure/cancel-grid-measure.component.spec.ts b/src/app/pages/cancel-grid-measure/cancel-grid-measure.component.spec.ts
index 466ee02..7c42f87 100644
--- a/src/app/pages/cancel-grid-measure/cancel-grid-measure.component.spec.ts
+++ b/src/app/pages/cancel-grid-measure/cancel-grid-measure.component.spec.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { async, ComponentFixture, TestBed, fakeAsync, tick } from '@angular/core/testing';
import { CancelGridMeasureComponent } from './cancel-grid-measure.component';
diff --git a/src/app/pages/cancel-grid-measure/cancel-grid-measure.component.ts b/src/app/pages/cancel-grid-measure/cancel-grid-measure.component.ts
index 88fac36..eac86a4 100644
--- a/src/app/pages/cancel-grid-measure/cancel-grid-measure.component.ts
+++ b/src/app/pages/cancel-grid-measure/cancel-grid-measure.component.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { Component, OnInit } from '@angular/core';
import { Globals } from '../../common/globals';
import { SessionContext } from '../../common/session-context';
diff --git a/src/app/pages/email-distribution-entry/email-distribution-entry.component.css b/src/app/pages/email-distribution-entry/email-distribution-entry.component.css
index 4cb6ce1..0268f95 100644
--- a/src/app/pages/email-distribution-entry/email-distribution-entry.component.css
+++ b/src/app/pages/email-distribution-entry/email-distribution-entry.component.css
@@ -1,15 +1,19 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
@import url("../grid-measure-detail/grid-measure-detail.component.css");
#EmailDistributionEntry-head {
display: inline-block
@@ -41,4 +45,4 @@
.email-distribution-list-grid-container {
padding: 0;
}
-}
\ No newline at end of file
+}
diff --git a/src/app/pages/email-distribution-entry/email-distribution-entry.component.html b/src/app/pages/email-distribution-entry/email-distribution-entry.component.html
index 909e384..da90266 100644
--- a/src/app/pages/email-distribution-entry/email-distribution-entry.component.html
+++ b/src/app/pages/email-distribution-entry/email-distribution-entry.component.html
@@ -1,14 +1,18 @@
<!--
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
-->
+
<div #emailDistributionEntryFormContainer class="col-md-4 email-distribution-entry-container">
<form #emailDistributionEntryForm="ngForm" (change)="onEmailDistributionEntryFormValidation(emailDistributionEntryForm.form.valid)"
style="width: 100%">
@@ -38,4 +42,4 @@
</div>
</fieldset>
</form>
-</div>
\ No newline at end of file
+</div>
diff --git a/src/app/pages/email-distribution-entry/email-distribution-entry.component.spec.ts b/src/app/pages/email-distribution-entry/email-distribution-entry.component.spec.ts
index e053325..4d237a5 100644
--- a/src/app/pages/email-distribution-entry/email-distribution-entry.component.spec.ts
+++ b/src/app/pages/email-distribution-entry/email-distribution-entry.component.spec.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
import { FormsModule } from '@angular/forms';
import { SimpleChange } from '@angular/core';
diff --git a/src/app/pages/email-distribution-entry/email-distribution-entry.component.ts b/src/app/pages/email-distribution-entry/email-distribution-entry.component.ts
index efe9100..2ab11d6 100644
--- a/src/app/pages/email-distribution-entry/email-distribution-entry.component.ts
+++ b/src/app/pages/email-distribution-entry/email-distribution-entry.component.ts
@@ -1,13 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-******************************************************************************
- */
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
import {
Component, OnInit, Input, OnChanges, SimpleChanges, ViewChild, AfterViewChecked,
AfterViewInit, ElementRef, OnDestroy
diff --git a/src/app/pages/grid-config-modifier/grid-config-modifier.component.css b/src/app/pages/grid-config-modifier/grid-config-modifier.component.css
index 02df5c2..3e3bbf6 100644
--- a/src/app/pages/grid-config-modifier/grid-config-modifier.component.css
+++ b/src/app/pages/grid-config-modifier/grid-config-modifier.component.css
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
#statusSwitches {
padding-left: 50px;
width: 50%;
@@ -73,4 +77,4 @@
.slider.round:before {
border-radius: 50%;
-}
\ No newline at end of file
+}
diff --git a/src/app/pages/grid-config-modifier/grid-config-modifier.component.html b/src/app/pages/grid-config-modifier/grid-config-modifier.component.html
index 8cc3052..67636cd 100644
--- a/src/app/pages/grid-config-modifier/grid-config-modifier.component.html
+++ b/src/app/pages/grid-config-modifier/grid-config-modifier.component.html
@@ -1,14 +1,18 @@
<!--
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
-->
+
<h3 align="center">Änderung der Einstellungen für verfügbare Status</h3>
<div id="statusSwitches">
diff --git a/src/app/pages/grid-config-modifier/grid-config-modifier.component.spec.ts b/src/app/pages/grid-config-modifier/grid-config-modifier.component.spec.ts
index 0320334..d4eb71f 100644
--- a/src/app/pages/grid-config-modifier/grid-config-modifier.component.spec.ts
+++ b/src/app/pages/grid-config-modifier/grid-config-modifier.component.spec.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { GridConfigModifierComponent } from './grid-config-modifier.component';
diff --git a/src/app/pages/grid-config-modifier/grid-config-modifier.component.ts b/src/app/pages/grid-config-modifier/grid-config-modifier.component.ts
index 5bd9fc6..fc8cfc8 100644
--- a/src/app/pages/grid-config-modifier/grid-config-modifier.component.ts
+++ b/src/app/pages/grid-config-modifier/grid-config-modifier.component.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { Component, OnInit } from '@angular/core';
import { GridConfig } from '../../model/grid-config';
import { ModifyGridConfigService } from '../../services/modify-grid-config.service';
diff --git a/src/app/pages/grid-measure-detail-header/grid-measure-detail-header.component.css b/src/app/pages/grid-measure-detail-header/grid-measure-detail-header.component.css
index 1998c70..0a7c0ae 100644
--- a/src/app/pages/grid-measure-detail-header/grid-measure-detail-header.component.css
+++ b/src/app/pages/grid-measure-detail-header/grid-measure-detail-header.component.css
@@ -1,11 +1,14 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
-*/
\ No newline at end of file
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
diff --git a/src/app/pages/grid-measure-detail-header/grid-measure-detail-header.component.html b/src/app/pages/grid-measure-detail-header/grid-measure-detail-header.component.html
index 22a21a1..d67b9fb 100644
--- a/src/app/pages/grid-measure-detail-header/grid-measure-detail-header.component.html
+++ b/src/app/pages/grid-measure-detail-header/grid-measure-detail-header.component.html
@@ -1,14 +1,18 @@
<!--
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-******************************************************************************
-
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
-->
+
<app-loading-spinner *ngIf="showSpinnerGrid"></app-loading-spinner>
<div #gridMeasureDetailHeaderContainer>
<form #gridMeasureDetailHeaderForm="ngForm" *ngIf="!showSpinnerGrid" (change)="onGridMeasureHeaderFormValidation(gridMeasureDetailHeaderForm.form.valid)">
@@ -18,13 +22,13 @@
<div class="row">
<div class="col-md-2">
<label class="form-field-label" for="id">Nummer (ID)</label>
- <input maxlength="256" [required]="false" type="text" name="id" id="id" [(ngModel)]="gridMeasureDetail.descriptiveId" class="form-control"
- />
+ <input maxlength="256" [required]="false" type="text" name="id" id="id" [(ngModel)]="gridMeasureDetail.descriptiveId"
+ class="form-control" />
</div>
<div class="col-md-2">
<label class="form-field-label" for="branch">Sparte</label>
- <select [required]="false" type="text" name="branch" id="branch" [(ngModel)]="gridMeasureDetail.branchId" class="form-control"
- (change)="getBranchLevelsByBranch($event.target.value)">
+ <select [required]="false" type="text" name="branch" id="branch" [(ngModel)]="gridMeasureDetail.branchId"
+ class="form-control" (change)="getBranchLevelsByBranch($event.target.value)">
<option value=""></option>
<option *ngFor="let branch of brancheList" value="{{ branch.id }}">{{ branch.description }}</option>
</select>
@@ -46,7 +50,8 @@
</div>
<div class="col-md-2">
<label class="form-field-label" for="statusId">Status</label>
- <select [required]="false" type="text" name="statusId" id="statusId" [(ngModel)]="gridMeasureDetail.statusId" class="form-control">
+ <select [required]="false" type="text" name="statusId" id="statusId" [(ngModel)]="gridMeasureDetail.statusId"
+ class="form-control">
<option *ngFor="let status of statusList" value="{{ status.id }}">{{ status.name }}</option>
</select>
</div>
@@ -56,9 +61,9 @@
<div class="row">
<div class="col-lg-12">
<label class="form-field-label" for="titleControl">Titel der Maßnahme</label>
- <input maxlength="256" placeholder="Bitte Titel der Maßnahme ausfüllen" [required]="true" type="text" name="title" id="titleControl"
- [(ngModel)]="gridMeasureDetail.title" #gmTitle (keyup)="onGridMeasureTitleChange(gmTitle.value)" class="form-control"
- />
+ <input maxlength="256" placeholder="Bitte Titel der Maßnahme ausfüllen" [required]="true" type="text" name="title"
+ id="titleControl" [(ngModel)]="gridMeasureDetail.title" #gmTitle (keyup)="onGridMeasureTitleChange(gmTitle.value)"
+ (blur)="onGridMeasureTitleBlur(gmTitle.value)" class="form-control" />
</div>
</div>
@@ -74,13 +79,13 @@
<input maxlength="256" [required]="true" type="text" list="departmentList" name="createUserDepartment" id="createUserDepartment"
[(ngModel)]="gridMeasureDetail.createUserDepartment" class="form-control" autocomplete="off" />
<datalist id="departmentList">
- <option *ngFor="let department of departmentList">{{ department.name }}</option>
+ <option *ngFor="let department of departmentList">{{ department }}</option>
</datalist>
</div>
<div class="col-md-4">
<label class="form-field-label" for="costCenter">Kostenstelle</label>
- <input maxlength="256" [required]="true" type="text" list="costCenters" name="costCenter" id="costCenter" [(ngModel)]="gridMeasureDetail.costCenter"
- class="form-control" autocomplete="off" />
+ <input maxlength="256" [required]="true" type="text" list="costCenters" name="costCenter" id="costCenter"
+ [(ngModel)]="gridMeasureDetail.costCenter" class="form-control" autocomplete="off" />
<datalist id="costCenters">
<option *ngFor="let costCenter of costCenters">{{ costCenter.name }}</option>
</datalist>
@@ -90,4 +95,4 @@
</fieldset>
</form>
-</div>
\ No newline at end of file
+</div>
diff --git a/src/app/pages/grid-measure-detail-header/grid-measure-detail-header.component.spec.ts b/src/app/pages/grid-measure-detail-header/grid-measure-detail-header.component.spec.ts
index 39fb972..caa6b5d 100644
--- a/src/app/pages/grid-measure-detail-header/grid-measure-detail-header.component.spec.ts
+++ b/src/app/pages/grid-measure-detail-header/grid-measure-detail-header.component.spec.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { GridMeasureDetailHeaderComponent } from './grid-measure-detail-header.component';
import { SessionContext } from '../../common/session-context';
@@ -19,23 +23,30 @@
import { SimpleChange } from '@angular/core';
import { AbstractMockObservableService } from '../../testing/abstract-mock-observable.service';
import { USERS } from '../../test-data/users';
+import { GridMeasureService } from '../../services/grid-measure.service';
describe('GridMeasureDetailHeaderComponent', () => {
let component: GridMeasureDetailHeaderComponent;
let fixture: ComponentFixture<GridMeasureDetailHeaderComponent>;
let sessionContext: SessionContext;
let mockBaseDataService;
-
+ let mockGridmeasureService;
class MockBaseDataService extends AbstractMockObservableService {
getBranchLevels(id: number) {
return this;
}
}
+ class MockGridmeasureService extends AbstractMockObservableService {
+ getUserDepartmentsCreated() {
+ return this;
+ }
+ }
+
beforeEach(async(() => {
sessionContext = new SessionContext();
mockBaseDataService = new MockBaseDataService();
-
+ mockGridmeasureService = new MockGridmeasureService();
TestBed.configureTestingModule({
imports: [FormsModule],
declarations: [
@@ -43,6 +54,7 @@
MockComponent({ selector: 'app-loading-spinner', inputs: [] })],
providers: [
{ provide: BaseDataService, useValue: mockBaseDataService },
+ { provide: GridMeasureService, useValue: mockGridmeasureService },
SessionContext
]
})
@@ -55,7 +67,6 @@
sessionContext.setCurrUser(USERS[0]);
sessionContext.setAllUsers(USERS);
component = fixture.componentInstance;
- // component.gridMeasureDetail.branchId = null;
fixture.detectChanges();
});
@@ -65,11 +76,8 @@
it('should enable save button after filling required field', () => {
spyOn(component, 'onGridMeasureTitleChange').and.callThrough();
-
const newVal = 'TitleTest';
component.gridMeasureDetail.title = newVal;
-
- // Todo call the change Event over dispatcher for Example not the method itself
component.onGridMeasureTitleChange(newVal);
fixture.detectChanges();
@@ -85,11 +93,8 @@
it('should disable save button after cleaning required field', () => {
spyOn(component, 'onGridMeasureTitleChange').and.callThrough();
-
const newVal = '';
component.gridMeasureDetail.title = newVal;
-
- // Todo call the change Event over dispatcher for Example not the method itself
component.onGridMeasureTitleChange(newVal);
fixture.detectChanges();
@@ -101,21 +106,18 @@
});
- it('should result in invalid form after change on plannedEndtimeGridmeasure field', () => {
- spyOn(component, 'onGridMeasureTitleChange').and.callThrough();
+ it('should set single grid measure title on blur if empty', () => {
+ spyOn(component, 'onGridMeasureTitleBlur').and.callThrough();
- const newVal = 'TitleTest';
+ const newVal = '';
component.gridMeasureDetail.title = newVal;
- component.gridMeasureDetail.plannedEndtimeGridmeasure = '2016-01-16T11:11:00z';
- // Todo call the change Event over dispatcher for Example not the method itself
- component.onGridMeasureTitleChange(newVal);
+ component.onGridMeasureTitleBlur(newVal);
fixture.detectChanges();
fixture.whenRenderingDone().then(() => {
fixture.detectChanges();
- expect((component as any).validForm).toBeFalsy();
- expect(component.onGridMeasureTitleChange).toHaveBeenCalled();
+ expect(component.onGridMeasureTitleBlur).toHaveBeenCalled();
});
});
diff --git a/src/app/pages/grid-measure-detail-header/grid-measure-detail-header.component.ts b/src/app/pages/grid-measure-detail-header/grid-measure-detail-header.component.ts
index 41a3f55..09316c8 100644
--- a/src/app/pages/grid-measure-detail-header/grid-measure-detail-header.component.ts
+++ b/src/app/pages/grid-measure-detail-header/grid-measure-detail-header.component.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import {
Component, OnInit, Input, AfterViewChecked, ViewChild, Output,
EventEmitter, OnChanges, SimpleChanges, ElementRef, AfterViewInit
@@ -20,7 +24,7 @@
import { Branch } from '../../model/branch';
import { BranchLevel } from '../../model/branch-level';
import { BaseDataService } from '../../services/base-data.service';
-import { UserDepartment } from '../../model/user-department';
+import { GridMeasureService } from '../../services/grid-measure.service';
@Component({
selector: 'app-grid-measure-detail-header',
@@ -33,7 +37,7 @@
@Input() gridMeasureDetail: GridMeasure = new GridMeasure();
@Input() isReadOnlyForm: boolean;
@Output() isValidForSave: EventEmitter<boolean> = new EventEmitter<boolean>();
-
+ @Output() titleChange: EventEmitter<string> = new EventEmitter<string>();
@ViewChild('gridMeasureDetailHeaderForm') gridMeasureDetailHeaderForm: FormGroup;
@ViewChild('gridMeasureDetailHeaderContainer') gridMeasureDetailHeaderContainer: ElementRef;
@@ -43,11 +47,12 @@
brancheList: Branch[];
branchLevelList: Array<BranchLevel> = [];
areaOfSwitchingList: string[];
- departmentList: UserDepartment[];
+ departmentList: string[];
costCenters: any;
isBranchLevelActive: boolean;
constructor(public sessionContext: SessionContext,
- private baseDataService: BaseDataService) { }
+ private baseDataService: BaseDataService,
+ private gridMeasuresService: GridMeasureService) { }
ngOnInit() {
this.getBranchLevelsByBranch(this.gridMeasureDetail.branchId);
@@ -56,7 +61,11 @@
this.statusList = this.sessionContext.getStatuses();
this.brancheList = this.sessionContext.getBranches();
this.areaOfSwitchingList = this.sessionContext.getTerritories().map(ter => ter.name);
- this.departmentList = this.sessionContext.getAllUserDepartments();
+ this.gridMeasuresService.getUserDepartmentsCreated()
+ .subscribe(departments => this.departmentList = departments,
+ error => {
+ console.log(error);
+ });
this.costCenters = this.sessionContext.getCostCenters();
}
@@ -85,6 +94,10 @@
}
}
+ onGridMeasureTitleBlur(value) {
+ this.titleChange.emit(value);
+ }
+
ngOnChanges(changes: SimpleChanges): void {
if (changes['isReadOnlyForm']) {
diff --git a/src/app/pages/grid-measure-detail-tab/grid-measure-detail-tab.component.css b/src/app/pages/grid-measure-detail-tab/grid-measure-detail-tab.component.css
index 90b246a..a984ada 100644
--- a/src/app/pages/grid-measure-detail-tab/grid-measure-detail-tab.component.css
+++ b/src/app/pages/grid-measure-detail-tab/grid-measure-detail-tab.component.css
@@ -1,15 +1,19 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
@media (min-width: 992px) {
.upload-label {
width: 40%;
@@ -115,4 +119,4 @@
align-items: center;
justify-content: center;
color: #ccc;
-}
\ No newline at end of file
+}
diff --git a/src/app/pages/grid-measure-detail-tab/grid-measure-detail-tab.component.html b/src/app/pages/grid-measure-detail-tab/grid-measure-detail-tab.component.html
index 60d0b98..d1ac8ae 100644
--- a/src/app/pages/grid-measure-detail-tab/grid-measure-detail-tab.component.html
+++ b/src/app/pages/grid-measure-detail-tab/grid-measure-detail-tab.component.html
@@ -1,14 +1,18 @@
<!--
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-******************************************************************************
-
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
-->
+
<app-loading-spinner *ngIf="showSpinnerGrid"></app-loading-spinner>
<div #gridMeasureDetailTabContainer>
<form #gridMeasureDetailForm="ngForm" *ngIf="!showSpinnerGrid" (change)="onGridMeasureDetailFormValidation(gridMeasureDetailForm.form.valid)">
@@ -17,16 +21,17 @@
<!-- 1. row -->
<div class="row">
<div class="col-md-4">
- <label class="form-field-label" for="plannedStarttimeFirstSinglemeasure">Beginn der ersten geplanten Einzelmaßnahme</label>
+ <label class="form-field-label" for="plannedStarttimeFirstSinglemeasure">Beginn der ersten geplanten
+ Einzelmaßnahme</label>
<div class="input-group">
<label class="input-group-addon dateRangePickerIcon" for="plannedStarttimeFirstSinglemeasure" style="cursor: no-drop;">
<span class="glyphicon glyphicon-calendar"></span>
</label>
- <input disabled="disabled" #input *ngIf="gridMeasureDetail.plannedStarttimeFirstSinglemeasure" maxlength="256" [required]="true"
- type="text" name="plannedStarttimeFirstSinglemeasure" id="plannedStarttimeFirstSinglemeasure" class="form-control"
- [ngModel]="gridMeasureDetail.plannedStarttimeFirstSinglemeasure|date:dateFormatLocale" />
- <input disabled="disabled" #input *ngIf="!gridMeasureDetail.plannedStarttimeFirstSinglemeasure" maxlength="256" [required]="true"
- type="text" [ngModel]="gridMeasureDetail.plannedStarttimeFirstSinglemeasure" name="plannedStarttimeFirstSinglemeasure"
+ <input disabled="disabled" #input *ngIf="gridMeasureDetail.plannedStarttimeFirstSinglemeasure" maxlength="256"
+ [required]="true" type="text" name="plannedStarttimeFirstSinglemeasure" id="plannedStarttimeFirstSinglemeasure"
+ class="form-control" [ngModel]="gridMeasureDetail.plannedStarttimeFirstSinglemeasure|date:dateFormatLocale" />
+ <input disabled="disabled" #input *ngIf="!gridMeasureDetail.plannedStarttimeFirstSinglemeasure" maxlength="256"
+ [required]="true" type="text" [ngModel]="gridMeasureDetail.plannedStarttimeFirstSinglemeasure" name="plannedStarttimeFirstSinglemeasure"
id="plannedStarttimeFirstSinglemeasure" class="form-control" />
</div>
</div>
@@ -36,18 +41,18 @@
<label class="input-group-addon dateRangePickerIcon" for="endtimeGridmeasure" style="cursor: no-drop;">
<span class="glyphicon glyphicon-calendar"></span>
</label>
- <input disabled="disabled" #input *ngIf="gridMeasureDetail.endtimeGridmeasure" maxlength="256" [required]="false" type="text"
- [ngModel]="gridMeasureDetail.endtimeGridmeasure|date:dateFormatLocale" name="endtimeGridmeasure" id="endtimeGridmeasure"
+ <input disabled="disabled" #input *ngIf="gridMeasureDetail.endtimeGridmeasure" maxlength="256" [required]="false"
+ type="text" [ngModel]="gridMeasureDetail.endtimeGridmeasure|date:dateFormatLocale" name="endtimeGridmeasure"
+ id="endtimeGridmeasure" class="form-control" />
+ <input disabled="disabled" #input *ngIf="!gridMeasureDetail.endtimeGridmeasure" maxlength="256" [required]="false"
+ type="text" [ngModel]="gridMeasureDetail.endtimeGridmeasure" name="endtimeGridmeasure" id="endtimeGridmeasure"
class="form-control" />
- <input disabled="disabled" #input *ngIf="!gridMeasureDetail.endtimeGridmeasure" maxlength="256" [required]="false" type="text"
- [ngModel]="gridMeasureDetail.endtimeGridmeasure" name="endtimeGridmeasure" id="endtimeGridmeasure" class="form-control"
- />
</div>
</div>
<div class="col-md-4">
<label class="form-field-label" for="affectedResourceControl">Betroffenes Objekt / Betriebsmittel</label>
- <input maxlength="256" [required]="true" type="text" name="affectedResource" id="affectedResourceControl" list="affectedResourcesList"
- [(ngModel)]="gridMeasureDetail.affectedResource" autocomplete="off" class="form-control" />
+ <input maxlength="256" [required]="true" type="text" name="affectedResource" id="affectedResourceControl"
+ list="affectedResourcesList" [(ngModel)]="gridMeasureDetail.affectedResource" autocomplete="off" class="form-control" />
<datalist id="affectedResourcesList">
<option *ngFor="let affectedResources of affectedResourcesList" [ngValue]="affectedResources">{{affectedResources}}</option>
</datalist>
@@ -66,13 +71,14 @@
<label class="form-field-label" for="appointmentRepetition">Wiederholung</label>
<select [required]="true" type="text" name="appointmentRepetition" id="appointmentRepetition" [(ngModel)]="gridMeasureDetail.appointmentRepetition"
(change)="gridMeasureDetail.appointmentRepetition = $event.target.value" class="form-control">
- <option *ngFor="let appointmentRepetitionString of appointmentRepetitionList" value="{{appointmentRepetitionString}}" [selected]="appointmentRepetitionString === gridMeasureDetail.appointmentRepetition">{{appointmentRepetitionString}}</option>
+ <option *ngFor="let appointmentRepetitionString of appointmentRepetitionList" value="{{appointmentRepetitionString}}"
+ [selected]="appointmentRepetitionString === gridMeasureDetail.appointmentRepetition">{{appointmentRepetitionString}}</option>
</select>
</div>
<div class="col-md-4">
<label class="form-field-label" for="timeOfReallocation">Wiederbereitstellungszeit</label>
- <input maxlength="256" [required]="true" type="text" name="timeOfReallocation" id="timeOfReallocation" [(ngModel)]="gridMeasureDetail.timeOfReallocation"
- class="form-control" />
+ <input maxlength="256" [required]="true" type="text" name="timeOfReallocation" id="timeOfReallocation"
+ [(ngModel)]="gridMeasureDetail.timeOfReallocation" class="form-control" />
</div>
</div>
@@ -92,8 +98,8 @@
<label class="form-field-label" for="description">
Beschreibung der Maßnahme
</label>
- <textarea style="resize:none;" maxlength="1024" [required]="true" rows="3" name="description" id="description" [(ngModel)]="gridMeasureDetail.description"
- class="form-control"></textarea>
+ <textarea style="resize:none;" maxlength="1024" [required]="true" rows="3" name="description" id="description"
+ [(ngModel)]="gridMeasureDetail.description" class="form-control"></textarea>
</div>
</div>
@@ -101,8 +107,8 @@
<div class="row">
<div class="col-lg-12">
<label class="form-field-label" for="remark">Bemerkungen</label>
- <textarea style="resize:none" maxlength="1024" rows="3" [required]="false" name="remark" id="remark" [(ngModel)]="gridMeasureDetail.remark"
- class="form-control" #gmRemark></textarea>
+ <textarea style="resize:none" maxlength="1024" rows="3" [required]="false" name="remark" id="remark"
+ [(ngModel)]="gridMeasureDetail.remark" class="form-control" #gmRemark></textarea>
</div>
</div>
</fieldset>
@@ -137,15 +143,15 @@
<input maxlength="256" [required]="true" type="text" list="departmentList" name="modUserDepartment" id="modUserDepartment"
[(ngModel)]="gridMeasureDetail.modUserDepartment" class="form-control" autocomplete="off" />
<datalist id="departmentList">
- <option *ngFor="let department of departmentList">{{ department.name }}</option>
+ <option *ngFor="let department of departmentList">{{ department }}</option>
</datalist>
</div>
</div>
<div class="row">
<div class="col-md-4">
- <div class="dropzone droptext" [ngClass]="{'dropzone-active':this.dragEntered}" (drop)="drop($event)" (dragover)="allowDrop($event)"
- (dragleave)="dragleave($event)" (dragenter)="dragenter($event)">
+ <div class="dropzone droptext" [ngClass]="{'dropzone-active':this.dragEntered}" (drop)="drop($event)"
+ (dragover)="allowDrop($event)" (dragleave)="dragleave($event)" (dragenter)="dragenter($event)">
Datei ziehen und hier ablegen
</div>
</div>
@@ -170,4 +176,4 @@
<app-loading-spinner *ngIf="showSpinnerFileUpload"></app-loading-spinner>
</fieldset>
</form>
-</div>
\ No newline at end of file
+</div>
diff --git a/src/app/pages/grid-measure-detail-tab/grid-measure-detail-tab.component.spec.ts b/src/app/pages/grid-measure-detail-tab/grid-measure-detail-tab.component.spec.ts
index 5714194..1236d20 100644
--- a/src/app/pages/grid-measure-detail-tab/grid-measure-detail-tab.component.spec.ts
+++ b/src/app/pages/grid-measure-detail-tab/grid-measure-detail-tab.component.spec.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { async, fakeAsync, ComponentFixture, TestBed, tick } from '@angular/core/testing';
import { FormsModule } from '@angular/forms';
import { SimpleChange } from '@angular/core';
@@ -65,6 +69,9 @@
getAffectedResourcesDistinct() {
return this;
}
+ getUserDepartmentsModified() {
+ return this;
+ }
}
let originalTimeout;
@@ -263,25 +270,6 @@
});
- it('should result in invalid form after change on plannedEndtimeGridmeasure field', () => {
- spyOn(component, 'onGridMeasureTitleChange').and.callThrough();
-
- const newVal = 'TitleTest';
- component.gridMeasureDetail.title = newVal;
- component.gridMeasureDetail.plannedEndtimeGridmeasure = '2016-01-16T11:11:00z';
-
- // Todo call the change Event over dispatcher for Example not the method itself
- component.onGridMeasureTitleChange(newVal);
- fixture.detectChanges();
-
- fixture.whenRenderingDone().then(() => {
- fixture.detectChanges();
- expect((component as any).validForm).toBeFalsy();
- expect(component.onGridMeasureTitleChange).toHaveBeenCalled();
- });
-
- });
-
////////// UPLOAD DOCUMENT ////////////////
it('should delete attached document', async(() => {
@@ -324,34 +312,6 @@
});
}));
- xit('should show a message and fail on handleFileInput: file already exists and status is applied', async(() => {
- fixture.detectChanges();
- component.gridMeasureDetail = JSON.parse(JSON.stringify(gridmeasures[2]));
- component.gridMeasureDetail.statusId = Globals.STATUS.APPLIED;
- component.readOnlyForm = false;
-
- // TODO fill it via getDocumentsForId
- component.listOfDocumentsNames.push(DOCUMENTS[1].documentName);
- fixture.detectChanges();
-
- spyOn(toasterMessageService, 'showWarn').and.callThrough();
-
- // specs compliant (as of March 2018 only Chrome)
- // Firefox < 62 workaround exploiting https://bugzilla.mozilla.org/show_bug.cgi?id=1422655
- const fileList = new ClipboardEvent('').clipboardData || new DataTransfer();
- const fileMock = new File(['foo'], 'test6.txt', { type: 'application/pdf' });
- fileList.items.add(fileMock);
-
- component.handleFileInput(fileList.files);
-
- fixture.whenStable().then(() => {
- fixture.detectChanges();
- expect(component.fileSelected).toBeFalsy();
- expect(toasterMessageService.showWarn).toHaveBeenCalled();
-
- });
- }));
-
it('should show a message: multiple files selected', async(() => {
component.gridMeasureDetail = JSON.parse(JSON.stringify(gridmeasures[2]));
component.gridMeasureDetail.statusId = Globals.STATUS.APPLIED;
@@ -462,41 +422,7 @@
expect(toasterMessageService.showWarn).toHaveBeenCalled();
}));
- xit('should upload attached document', async(() => {
- fixture.detectChanges();
- component.gridMeasureDetail = JSON.parse(JSON.stringify(gridmeasures[2]));
- component.gridMeasureDetail.statusId = Globals.STATUS.APPLIED;
- // specs compliant (as of March 2018 only Chrome)
- // Firefox < 62 workaround exploiting https://bugzilla.mozilla.org/show_bug.cgi?id=1422655
- const fileList = new ClipboardEvent('').clipboardData || new DataTransfer();
- const fileMock = new File(['foo'], 'programmatically_created.pdf', { type: 'application/pdf' });
- fileList.items.add(fileMock);
-
- spyOn(component, 'uploadDocument').and.callThrough();
-
- fixture.detectChanges();
-
- fixture.whenRenderingDone().then(() => {
- fixture.detectChanges();
- component.handleFileInput(fileList.files);
- fixture.detectChanges();
-
- fixture.whenRenderingDone().then(() => {
- fixture.detectChanges();
- const button = fixture.debugElement.nativeElement.querySelector('upload-buttons.button');
- button.click();
- fixture.detectChanges();
-
- fixture.whenStable().then(() => {
- fixture.detectChanges();
- expect(component.uploadDocument).toHaveBeenCalled();
- });
-
- });
-
- });
- }));
it('should process upload gridmeasure attachment correctly', fakeAsync(() => {
component.gridMeasureDetail = JSON.parse(JSON.stringify(gridmeasures[2]));
component.gridMeasureDetail.statusId = Globals.STATUS.NEW;
@@ -512,6 +438,7 @@
}));
+
it('should handle error while process upload correctly', fakeAsync(() => {
spyOn(console, 'log').and.callThrough();
component.gridMeasureDetail = JSON.parse(JSON.stringify(gridmeasures[2]));
@@ -592,18 +519,12 @@
component.gridMeasureDetail.id = undefined;
component.gridMeasureDetail.appointmentStartdate = undefined;
- component.gridMeasureDetail.plannedStarttimeFirstSequence = undefined;
- component.gridMeasureDetail.plannedEndtimeLastSinglemeasure = undefined;
- component.gridMeasureDetail.plannedEndtimeGridmeasure = undefined;
component.gridMeasureDetail.plannedStarttimeFirstSinglemeasure = undefined;
component.setCurrTimeIfEmpty(component.gridMeasureDetail);
fixture.detectChanges();
fixture.whenStable().then(() => {
fixture.detectChanges();
expect(component.gridMeasureDetail.appointmentStartdate.substr(0, 16)).toBe(mockDate.substr(0, 16));
- expect(component.gridMeasureDetail.plannedStarttimeFirstSequence.substr(0, 16)).toBe(mockDate.substr(0, 16));
- expect(component.gridMeasureDetail.plannedEndtimeLastSinglemeasure.substr(0, 16)).toBe(mockDate.substr(0, 16));
- expect(component.gridMeasureDetail.plannedEndtimeGridmeasure.substr(0, 16)).toBe(mockDate.substr(0, 16));
expect(component.gridMeasureDetail.plannedStarttimeFirstSinglemeasure.substr(0, 16)).toBe(mockDate.substr(0, 16));
});
}), customTestTimeout);
diff --git a/src/app/pages/grid-measure-detail-tab/grid-measure-detail-tab.component.ts b/src/app/pages/grid-measure-detail-tab/grid-measure-detail-tab.component.ts
index df30565..e82ceb7 100644
--- a/src/app/pages/grid-measure-detail-tab/grid-measure-detail-tab.component.ts
+++ b/src/app/pages/grid-measure-detail-tab/grid-measure-detail-tab.component.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import {
Component, OnInit, Input, ElementRef, ViewChild, AfterContentChecked,
SimpleChanges, OnChanges, Output, AfterViewChecked
@@ -51,7 +55,6 @@
showSpinnerFileUpload = false;
dragEntered = false;
isAppointmentNumberOfValid: boolean;
- switchingObjectList: string[];
appointmentRepetitionList: string[];
showSpinnerGridFileUpload: boolean;
dateFormatLocale = 'dd.MM.yyyy HH:mm';
@@ -71,19 +74,20 @@
private documentService: DocumentService,
public roleAccessHelper: RoleAccessHelperService,
protected gridMeasureService: GridMeasureService,
- private toasterMessageService: ToasterMessageService) { }
+ private toasterMessageService: ToasterMessageService,
+ private gridMeasuresService: GridMeasureService) { }
ngOnInit() {
this.inactiveFields = this.sessionContext.getInactiveFields();
this.isAppointmentNumberOfValid = true;
-
this.getAffectedResourcesDistinct();
-
- // TODO auslagern in Globals bzw. je nach Prozess automatisch laden (separate User Story)
- this.switchingObjectList = ['UW A', 'UW B', 'test1', 'test2'];
this.appointmentRepetitionList = this.sessionContext.getBackendsettings().appointmentRepetition.map(ap => ap.name);
- this.departmentList = this.sessionContext.getAllUserDepartments();
+ this.gridMeasuresService.getUserDepartmentsModified()
+ .subscribe(departments => this.departmentList = departments,
+ error => {
+ console.log(error);
+ });
}
ngAfterViewInit() {
@@ -142,9 +146,6 @@
const dateFields = [
'appointmentStartdate',
- 'plannedStarttimeFirstSequence',
- 'plannedEndtimeLastSinglemeasure',
- 'plannedEndtimeGridmeasure',
'plannedStarttimeFirstSinglemeasure'
];
if (gridMeasure.id) {
diff --git a/src/app/pages/grid-measure-detail/grid-measure-detail.component.css b/src/app/pages/grid-measure-detail/grid-measure-detail.component.css
index 21f9e28..0d42769 100644
--- a/src/app/pages/grid-measure-detail/grid-measure-detail.component.css
+++ b/src/app/pages/grid-measure-detail/grid-measure-detail.component.css
@@ -1,15 +1,19 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
#gridMeasureHeaderPanel {
position: fixed;
z-index: 800;
@@ -171,4 +175,4 @@
.grid-measure-tabs .valid-tab {
border-left: 5px solid #42A948;
-}
\ No newline at end of file
+}
diff --git a/src/app/pages/grid-measure-detail/grid-measure-detail.component.html b/src/app/pages/grid-measure-detail/grid-measure-detail.component.html
index 526bafd..e1c4bf3 100644
--- a/src/app/pages/grid-measure-detail/grid-measure-detail.component.html
+++ b/src/app/pages/grid-measure-detail/grid-measure-detail.component.html
@@ -1,39 +1,45 @@
<!--
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
-->
+
<form #parentForm="ngForm" *ngIf="gridMeasureDetailReceived">
<div class="row">
- <app-buttons-container #buttonscontainer [isValidForm]="areAllTabsValid()" [isValidForSave]="validForSave" [isReadOnlyForm]="readOnlyForm"
- [gridMeasureStatusId]="gridMeasureDetail?.statusId" [gridMeasureId]="gridMeasureDetail?.id" (clickQuitButton)="goToOverview()"
- (clickCancelButton)="goToCancelPage()" (clickRejectButton)="updateGridMeasureStatus(Globals.STATUS.REJECTED)" (clickSaveButton)="createGridMeasure(gridMeasureDetail)"
- (clickApplyButton)="updateGridMeasureStatus(Globals.STATUS.APPLIED)" (clickForApprovalButton)="updateGridMeasureStatus(Globals.STATUS.FORAPPROVAL)"
- (clickApprovedButton)="updateGridMeasureStatus(Globals.STATUS.APPROVED)" (clickRequestButton)="updateGridMeasureStatus(Globals.STATUS.REQUESTED)"
- (clickReleaseButton)="updateGridMeasureStatus(Globals.STATUS.RELEASED)" (clickActivateButton)="updateGridMeasureStatus(Globals.STATUS.ACTIVE)"
- (clickInWorkButton)="updateGridMeasureStatus(Globals.STATUS.IN_WORK)" (clickWorkFinishButton)="updateGridMeasureStatus(Globals.STATUS.WORK_FINISHED)"
- (clickFinishButton)="updateGridMeasureStatus(Globals.STATUS.FINISHED)" (clickCloseButton)="updateGridMeasureStatus(Globals.STATUS.CLOSED)"
- (clickDuplicateButton)="duplicateGM()"></app-buttons-container>
+ <app-buttons-container #buttonscontainer [isValidForm]="areAllTabsValid()" [isValidForSave]="validForSave"
+ [isReadOnlyForm]="readOnlyForm" [gridMeasureStatusId]="gridMeasureDetail?.statusId" [gridMeasureId]="gridMeasureDetail?.id"
+ (clickQuitButton)="goToOverview()" (clickCancelButton)="goToCancelPage()" (clickRejectButton)="updateGridMeasureStatus(Globals.STATUS.REJECTED)"
+ (clickSaveButton)="createGridMeasure(gridMeasureDetail)" (clickApplyButton)="updateGridMeasureStatus(Globals.STATUS.APPLIED)"
+ (clickForApprovalButton)="updateGridMeasureStatus(Globals.STATUS.FORAPPROVAL)" (clickApprovedButton)="updateGridMeasureStatus(Globals.STATUS.APPROVED)"
+ (clickRequestButton)="updateGridMeasureStatus(Globals.STATUS.REQUESTED)" (clickReleaseButton)="updateGridMeasureStatus(Globals.STATUS.RELEASED)"
+ (clickActivateButton)="updateGridMeasureStatus(Globals.STATUS.ACTIVE)" (clickInWorkButton)="updateGridMeasureStatus(Globals.STATUS.IN_WORK)"
+ (clickWorkFinishButton)="updateGridMeasureStatus(Globals.STATUS.WORK_FINISHED)" (clickFinishButton)="updateGridMeasureStatus(Globals.STATUS.FINISHED)"
+ (clickCloseButton)="updateGridMeasureStatus(Globals.STATUS.CLOSED)" (clickDuplicateButton)="duplicateGM()"></app-buttons-container>
</div>
<div class="panel panel-default" id="gridMeasureHeaderPanel">
<div class="panel-heading">
<h4 class="panel-title">
+ <a [ngClass]="(!isExpanded)?'glyphicon glyphicon-chevron-down':'glyphicon glyphicon-chevron-up'" data-toggle="collapse"
+ href="#collapse1" (click)="isExpanded = !isExpanded"></a>
<a data-toggle="collapse" href="#collapse1" (click)="isExpanded = !isExpanded">Netzmaßnahme</a>
</h4>
</div>
<div id="collapse1" class="panel-collapse collapse in">
<div class="panel-body">
- <app-grid-measure-detail-header (isValidForSave)=" this.validForSave = $event;" [isReadOnlyForm]="readOnlyForm" [id]="id"
- [showSpinnerGrid]="showSpinner" [gridMeasureDetail]="gridMeasureDetail">
+ <app-grid-measure-detail-header (titleChange)="setSingleGridMeasureTitle()" (isValidForSave)="this.validForSave = $event;"
+ [isReadOnlyForm]="readOnlyForm" [id]="id" [showSpinnerGrid]="showSpinner" [gridMeasureDetail]="gridMeasureDetail">
</app-grid-measure-detail-header>
</div>
</div>
@@ -45,7 +51,10 @@
<div class="panel panel-default" [ngClass]="isExpanded ? '':'mainPanelCollapsed'" id="gridMeasureMainPanel">
<div class="panel-heading">
<h4 class="panel-title">
- <a data-toggle="collapse" href="#collapse4">Details der Netzmaßnahme</a>
+ <a [ngClass]="(!isExpandedDetail)?'glyphicon glyphicon-chevron-down':'glyphicon glyphicon-chevron-up'"
+ data-toggle="collapse" href="#collapse4" (click)="isExpandedDetail = !isExpandedDetail"></a>
+ <a data-toggle="collapse" href="#collapse4" (click)="isExpandedDetail = !isExpandedDetail">Details der
+ Netzmaßnahme</a>
</h4>
</div>
@@ -56,13 +65,14 @@
<a href="#gridmeasurepanel" (click)="onSelectGridMeasureTab()" data-toggle="tab" [ngClass]="isGridMeasureDetailValid() ? 'valid-tab' : 'invalid-tab'">Maßnahme</a>
</li>
<li *ngFor="let singleGridmeasure of gridMeasureDetail?.listSingleGridmeasures; let idx = index;">
- <a *ngIf="!singleGridmeasure.delete" [id]="singleGridmeasure.sortorder" href="#singlegridmeasure" (click)="onSelectSingleGridMeasureTab(singleGridmeasure)"
- data-toggle="tab" [ngClass]="isSingleGridmeasureValid(singleGridmeasure) ? 'valid-tab' : 'invalid-tab'">Einzelmaßnahme {{idx + 1}} </a>
+ <a *ngIf="!singleGridmeasure.delete" [id]="singleGridmeasure.sortorder" href="#singlegridmeasure"
+ (click)="onSelectSingleGridMeasureTab(singleGridmeasure)" data-toggle="tab" [ngClass]="isSingleGridmeasureValid(singleGridmeasure) ? 'valid-tab' : 'invalid-tab'">Einzelmaßnahme
+ {{idx + 1}} </a>
</li>
<li>
<!-- more singleGridMeasures -->
- <button [disabled]="disableNewTabBtn || isSingleGridmeasureLimitReached()" class="glyphicon glyphicon-plus" id="newSingleGridMeasureBtn"
- (click)="createNewSingleGridMeasureTab()" [title]="isSingleGridmeasureLimitReached() ? 'Es können maximal ' + Globals.MAX_NUMBER_OF_TABS + ' Einzelmaßnahmen angelegt werden.' : ''"></button>
+ <button [disabled]="disableNewTabBtn || isSingleGridmeasureLimitReached()" class="glyphicon glyphicon-plus"
+ id="newSingleGridMeasureBtn" (click)="createNewSingleGridMeasureTab()" [title]="isSingleGridmeasureLimitReached() ? 'Es können maximal ' + Globals.MAX_NUMBER_OF_TABS + ' Einzelmaßnahmen angelegt werden.' : ''"></button>
</li>
</ul>
</div>
@@ -70,17 +80,17 @@
<div class="tab-pane active" id="gridmeasurepanel">
<div class="panel-body">
- <app-grid-measure-detail-tab (isValidForSave)=" this.validForSave = $event;" [readOnlyForm]="readOnlyForm" [id]="id" [showSpinnerGrid]="showSpinner"
- [gridMeasureDetail]="gridMeasureDetail">
+ <app-grid-measure-detail-tab (isValidForSave)=" this.validForSave = $event;" [readOnlyForm]="readOnlyForm"
+ [id]="id" [showSpinnerGrid]="showSpinner" [gridMeasureDetail]="gridMeasureDetail">
</app-grid-measure-detail-tab>
</div>
</div>
<div class="tab-pane" id="singlegridmeasure">
<div class="panel-body">
- <app-single-grid-measure-detail-tab (singleGridMeasureChanged)="onSingleGridMeasureChanged($event)" [singleGridMeasure]="currentSingleGridMeasure"
- [isReadOnlyForm]="readOnlyForm" [gridMeasureDetail]="gridMeasureDetail" [dateTimePattern]="dateTimePattern"
- [dateFormatLocale]="dateFormatLocale">
+ <app-single-grid-measure-detail-tab (singleGridMeasureChanged)="onSingleGridMeasureChanged($event)"
+ [singleGridMeasure]="currentSingleGridMeasure" [isReadOnlyForm]="readOnlyForm" [gridMeasureDetail]="gridMeasureDetail"
+ [dateTimePattern]="dateTimePattern" [dateFormatLocale]="dateFormatLocale">
</app-single-grid-measure-detail-tab>
</div>
</div>
@@ -93,7 +103,11 @@
<div class="panel panel-default" id="gridMeasureEmailPanel">
<div class="panel-heading">
<h4 class="panel-title">
- <a *ngIf="isEmailDistributionStatusCollapsed" data-toggle="collapse" href="#collapse9">E-Mail Verteiler für Status Genehmigt, Storniert und Zurückgewiesen</a>
+ <a [ngClass]="(!isExpandedEmail)?'glyphicon glyphicon-chevron-down':'glyphicon glyphicon-chevron-up'"
+ data-toggle="collapse" href="#collapse9" (click)="isExpandedEmail = !isExpandedEmail"></a>
+ <a *ngIf="isEmailDistributionStatusCollapsed" data-toggle="collapse" href="#collapse9" (click)="isExpandedEmail = !isExpandedEmail">E-Mail
+ Verteiler für
+ Status Genehmigt, Storniert und Zurückgewiesen</a>
<div *ngIf="!isEmailDistributionStatusCollapsed">E-Mail-Verteiler</div>
</h4>
</div>
@@ -101,8 +115,8 @@
<app-email-distribution-entry [isReadOnlyForm]="emailAddFormNotAllowed" [(gridMeasureDetail)]="gridMeasureDetail">
loading ...
</app-email-distribution-entry>
- <app-email-distribution-list [gridId]="'email-distribution-list'" [withEditButtons]="true" [gridMeasureDetail]="gridMeasureDetail"
- (gridMeasureChanged)="onGridMeasureChanged($event)">
+ <app-email-distribution-list [gridId]="'email-distribution-list'" [withEditButtons]="true"
+ [gridMeasureDetail]="gridMeasureDetail" (gridMeasureChanged)="onGridMeasureChanged($event)">
loading ...
</app-email-distribution-list>
</div>
@@ -118,4 +132,4 @@
</div>
</div>
-</form>
\ No newline at end of file
+</form>
diff --git a/src/app/pages/grid-measure-detail/grid-measure-detail.component.spec.ts b/src/app/pages/grid-measure-detail/grid-measure-detail.component.spec.ts
index 1ba71a7..b8c8123 100644
--- a/src/app/pages/grid-measure-detail/grid-measure-detail.component.spec.ts
+++ b/src/app/pages/grid-measure-detail/grid-measure-detail.component.spec.ts
@@ -1,15 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
-/* tslint:disable:no-unused-variable */
+
import { EventEmitter } from '@angular/core';
import { ComponentFixture, TestBed, async, fakeAsync, tick } from '@angular/core/testing';
import { FormsModule } from '@angular/forms';
@@ -33,22 +36,15 @@
import { BaseDataLoaderService } from '../../services/jobs/base-data-loader.service';
import { ToasterMessageService } from '../../services/toaster-message.service';
import { MessageService } from 'primeng/api';
+import { SingleGridMeasure } from '../../model/single-grid-measure';
-class FakeRouter {
- navigate(commands: any[]) {
- return commands[0];
- }
-}
-
describe('GridMeasureDetailComponent', () => {
let component: GridMeasureDetailComponent;
let fixture: ComponentFixture<GridMeasureDetailComponent>;
const gridmeasures: GridMeasure[] = JSON.parse(JSON.stringify(GRIDMEASURE));
let routerStub: RouterStub;
let activatedStub: ActivatedRouteStub;
- // let router: Router;
-
routerStub = {
navigate: jasmine.createSpy('navigate').and.callThrough()
@@ -376,10 +372,6 @@
});
}));
-
-
-
-
it('should enable apply button after filling all required fields', async(() => {
component.gridMeasureDetail = gridmeasures[0];
(component as any).onReceiveGridMeasureDetail();
@@ -391,7 +383,6 @@
});
}));
-
it('should navigate to Overview after click on abortbutton', () => {
spyOn(component, 'goToOverview').and.callThrough();
fixture.detectChanges();
@@ -704,4 +695,83 @@
}));
+ it('should react on select grid measure tab', async(() => {
+ spyOn(component, 'onSelectGridMeasureTab').and.callThrough();
+ fixture.detectChanges();
+ component.onSelectGridMeasureTab();
+
+ fixture.detectChanges();
+ fixture.whenRenderingDone().then(() => {
+ fixture.detectChanges();
+ expect(component.onSelectGridMeasureTab).toHaveBeenCalled();
+ });
+ }));
+
+ it('should react on single grid measure changes', async(() => {
+ spyOn(component, 'onSingleGridMeasureChanged').and.callThrough();
+ fixture.detectChanges();
+ const event = JSON.parse(JSON.stringify(GRIDMEASURE[0].listSingleGridmeasures[0]));
+ component.onSingleGridMeasureChanged(event);
+
+ fixture.detectChanges();
+ fixture.whenRenderingDone().then(() => {
+ fixture.detectChanges();
+ expect(component.onSingleGridMeasureChanged).toHaveBeenCalled();
+ expect(component.currentSingleGridMeasure).toBe(event);
+ });
+ }));
+
+ it('should react on grid measure changes', async(() => {
+ spyOn(component, 'onGridMeasureChanged').and.callThrough();
+ fixture.detectChanges();
+ const event = JSON.parse(JSON.stringify(GRIDMEASURE[0]));
+ component.onGridMeasureChanged(event);
+
+ fixture.detectChanges();
+ fixture.whenRenderingDone().then(() => {
+ fixture.detectChanges();
+ expect(component.onGridMeasureChanged).toHaveBeenCalled();
+ expect(component.gridMeasureDetail).toBe(event);
+ });
+ }));
+
+ it('should react on selecting single grid measure tab and set title for single GM if emtpy', async(() => {
+ spyOn(component, 'onSelectSingleGridMeasureTab').and.callThrough();
+ fixture.detectChanges();
+ const gridmeasure: GridMeasure = JSON.parse(JSON.stringify(GRIDMEASURE[0]));
+ const singleGM: SingleGridMeasure = gridmeasure.listSingleGridmeasures[0];
+ singleGM.title = null;
+ const event = gridmeasure.listSingleGridmeasures[0];
+ fixture.detectChanges();
+
+ component.onSelectSingleGridMeasureTab(event);
+
+ fixture.detectChanges();
+ fixture.whenRenderingDone().then(() => {
+ fixture.detectChanges();
+ expect(singleGM.title).toBe(gridmeasure.title);
+ expect(component.onSelectSingleGridMeasureTab).toHaveBeenCalled();
+ expect(component.currentSingleGridMeasure).toBe(event);
+ });
+ }));
+
+ it('should react on selecting single grid measure tab and not set title for single GM if not empty', async(() => {
+ spyOn(component, 'onSelectSingleGridMeasureTab').and.callThrough();
+ fixture.detectChanges();
+ const gridmeasure: GridMeasure = JSON.parse(JSON.stringify(GRIDMEASURE[0]));
+ const singleGM: SingleGridMeasure = gridmeasure.listSingleGridmeasures[0];
+ const event = gridmeasure.listSingleGridmeasures[0];
+ fixture.detectChanges();
+
+ component.onSelectSingleGridMeasureTab(event);
+
+ fixture.detectChanges();
+ fixture.whenRenderingDone().then(() => {
+ fixture.detectChanges();
+ expect(singleGM.title).toBe('title 1');
+ expect(component.onSelectSingleGridMeasureTab).toHaveBeenCalled();
+ expect(component.currentSingleGridMeasure).toBe(event);
+ });
+ }));
+
});
diff --git a/src/app/pages/grid-measure-detail/grid-measure-detail.component.ts b/src/app/pages/grid-measure-detail/grid-measure-detail.component.ts
index 02dd6cf..9001703 100644
--- a/src/app/pages/grid-measure-detail/grid-measure-detail.component.ts
+++ b/src/app/pages/grid-measure-detail/grid-measure-detail.component.ts
@@ -1,25 +1,28 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { SessionContext } from './../../common/session-context';
import { GridMeasureService } from './../../services/grid-measure.service';
import { LockHelperService } from './../../services/lock-helper.service';
import { GridMeasure } from './../../model/grid-measure';
import {
- Component, OnInit, ViewChild, OnDestroy, EventEmitter, ChangeDetectorRef, AfterViewChecked, HostBinding
+ Component, OnInit, ViewChild, OnDestroy, EventEmitter, ChangeDetectorRef, AfterViewChecked, HostBinding, Output
} from '@angular/core';
import { Router, ActivatedRoute } from '@angular/router';
import { DaterangepickerConfig } from 'ng2-daterangepicker';
import { ErrorType } from '../../common/enums';
-import { UserDepartment } from './../../model/user-department';
import { Globals } from './../../common/globals';
import { RoleAccess } from '../../model/role-access';
import { RoleAccessHelperService } from '../../services/jobs/role-access-helper.service';
@@ -41,7 +44,6 @@
export class GridMeasureDetailComponent implements OnInit, OnDestroy, AfterViewChecked {
-
private unlockInProgress = false;
dragEntered = false;
console = console;
@@ -51,20 +53,17 @@
viewModeReadOnly = false; // setting that was provided when starting the form
emailAddFormNotAllowed = true;
showSpinner = true;
- departmentList: UserDepartment[];
gridMeasureDetail: GridMeasure;
currentSingleGridMeasure: SingleGridMeasure = new SingleGridMeasure();
endDate: Date;
startDate: Date;
- switchingObjectList: string[];
- areaOfSwitchingList: string[];
- responsibleOnSiteNameList: string[];
- levelList: any[];
validForSave: boolean;
validForUpload: boolean;
fileToUpload: File = null;
showTabs = true;
isExpanded = true;
+ isExpandedDetail = true;
+ isExpandedEmail = false;
fileReaderReady = false;
id: any;
fileSelected: boolean;
@@ -154,7 +153,7 @@
this.gridMeasureDetail = gm;
this.showSpinner = false;
- editModeAllowedForRole = this.modeValidator.isEditModeAllowed(this.gridMeasureDetail);
+ editModeAllowedForRole = this.modeValidator.isEditModeAllowed(this.gridMeasureDetail.statusId);
this.viewModeReadOnly = !(editModeAllowedForRole && (params['mode'] === Globals.MODE.EDIT
|| params['mode'] === Globals.MODE.VIEW));
this.readOnlyForm = this.viewModeReadOnly;
@@ -375,6 +374,7 @@
this.gridMeasureDetail.listSingleGridmeasures.push(singleGM);
this.currentSingleGridMeasure = singleGM;
Util.showSingleGridmeasureTab(singleGM.sortorder);
+ this.setSingleGridMeasureTitle();
}
}
@@ -430,6 +430,13 @@
if (singleGridmeasure !== this.currentSingleGridMeasure) {
this.currentSingleGridMeasure = singleGridmeasure;
}
+ this.setSingleGridMeasureTitle();
+ }
+
+ setSingleGridMeasureTitle() {
+ if (!this.currentSingleGridMeasure.title) {
+ this.currentSingleGridMeasure.title = this.gridMeasureDetail.title;
+ }
}
onSelectGridMeasureTab(): void {
diff --git a/src/app/pages/loggedout/loggedout.component.css b/src/app/pages/loggedout/loggedout.component.css
index 66f2d8e..953d8cd 100644
--- a/src/app/pages/loggedout/loggedout.component.css
+++ b/src/app/pages/loggedout/loggedout.component.css
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
.logout-outer {
width: 100%;
height: 90%;
@@ -21,4 +25,4 @@
.logout-inner {
text-align: center;
-}
\ No newline at end of file
+}
diff --git a/src/app/pages/loggedout/loggedout.component.html b/src/app/pages/loggedout/loggedout.component.html
index e83d505..ee85dae 100644
--- a/src/app/pages/loggedout/loggedout.component.html
+++ b/src/app/pages/loggedout/loggedout.component.html
@@ -1,15 +1,19 @@
<!--
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
-->
+
<div class="logout-outer">
<div class="logout-inner">
<img src="assets/img/logo_openkonsequenz.png">
@@ -22,4 +26,4 @@
</div>
</div>
<!-- <app-version-info>...Loading Version-Info...</app-version-info> -->
-</div>
\ No newline at end of file
+</div>
diff --git a/src/app/pages/loggedout/loggedout.component.spec.ts b/src/app/pages/loggedout/loggedout.component.spec.ts
index bb5ab5f..e9fcec0 100644
--- a/src/app/pages/loggedout/loggedout.component.spec.ts
+++ b/src/app/pages/loggedout/loggedout.component.spec.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { LoggedoutPageComponent } from './loggedout.component';
diff --git a/src/app/pages/loggedout/loggedout.component.ts b/src/app/pages/loggedout/loggedout.component.ts
index 64b816d..22fd8d7 100644
--- a/src/app/pages/loggedout/loggedout.component.ts
+++ b/src/app/pages/loggedout/loggedout.component.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { Component, OnInit, ViewChild, ElementRef } from '@angular/core';
@Component({
diff --git a/src/app/pages/logout/logout.component.css b/src/app/pages/logout/logout.component.css
index 8f18cd6..953d8cd 100644
--- a/src/app/pages/logout/logout.component.css
+++ b/src/app/pages/logout/logout.component.css
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
.logout-outer {
width: 100%;
height: 90%;
@@ -21,4 +25,4 @@
.logout-inner {
text-align: center;
-}
\ No newline at end of file
+}
diff --git a/src/app/pages/logout/logout.component.html b/src/app/pages/logout/logout.component.html
index 5be9805..c26a709 100644
--- a/src/app/pages/logout/logout.component.html
+++ b/src/app/pages/logout/logout.component.html
@@ -1,14 +1,18 @@
<!--
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
-->
+
<div class="logout-outer">
<div class="logout-inner">
<div class="center">
@@ -20,4 +24,4 @@
<button id="homebutton" class=" btn btn-primary " (click)="goToOverview() ">Nein</button>
</div>
</div>
-</div>
\ No newline at end of file
+</div>
diff --git a/src/app/pages/logout/logout.component.spec.ts b/src/app/pages/logout/logout.component.spec.ts
index 07993df..3c978a8 100644
--- a/src/app/pages/logout/logout.component.spec.ts
+++ b/src/app/pages/logout/logout.component.spec.ts
@@ -1,25 +1,30 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { NgModule } from '@angular/core';
import { LogoutPageComponent } from './logout.component';
import { LoggedoutPageComponent } from '../loggedout/loggedout.component';
import { MockComponent } from '../../testing/mock.component';
import { Router } from '@angular/router';
-import { MessageServiceCustom } from '../../services/message.service';
import { AuthenticationService } from '../../services/authentication.service';
import { AbstractMockObservableService } from '../../testing/abstract-mock-observable.service';
import { Observable } from 'rxjs/Observable';
import { SessionContext } from './../../common/session-context';
+import { MessageService } from 'primeng/api';
+import { ToasterMessageService } from '../../services/toaster-message.service';
class FakeRouter {
navigate(commands: any[]) {
@@ -44,18 +49,19 @@
let fixture: ComponentFixture<LogoutPageComponent>;
let routerStub: FakeRouter;
let mockAuthService;
- let messageService;
+ let toasterMessageService;
let sessionContext;
-
+ let messageService;
routerStub = {
navigate: jasmine.createSpy('navigate').and.callThrough()
};
beforeEach(async(() => {
+ messageService = new MessageService();
sessionContext = new SessionContext();
router = new FakeRouter() as any as Router;
mockAuthService = new MockAuthService();
- messageService = new MessageServiceCustom(sessionContext);
+ toasterMessageService = new ToasterMessageService(sessionContext, messageService);
TestBed.configureTestingModule({
declarations: [LogoutPageComponent,
@@ -64,7 +70,7 @@
],
providers: [
{ provide: Router, useValue: routerStub },
- { provide: MessageServiceCustom, useValue: messageService },
+ { provide: ToasterMessageService, useValue: toasterMessageService },
{ provide: AuthenticationService, useValue: mockAuthService },
{ provide: SessionContext, useClass: SessionContext }
]
diff --git a/src/app/pages/logout/logout.component.ts b/src/app/pages/logout/logout.component.ts
index 811ab43..6e08e22 100644
--- a/src/app/pages/logout/logout.component.ts
+++ b/src/app/pages/logout/logout.component.ts
@@ -1,17 +1,21 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { Component, OnInit, ViewChild, ElementRef } from '@angular/core';
import { Router } from '@angular/router';
-import { MessageDefines, MessageServiceCustom } from '../../services/message.service';
+import { MessageDefines, ToasterMessageService } from '../../services/toaster-message.service';
import { AuthenticationService } from '../../services/authentication.service';
import { SessionContext } from '../../common/session-context';
@@ -31,7 +35,7 @@
constructor(
- private msgService: MessageServiceCustom,
+ private msgService: ToasterMessageService,
private authService: AuthenticationService,
private router: Router,
private sessionContext: SessionContext
diff --git a/src/app/pages/overview/overview.component.css b/src/app/pages/overview/overview.component.css
index 71d3da3..2cae2c3 100644
--- a/src/app/pages/overview/overview.component.css
+++ b/src/app/pages/overview/overview.component.css
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
/* Overview styling */
.navbar-right {
display: inline-flex;
@@ -19,4 +23,4 @@
.btn-group .btn {
width: 85px;
-}
\ No newline at end of file
+}
diff --git a/src/app/pages/overview/overview.component.html b/src/app/pages/overview/overview.component.html
index a003376..f49d163 100644
--- a/src/app/pages/overview/overview.component.html
+++ b/src/app/pages/overview/overview.component.html
@@ -1,15 +1,19 @@
<!--
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
-->
+
<div class="overview-body">
<div>
<div class="maincontent">
@@ -47,4 +51,4 @@
</div>
</div>
</div>
-</div>
\ No newline at end of file
+</div>
diff --git a/src/app/pages/overview/overview.component.spec.ts b/src/app/pages/overview/overview.component.spec.ts
index d087b5e..61a8627 100644
--- a/src/app/pages/overview/overview.component.spec.ts
+++ b/src/app/pages/overview/overview.component.spec.ts
@@ -1,15 +1,19 @@
-/**
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { FormsModule } from '@angular/forms';
import { MainNavigationComponent } from '../../common-components/main-navigation/main-navigation.component';
diff --git a/src/app/pages/overview/overview.component.ts b/src/app/pages/overview/overview.component.ts
index 2b8bce9..f9d6b2f 100644
--- a/src/app/pages/overview/overview.component.ts
+++ b/src/app/pages/overview/overview.component.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { Globals } from './../../common/globals';
import { Component, OnInit } from '@angular/core';
import { SessionContext } from '../../common/session-context';
diff --git a/src/app/pages/single-grid-measure-detail-tab/single-grid-measure-detail-tab.component.css b/src/app/pages/single-grid-measure-detail-tab/single-grid-measure-detail-tab.component.css
index 58e9052..e7b30a0 100644
--- a/src/app/pages/single-grid-measure-detail-tab/single-grid-measure-detail-tab.component.css
+++ b/src/app/pages/single-grid-measure-detail-tab/single-grid-measure-detail-tab.component.css
@@ -1,15 +1,19 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
@import url("../grid-measure-detail/grid-measure-detail.component.css");
.actions {
display: block;
@@ -42,4 +46,4 @@
.steps-grid-container {
padding: 30px 0 0 0;
}
-}
\ No newline at end of file
+}
diff --git a/src/app/pages/single-grid-measure-detail-tab/single-grid-measure-detail-tab.component.html b/src/app/pages/single-grid-measure-detail-tab/single-grid-measure-detail-tab.component.html
index 1fa3626..881f815 100644
--- a/src/app/pages/single-grid-measure-detail-tab/single-grid-measure-detail-tab.component.html
+++ b/src/app/pages/single-grid-measure-detail-tab/single-grid-measure-detail-tab.component.html
@@ -1,13 +1,18 @@
<!--
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
-->
+
<!-- <form #singleGridForm="ngForm" *ngIf="!showSpinnerSingleGrid" [singleGridMeasureFormValid]="!singleGridForm.form.valid"> -->
<div #singleGridMeasureDetailFormCotainer>
<form #singleGridForm="ngForm" (change)="onSingleGridFormValidation(singleGridForm.form.valid)">
@@ -17,7 +22,8 @@
<button class="btn btn-primary pull-right" id="createInvertedStep" (click)="duplicateSingleGM()" [disabled]="isSingleGridmeasureLimitReached()">Rückschaltung
planen
</button>
- <button class="btn btn-danger pull-left" id="deleteSingleGridMeasureBtn" (click)="onDeleteBtnClick()" [disabled]="isLastSingleGridmeasure()">Einzelmaßnahme
+ <button class="btn btn-danger pull-left" id="deleteSingleGridMeasureBtn" (click)="onDeleteBtnClick()"
+ [disabled]="isLastSingleGridmeasure()">Einzelmaßnahme
löschen
<span class="glyphicon glyphicon-trash" id="deleteSingleGridMeasureBtnIcon"></span>
</button>
@@ -37,16 +43,18 @@
<label class="input-group-addon dateRangePickerIcon" for="plannedStarttimeSinglemeasure">
<span class="glyphicon glyphicon-calendar"></span>
</label>
- <input #input *ngIf="singleGridMeasure.plannedStarttimeSinglemeasure" maxlength="256" [required]="true" type="text" [pattern]="dateTimePattern"
- name="plannedStarttimeSinglemeasure" id="plannedStarttimeSinglemeasure" class="form-control" [ngModel]="singleGridMeasure.plannedStarttimeSinglemeasure|date:dateFormatLocale "
- (ngModelChange)="singleGridMeasure.plannedStarttimeSinglemeasure = $event.target?.value" daterangepicker [options]="{drops: calcDatepickerDropOrientation(input), autoUpdateInput: false,startDate:singleGridMeasure.plannedStarttimeSinglemeasure | stringToDate , singleDatePicker: true}"
- (applyDaterangepicker)="singleGridMeasure.plannedStarttimeSinglemeasure=$event.picker.startDate; " (selected)="selectedDate($event, 'singleGridMeasure.plannedStarttimeSinglemeasure')"
- />
- <input #input *ngIf="!singleGridMeasure.plannedStarttimeSinglemeasure" maxlength="256" [required]="true" type="text" [pattern]="dateTimePattern"
- [ngModel]="singleGridMeasure.plannedStarttimeSinglemeasure" name="plannedStarttimeSinglemeasure" id="plannedStarttimeSinglemeasure"
- class="form-control" autocomplete="no" daterangepicker [options]="{drops: calcDatepickerDropOrientation(input), autoUpdateInput: false, singleDatePicker: true}"
- (applyDaterangepicker)="singleGridMeasure.plannedStarttimeSinglemeasure=$event.picker.startDate;" (selected)="selectedDate($event, 'singleGridMeasure.plannedStarttimeSinglemeasure')"
- />
+ <input #input *ngIf="singleGridMeasure.plannedStarttimeSinglemeasure" maxlength="256" [required]="true"
+ type="text" [pattern]="dateTimePattern" name="plannedStarttimeSinglemeasure" id="plannedStarttimeSinglemeasure"
+ class="form-control" [ngModel]="singleGridMeasure.plannedStarttimeSinglemeasure|date:dateFormatLocale "
+ (ngModelChange)="singleGridMeasure.plannedStarttimeSinglemeasure = $event.target?.value" daterangepicker
+ [options]="{drops: calcDatepickerDropOrientation(input), autoUpdateInput: false,startDate:singleGridMeasure.plannedStarttimeSinglemeasure | stringToDate , singleDatePicker: true}"
+ (applyDaterangepicker)="singleGridMeasure.plannedStarttimeSinglemeasure=$event.picker.startDate; "
+ (selected)="selectedDate($event, 'singleGridMeasure.plannedStarttimeSinglemeasure')" />
+ <input #input *ngIf="!singleGridMeasure.plannedStarttimeSinglemeasure" maxlength="256" [required]="true"
+ type="text" [pattern]="dateTimePattern" [ngModel]="singleGridMeasure.plannedStarttimeSinglemeasure" name="plannedStarttimeSinglemeasure"
+ id="plannedStarttimeSinglemeasure" class="form-control" autocomplete="no" daterangepicker [options]="{drops: calcDatepickerDropOrientation(input), autoUpdateInput: false, singleDatePicker: true}"
+ (applyDaterangepicker)="singleGridMeasure.plannedStarttimeSinglemeasure=$event.picker.startDate;"
+ (selected)="selectedDate($event, 'singleGridMeasure.plannedStarttimeSinglemeasure')" />
</div>
</div>
@@ -57,30 +65,31 @@
<label class="input-group-addon dateRangePickerIcon" for="plannedEndtimeSinglemeasure">
<span class="glyphicon glyphicon-calendar"></span>
</label>
- <input #input *ngIf="singleGridMeasure.plannedEndtimeSinglemeasure" maxlength="256" [required]="true" type="text" [pattern]="dateTimePattern"
- name="plannedEndtimeSinglemeasure" id="plannedEndtimeSinglemeasure" class="form-control" daterangepicker [ngModel]="singleGridMeasure.plannedEndtimeSinglemeasure|date:dateFormatLocale "
+ <input #input *ngIf="singleGridMeasure.plannedEndtimeSinglemeasure" maxlength="256" [required]="true" type="text"
+ [pattern]="dateTimePattern" name="plannedEndtimeSinglemeasure" id="plannedEndtimeSinglemeasure" class="form-control"
+ daterangepicker [ngModel]="singleGridMeasure.plannedEndtimeSinglemeasure|date:dateFormatLocale "
(ngModelChange)="singleGridMeasure.plannedEndtimeSinglemeasure = $event.target?.value" [options]="{drops: calcDatepickerDropOrientation(input), autoUpdateInput: false, startDate:singleGridMeasure.plannedEndtimeSinglemeasure | stringToDate , singleDatePicker: true}"
- (applyDaterangepicker)="singleGridMeasure.plannedEndtimeSinglemeasure=$event.picker.startDate; " (selected)="selectedDate($event, 'singleGridMeasure.plannedEndtimeSinglemeasure')"
- />
- <input #input *ngIf="!singleGridMeasure.plannedEndtimeSinglemeasure" maxlength="256" [required]="true" type="text" [pattern]="dateTimePattern"
- [ngModel]="singleGridMeasure.plannedEndtimeSinglemeasure" name="plannedEndtimeSinglemeasure" id="plannedEndtimeSinglemeasure"
- class="form-control" autocomplete="no" daterangepicker [options]="{drops: calcDatepickerDropOrientation(input), autoUpdateInput: false, singleDatePicker: true}"
- (applyDaterangepicker)="singleGridMeasure.plannedEndtimeSinglemeasure=$event.picker.startDate;" (selected)="selectedDate($event, 'singleGridMeasure.plannedEndtimeSinglemeasure')"
- />
+ (applyDaterangepicker)="singleGridMeasure.plannedEndtimeSinglemeasure=$event.picker.startDate; "
+ (selected)="selectedDate($event, 'singleGridMeasure.plannedEndtimeSinglemeasure')" />
+ <input #input *ngIf="!singleGridMeasure.plannedEndtimeSinglemeasure" maxlength="256" [required]="true" type="text"
+ [pattern]="dateTimePattern" [ngModel]="singleGridMeasure.plannedEndtimeSinglemeasure" name="plannedEndtimeSinglemeasure"
+ id="plannedEndtimeSinglemeasure" class="form-control" autocomplete="no" daterangepicker [options]="{drops: calcDatepickerDropOrientation(input), autoUpdateInput: false, singleDatePicker: true}"
+ (applyDaterangepicker)="singleGridMeasure.plannedEndtimeSinglemeasure=$event.picker.startDate;"
+ (selected)="selectedDate($event, 'singleGridMeasure.plannedEndtimeSinglemeasure')" />
</div>
</div>
<div class="col-md-4">
<label class="form-field-label" for="affectedResourceControl">Betroffenes Objekt / Betriebsmittel</label>
<input disabled="disabled" maxlength="256" [required]="true" type="text" name="affectedResource" id="affectedResourceControl"
- list="affectedResourcesList" [(ngModel)]="gridMeasureDetail.affectedResource" autocomplete="off" class="form-control"
- />
+ list="affectedResourcesList" [(ngModel)]="gridMeasureDetail.affectedResource" autocomplete="off" class="form-control" />
</div>
</div>
<div class="row">
<div class="col-md-4">
<label class="form-field-label" for="responsibleOnSiteName">Verantwortlich Vor-Ort</label>
- <input maxlength="256" [required]="true" type="text" list="responsibleOnSiteNameList" name="responsibleOnSiteName" id="responsibleOnSiteName"
- [(ngModel)]="singleGridMeasure.responsibleOnSiteName" class="form-control" autocomplete="off" />
+ <input maxlength="256" [required]="true" type="text" list="responsibleOnSiteNameList" name="responsibleOnSiteName"
+ id="responsibleOnSiteName" [(ngModel)]="singleGridMeasure.responsibleOnSiteName" class="form-control"
+ autocomplete="off" />
<datalist id="responsibleOnSiteNameList">
<option value=""></option>
<option *ngFor="let responsibleOnSiteNameString of responsibleOnSiteNameList" value="{{ responsibleOnSiteNameString }}">{{responsibleOnSiteNameString}}</option>
@@ -93,7 +102,7 @@
id="responsibleOnSiteDepartment" [(ngModel)]="singleGridMeasure.responsibleOnSiteDepartment" class="form-control"
autocomplete="off" />
<datalist id="responsibleOnSiteDepartmentList">
- <option *ngFor="let department of responsibleOnSiteDepartmentList">{{ department.name }}</option>
+ <option *ngFor="let department of responsibleOnSiteDepartmentList">{{ department }}</option>
</datalist>
</div>
<div class="col-md-4">
@@ -109,7 +118,7 @@
<div class="row">
<div class="col-lg-12">
<label class="form-field-label" for="singleGMDescription">Beschreibung</label>
- <textarea style="resize:none;" maxlength="1024" [required]="true" rows="3" name="singleGMDescription" id="singleGMDescription"
+ <textarea style="resize:none;" maxlength="1024" [required]="false" rows="3" name="singleGMDescription" id="singleGMDescription"
class="form-control" [(ngModel)]="singleGridMeasure.description"></textarea>
</div>
</div>
@@ -122,9 +131,10 @@
</app-step>
</div>
<div class="col-md-8 steps-grid-container">
- <app-steps style="width: 100%" [gridId]="'steps'" [withEditButtons]="true" [gridMeasureDetail]="gridMeasureDetail" [(singleGridMeasure)]="singleGridMeasure">
+ <app-steps style="width: 100%" [gridId]="'steps'" [withEditButtons]="true" [gridMeasureDetail]="gridMeasureDetail"
+ [(singleGridMeasure)]="singleGridMeasure">
loading ...
</app-steps>
</div>
</form>
-</div>
\ No newline at end of file
+</div>
diff --git a/src/app/pages/single-grid-measure-detail-tab/single-grid-measure-detail-tab.component.spec.ts b/src/app/pages/single-grid-measure-detail-tab/single-grid-measure-detail-tab.component.spec.ts
index aff8551..1aff7ad 100644
--- a/src/app/pages/single-grid-measure-detail-tab/single-grid-measure-detail-tab.component.spec.ts
+++ b/src/app/pages/single-grid-measure-detail-tab/single-grid-measure-detail-tab.component.spec.ts
@@ -1,15 +1,20 @@
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
import { Router } from '@angular/router';
import { ModeValidator } from './../../custom_modules/helpers/mode-validator';
-/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-******************************************************************************
- */
+
import { async, fakeAsync, tick, ComponentFixture, TestBed } from '@angular/core/testing';
@@ -51,6 +56,15 @@
getGridMeasure(id: number) {
return this;
}
+ getResponsiblesOnSiteFromSingleGridmeasures() {
+ return this;
+ }
+ getUserDepartmentsResponsibleOnSite() {
+ return this;
+ }
+ getNetworkControlsFromSingleGridmeasures() {
+ return this;
+ }
}
let mockCimCacheService;
@@ -104,7 +118,7 @@
fixture.detectChanges();
});
- xit('should create', () => {
+ it('should create', () => {
expect(component).toBeTruthy();
});
diff --git a/src/app/pages/single-grid-measure-detail-tab/single-grid-measure-detail-tab.component.ts b/src/app/pages/single-grid-measure-detail-tab/single-grid-measure-detail-tab.component.ts
index e10d13c..fba53e8 100644
--- a/src/app/pages/single-grid-measure-detail-tab/single-grid-measure-detail-tab.component.ts
+++ b/src/app/pages/single-grid-measure-detail-tab/single-grid-measure-detail-tab.component.ts
@@ -1,13 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-******************************************************************************
- */
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
import {
Component, OnInit, Input, OnChanges, SimpleChanges, ViewChild, AfterViewChecked, ElementRef, Output,
EventEmitter, OnDestroy, AfterViewInit
@@ -27,7 +32,7 @@
import { RoleAccessHelperService } from '../../services/jobs/role-access-helper.service';
import { SessionContext } from '../../common/session-context';
import { ToasterMessageService } from '../../services/toaster-message.service';
-import { UserDepartment } from '../../model/user-department';
+import { GridMeasureService } from '../../services/grid-measure.service';
@Component({
selector: 'app-single-grid-measure-detail-tab',
@@ -57,20 +62,32 @@
inactiveFields: Array<string> = [];
responsibleOnSiteNameList: string[];
networkControlsList: string[];
- responsibleOnSiteDepartmentList: UserDepartment[];
+ responsibleOnSiteDepartmentList: string[];
@ViewChild('singleGridMeasureDetailFormCotainer') singleGridMeasureDetailFormContainer: ElementRef;
@ViewChild('singleGridForm') singleGridForm: FormGroup;
constructor(private cimCacheService: CimCacheService,
public roleAccessHelper: RoleAccessHelperService,
public sessionContext: SessionContext,
- private toasterMessageService: ToasterMessageService) { }
+ private toasterMessageService: ToasterMessageService,
+ private gridMeasuresService: GridMeasureService) { }
ngOnInit() {
- this.networkControlsList = this.sessionContext.getNetworkControlsFromSingleGridmeasures();
- this.responsibleOnSiteNameList = this.sessionContext.getResponsiblesOnSiteFromGridmeasures();
- this.responsibleOnSiteDepartmentList = this.sessionContext.getAllUserDepartments();
-
+ this.gridMeasuresService.getNetworkControlsFromSingleGridmeasures()
+ .subscribe(net => this.networkControlsList = net,
+ error => {
+ console.log(error);
+ });
+ this.gridMeasuresService.getResponsiblesOnSiteFromSingleGridmeasures()
+ .subscribe(res => this.responsibleOnSiteNameList = res,
+ error => {
+ console.log(error);
+ });
+ this.gridMeasuresService.getUserDepartmentsResponsibleOnSite()
+ .subscribe(departments => this.responsibleOnSiteDepartmentList = departments,
+ error => {
+ console.log(error);
+ });
this.inactiveFields = this.sessionContext.getInactiveFields();
this.getRessourceTypes();
if (this.singleGridMeasure.powerSystemResource) {
diff --git a/src/app/pages/step/step.component.css b/src/app/pages/step/step.component.css
index 865f13a..09c3481 100644
--- a/src/app/pages/step/step.component.css
+++ b/src/app/pages/step/step.component.css
@@ -1,15 +1,19 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
@import url("../grid-measure-detail/grid-measure-detail.component.css");
#Step-head {
display: inline-block
@@ -30,4 +34,4 @@
max-height: 200px;
overflow-y: auto;
overflow-x: auto;
-}
\ No newline at end of file
+}
diff --git a/src/app/pages/step/step.component.html b/src/app/pages/step/step.component.html
index c8f792b..62105e1 100644
--- a/src/app/pages/step/step.component.html
+++ b/src/app/pages/step/step.component.html
@@ -1,14 +1,18 @@
<!--
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
-->
+
<div #stepFormContainer>
<form #stepForm="ngForm" (change)="onStepFormValidation(stepForm.form.valid)">
<fieldset class="form-group" disabled="{{ readOnlyForm ? 'disabled' : ''}}">
@@ -18,8 +22,8 @@
<label class="form-field-label" for="stepAffectedResourcesGroupList">Betriebsmittel-Gruppe</label>
</div>
<div class="col-md-12">
- <select type="text" (change)="onChangeResourceGroup($event.target.value)" name="stepAffectedResourcesGroupList" id="stepAffectedResourcesGroupList"
- class="form-control">
+ <select type="text" (change)="onChangeResourceGroup($event.target.value)" name="stepAffectedResourcesGroupList"
+ id="stepAffectedResourcesGroupList" class="form-control">
<option *ngFor="let stepAffectedResourcesGroupListString of stepAffectedResourcesGroupList" value="{{stepAffectedResourcesGroupListString}}">{{stepAffectedResourcesGroupListString}}</option>
</select>
</div>
@@ -32,7 +36,8 @@
<div class="row" id="treeTable">
<div class="col-md-12" *ngIf="!isTreeAvailable">Noch keine Betriebsmittel-Gruppe ausgewählt</div>
<div *ngIf="isTreeAvailable">
- <tree [tree]="tree" #treeComponent (loadNextLevel)="handleNextLevel($event)" (nodeSelected)="handleSelected($event)" [settings]="{rootIsVisible: false}"></tree>
+ <tree [tree]="tree" #treeComponent (loadNextLevel)="handleNextLevel($event)" (nodeSelected)="handleSelected($event)"
+ [settings]="{rootIsVisible: false}"></tree>
</div>
</div>
</fieldset>
@@ -42,8 +47,8 @@
<label class="form-field-label" for="switchingObject">Objekt der Schaltung</label>
</div>
<div class="col-md-12">
- <input maxlength="256" type="text" list="" [required]="true" name="stepSwitchingObject" id="stepSwitchingObject" class="form-control"
- [(ngModel)]="step.switchingObject" />
+ <input maxlength="256" type="text" list="" [required]="true" name="stepSwitchingObject" id="stepSwitchingObject"
+ class="form-control" [(ngModel)]="step.switchingObject" />
<datalist id="switchingObjectList">
<option></option>
</datalist>
@@ -57,11 +62,11 @@
<label class="form-field-label" for="targetStateControl">Soll-Zustand</label>
</div>
<div class="col-md-6">
- <input autofocus maxlength="256" type="text" [required]="true" name="stepPresentState" id="stepPresentState" class="form-control"
+ <input autofocus maxlength="256" type="text" name="stepPresentState" id="stepPresentState" class="form-control"
[(ngModel)]="step.presentState" />
</div>
<div class="col-md-6">
- <input autofocus maxlength="256" type="text" [required]="true" name="stepTargetState" id="stepTargetState" class="form-control"
+ <input autofocus maxlength="256" type="text" name="stepTargetState" id="stepTargetState" class="form-control"
[(ngModel)]="step.targetState" />
</div>
</div>
@@ -73,12 +78,11 @@
<label class="form-field-label" for="typeControl">Typ</label>
</div>
<div class="col-md-6">
- <input autofocus maxlength="256" type="text" [required]="true" name="stepPresentTime" id="stepPresentTime" class="form-control"
- [(ngModel)]="step.presentTime" />
+ <input autofocus maxlength="256" placeholder="hh:mm" pattern="^((?:[01]\d|2[0-3]):[0-5]\d$)" type="text" name="stepPresentTime"
+ id="stepPresentTime" class="form-control" [(ngModel)]="step.presentTime" />
</div>
<div class="col-md-6">
- <input autofocus maxlength="256" type="text" [required]="true" name="stepType" id="stepType" class="form-control" [(ngModel)]="step.type"
- />
+ <input autofocus maxlength="256" type="text" name="stepType" id="stepType" class="form-control" [(ngModel)]="step.type" />
</div>
</div>
<div class="row">
@@ -86,17 +90,18 @@
<label class="form-field-label" for="stepOperator">Ausführender</label>
</div>
<div class="col-md-12">
- <input autofocus maxlength="256" type="text" [required]="true" name="stepOperator" id="stepOperator" class="form-control"
+ <input autofocus maxlength="256" type="text" name="stepOperator" id="stepOperator" class="form-control"
[(ngModel)]="step.operator" />
</div>
</div>
</fieldset>
<div class="row">
<div class="col-md-12" style="justify-content: flex-end">
- <button class="btn btn-success" id="addStepBtn" (click)="processAddStep()" [disabled]="storageInProgress">Schritt hinzufügen
+ <button class="btn btn-success" id="addStepBtn" (click)="processAddStep()" [disabled]="storageInProgress || readOnlyForm || !stepForm.form.valid">Schritt
+ hinzufügen
<span class="glyphicon glyphicon-plus" id="addStepGlIcon"></span>
</button>
</div>
</div>
</form>
-</div>
\ No newline at end of file
+</div>
diff --git a/src/app/pages/step/step.component.spec.ts b/src/app/pages/step/step.component.spec.ts
index 0580e7e..63155c3 100644
--- a/src/app/pages/step/step.component.spec.ts
+++ b/src/app/pages/step/step.component.spec.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { ComponentFixture, TestBed, async, fakeAsync, tick } from '@angular/core/testing';
import { FormsModule } from '@angular/forms';
import { SimpleChange } from '@angular/core';
@@ -147,19 +151,6 @@
expect(console.log).toHaveBeenCalled();
}));
- xit('should handle cim-service error on onChangeResourceGroup', fakeAsync(() => {
- spyOn(console, 'log').and.callThrough();
- component.singleGridMeasure = GRIDMEASURE[0].listSingleGridmeasures[0];
- mockCimCacheService.error = 'CimCache error';
- mockCimCacheService.content = [];
-
- component.onChangeResourceGroup('fake');
- tick();
-
- fixture.detectChanges();
- expect(console.log).toHaveBeenCalled();
- }));
-
it('should call getRessourceTypes on init', fakeAsync(() => {
spyOn((component as any), 'getRessourceTypes').and.callThrough();
@@ -237,9 +228,9 @@
it('should not be in able to add step if not all fileds are completed', () => {
component.singleGridMeasure.listSteps = [];
component.step = new Step();
- component.step.singleGridmeasureId = 3;
- component.step.switchingObject = 'Regler 123';
- component.step.targetState = '42';
+ // component.step.singleGridmeasureId = 3;
+ // component.step.switchingObject = 'Regler 123';
+ // component.step.targetState = '42';
component.processAddStep();
fixture.detectChanges();
expect(component.singleGridMeasure.listSteps.length).toBe(0);
@@ -250,7 +241,7 @@
component.step.singleGridmeasureId = 3;
component.step.switchingObject = 'Regler 123';
component.step.targetState = '42';
- component.step.presentTime = '2.4.2018';
+ component.step.presentTime = '22:44';
component.step.operator = 'otto';
component.step.type = 'supertype';
component.step.presentState = 'top';
@@ -291,17 +282,18 @@
expect(component.handleNextLevel).toHaveBeenCalled();
});
- xit('should prepareTreeModel and show the tree', async(() => {
- spyOn(component, 'prepareTreeModel').and.returnValue(Promise.resolve);
- const resources = JSON.parse(JSON.stringify(POWERSYSTEMRESOURCES));
+ it('should validate step form', () => {
+ spyOn(component, 'onStepFormValidation').and.callThrough();
+ component.onStepFormValidation(true);
fixture.detectChanges();
- component.prepareTreeModel(resources, 1);
+ expect(component.step._isValide).toBeTruthy();
+ });
- fixture.whenStable().then(() => {
- fixture.detectChanges();
- expect(component.isTreeAvailable).toBeTruthy();
- });
-
- }));
+ it('should validate step form', () => {
+ spyOn(component, 'onStepFormValidation').and.callThrough();
+ component.onStepFormValidation(true);
+ fixture.detectChanges();
+ expect(component.step._isValide).toBeTruthy();
+ });
});
diff --git a/src/app/pages/step/step.component.ts b/src/app/pages/step/step.component.ts
index 59173ae..90a3fa3 100644
--- a/src/app/pages/step/step.component.ts
+++ b/src/app/pages/step/step.component.ts
@@ -1,13 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-******************************************************************************
- */
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
import {
Component, OnInit, Input, OnChanges, SimpleChanges, ViewChild, AfterViewChecked,
ElementRef, OnDestroy, ChangeDetectorRef, AfterViewInit
@@ -39,7 +44,6 @@
form: HTMLFormElement;
readOnlyForm: boolean;
- stepFormValid: boolean;
isStatusCollapsed = true;
storageInProgress: boolean;
step: Step = new Step();
@@ -105,12 +109,6 @@
ngOnDestroy() {
}
- public onUseRessourceBtnClick(selectedVal: any) {
- if (selectedVal) {
- this.step.switchingObject = selectedVal;
- }
- }
-
public processAddStep() {
if (!this.isStepEmpty()) {
@@ -134,7 +132,7 @@
this.storageInProgress = false;
} else {
- this.toasterMessageService.showWarn('Bitte alle Felder in Schrittsequenz aufüllen!');
+ this.toasterMessageService.showWarn('Bitte das Pflichtfeld "Objekt der Schaltung" in der Schrittsequenz ausfüllen!');
}
}
@@ -144,8 +142,7 @@
}
isStepEmpty() {
- if (!this.step.switchingObject || !this.step.targetState || !this.step.presentState
- || !this.step.presentTime || !this.step.type || !this.step.operator) {
+ if (!this.step.switchingObject) {
return true;
} else {
return false;
diff --git a/src/app/services/auth-guard.service.spec.ts b/src/app/services/auth-guard.service.spec.ts
index 4fcda72..964ad03 100644
--- a/src/app/services/auth-guard.service.spec.ts
+++ b/src/app/services/auth-guard.service.spec.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { TestBed, async, inject } from '@angular/core/testing';
import { Router } from '@angular/router';
import { AuthGuard } from './auth-guard.service';
diff --git a/src/app/services/auth-guard.service.ts b/src/app/services/auth-guard.service.ts
index 57064b1..958d5de 100644
--- a/src/app/services/auth-guard.service.ts
+++ b/src/app/services/auth-guard.service.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { Injectable } from '@angular/core';
import { CanActivate, Router } from '@angular/router';
import { SessionContext } from '../common/session-context';
diff --git a/src/app/services/authentication.service.spec.ts b/src/app/services/authentication.service.spec.ts
index d1fa9aa..945a1b8 100644
--- a/src/app/services/authentication.service.spec.ts
+++ b/src/app/services/authentication.service.spec.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { HttpClientModule, HttpXhrBackend } from '@angular/common/http';
import { TestBed, async, inject } from '@angular/core/testing';
import { MockBackend } from '@angular/http/testing';
diff --git a/src/app/services/authentication.service.ts b/src/app/services/authentication.service.ts
index 07ab805..86b8853 100644
--- a/src/app/services/authentication.service.ts
+++ b/src/app/services/authentication.service.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import { SessionContext } from '../common/session-context';
diff --git a/src/app/services/backend-settings.service.spec.ts b/src/app/services/backend-settings.service.spec.ts
index 4a52d09..7727185 100644
--- a/src/app/services/backend-settings.service.spec.ts
+++ b/src/app/services/backend-settings.service.spec.ts
@@ -1,13 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { TestBed, inject } from '@angular/core/testing';
import { BackendSettingsService } from './backend-settings.service';
diff --git a/src/app/services/backend-settings.service.ts b/src/app/services/backend-settings.service.ts
index adc72a9..8ac5287 100644
--- a/src/app/services/backend-settings.service.ts
+++ b/src/app/services/backend-settings.service.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { Injectable } from '@angular/core';
import { SessionContext } from '../common/session-context';
import { BaseHttpService, HttpMethodEn, HttpCallInfo } from './base-http.service';
diff --git a/src/app/services/base-data.service.spec.ts b/src/app/services/base-data.service.spec.ts
index cf03252..2e0e575 100644
--- a/src/app/services/base-data.service.spec.ts
+++ b/src/app/services/base-data.service.spec.ts
@@ -1,14 +1,18 @@
/*
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
import { TestBed, inject } from '@angular/core/testing';
import { BaseHttpService, HttpMethodEn } from './base-http.service';
import { BaseDataService } from './base-data.service';
@@ -33,15 +37,6 @@
});
});
- it('should call getResponsiblesOnSiteFromGridmeasures', inject([BaseDataService], (service: BaseDataService) => {
- expect(service).toBeTruthy();
-
- service.getResponsiblesOnSiteFromGridmeasures();
- expect(mockedBaseHttpService.lastHttpCallInfo.method).toBe(HttpMethodEn.get);
- expect(mockedBaseHttpService.lastHttpCallInfo.uriFragment).toContain('getResponsiblesOnSiteFromGridmeasures');
-
- }));
-
it('should call getBranches', inject([BaseDataService], (service: BaseDataService) => {
expect(service).toBeTruthy();
@@ -78,15 +73,6 @@
}));
- it('should call getUserDepartment', inject([BaseDataService], (service: BaseDataService) => {
- expect(service).toBeTruthy();
-
- service.getUserDepartments();
- expect(mockedBaseHttpService.lastHttpCallInfo.method).toBe(HttpMethodEn.get);
- expect(mockedBaseHttpService.lastHttpCallInfo.uriFragment).toContain('getUserDepartments');
-
- }));
-
it('should call getEmailAddressesFromTemplates', inject([BaseDataService], (service: BaseDataService) => {
expect(service).toBeTruthy();
diff --git a/src/app/services/base-data.service.ts b/src/app/services/base-data.service.ts
index 61491fa..385e6a6 100644
--- a/src/app/services/base-data.service.ts
+++ b/src/app/services/base-data.service.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/observable/throw';
@@ -17,7 +21,6 @@
import { Globals } from '../common/globals';
import { SessionContext } from '../common/session-context';
import { Status } from '../model/status';
-import { UserDepartment } from '../model/user-department';
import { Branch } from './../model/branch';
import { CostCenter } from './../model/cost-center';
import { BaseHttpService, HttpCallInfo, HttpMethodEn } from './base-http.service';
@@ -32,22 +35,11 @@
private sessionContext: SessionContext) {
}
- public getNetworkControlsFromSingleGridmeasures(): Observable<string[]> {
- return this.baseHttpService.callService(
- new HttpCallInfo(Globals.GRID_MEASURES_SERVICE_NAME, HttpMethodEn.get, '/getNetworkControlsFromSingleGridmeasures', null),
- this.sessionContext);
- }
-
- public getResponsiblesOnSiteFromGridmeasures(): Observable<string[]> {
- return this.baseHttpService.callService(
- new HttpCallInfo(Globals.GRID_MEASURES_SERVICE_NAME, HttpMethodEn.get, '/getResponsiblesOnSiteFromGridmeasures', null),
- this.sessionContext);
- }
-
public getBranches(): Observable<Branch[]> {
return this.baseHttpService.callService(
new HttpCallInfo(Globals.GRID_MEASURES_SERVICE_NAME, HttpMethodEn.get, '/getBranches', null), this.sessionContext);
}
+
public getBranchLevels(branchId: number): Observable<BranchLevel[]> {
return this.baseHttpService.callService(
new HttpCallInfo(Globals.GRID_MEASURES_SERVICE_NAME, HttpMethodEn.get, '/getBranchLevelsByBranch/' + branchId, null),
@@ -58,14 +50,11 @@
return this.baseHttpService.callService(
new HttpCallInfo(Globals.GRID_MEASURES_SERVICE_NAME, HttpMethodEn.get, '/getGmStatus', null), this.sessionContext);
}
+
public getCostCenters(): Observable<CostCenter[]> {
return this.baseHttpService.callService(
new HttpCallInfo(Globals.GRID_MEASURES_SERVICE_NAME, HttpMethodEn.get, '/getCostCenters', null), this.sessionContext);
}
- public getUserDepartments(): Observable<UserDepartment[]> {
- return this.baseHttpService.callService(
- new HttpCallInfo(Globals.GRID_MEASURES_SERVICE_NAME, HttpMethodEn.get, '/getUserDepartments', null), this.sessionContext);
- }
public getEmailAddressesFromTemplates(): Observable<string[]> {
return this.baseHttpService.callService(
diff --git a/src/app/services/base-http.service.spec.ts b/src/app/services/base-http.service.spec.ts
index 68ad795..45b6e62 100644
--- a/src/app/services/base-http.service.spec.ts
+++ b/src/app/services/base-http.service.spec.ts
@@ -1,21 +1,26 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { TestBed, fakeAsync, inject, tick } from '@angular/core/testing';
import { ErrorType } from '../common/enums';
import { Globals } from '../common/globals';
import { SessionContext } from '../common/session-context';
-import { MessageServiceCustom } from '../services/message.service';
import { BaseHttpService, HttpCallInfo, HttpMethodEn } from './base-http.service';
import { HttpClient, HttpClientModule, HttpHeaders, HttpErrorResponse } from '@angular/common/http';
+import { ToasterMessageService } from './toaster-message.service';
+import { MessageService } from 'primeng/api';
class MockResponse {
status: number;
@@ -28,24 +33,27 @@
describe('BaseHttpService', () => {
class BaseHttpServiceMock extends BaseHttpService {
- public constructor(public messageService: MessageServiceCustom, public http: HttpClient) {
- super(messageService, http);
+ public constructor(public toasterMessageService1: ToasterMessageService, public http: HttpClient) {
+ super(toasterMessageService1, http);
}
public getBaseUrl(): string {
return super.getBaseUrl();
}
}
let sessionContext: SessionContext;
+ let toasterMessageService;
+ let messageService;
beforeEach(() => {
+ messageService = new MessageService();
sessionContext = new SessionContext();
sessionContext.clearStorage();
-
+ toasterMessageService = new ToasterMessageService(sessionContext, messageService);
TestBed.configureTestingModule({
imports: [HttpClientModule],
providers: [
BaseHttpService,
- MessageServiceCustom,
+ { provide: ToasterMessageService, useValue: toasterMessageService },
{ provide: SessionContext, useValue: sessionContext }
]
});
diff --git a/src/app/services/base-http.service.ts b/src/app/services/base-http.service.ts
index 39b6bdd..949587d 100644
--- a/src/app/services/base-http.service.ts
+++ b/src/app/services/base-http.service.ts
@@ -1,23 +1,27 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { HttpClient, HttpHeaders, HttpResponse, HttpErrorResponse } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { UUID } from 'angular2-uuid';
import { Observable } from 'rxjs/Observable';
-import { BannerMessage } from '../common/banner-message';
+import { ToasterMessage } from '../common/banner-message';
import { ErrorType } from '../common/enums';
import { Globals } from '../common/globals';
import { SessionContext } from '../common/session-context';
-import { MessageServiceCustom } from './message.service';
+import { ToasterMessageService } from './toaster-message.service';
export enum HttpMethodEn {
get = 'GET',
@@ -56,7 +60,7 @@
@Injectable()
export class BaseHttpService implements BaseHttpServiceInterface {
- constructor(protected messageService: MessageServiceCustom,
+ constructor(protected toasterMessageService: ToasterMessageService,
protected http: HttpClient) {
}
@@ -154,10 +158,10 @@
let body = null;
if (error instanceof HttpErrorResponse) {
- if (error.status === 401 && this.messageService) {
- const bannerMessage = new BannerMessage();
+ if (error.status === 401 && this.toasterMessageService) {
+ const bannerMessage = new ToasterMessage();
bannerMessage.errorType = ErrorType.authentication;
- this.messageService.errorOccured$.emit(bannerMessage);
+ this.toasterMessageService.errorOccured$.emit(bannerMessage);
return Observable.throw(ErrorType.authentication);
}
body = error || '';
diff --git a/src/app/services/cim-cache.service.spec.ts b/src/app/services/cim-cache.service.spec.ts
index fd4356e..f8c1232 100644
--- a/src/app/services/cim-cache.service.spec.ts
+++ b/src/app/services/cim-cache.service.spec.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { TestBed, inject } from '@angular/core/testing';
import { BaseHttpService, HttpMethodEn } from './base-http.service';
import { CimCacheService } from './cim-cache.service';
@@ -57,4 +61,14 @@
.toBe('/electricity/dynamic-topology/power-system-resources?revision=1&power-system-resource-types=' + ressourceType);
expect(mockedBaseHttpService.lastHttpCallInfo.serviceName).toBe(Globals.CIM_CACHE_SERVICE);
}));
+
+ it('should call get getTopology', inject([CimCacheService], (service: CimCacheService) => {
+ mockedBaseHttpService.content = [];
+ service.getTopology();
+
+ expect(mockedBaseHttpService.lastHttpCallInfo.method).toBe(HttpMethodEn.get);
+ expect(mockedBaseHttpService.lastHttpCallInfo.uriFragment)
+ .toBe('/electricity/dynamic-topology/topology?revision=1');
+ expect(mockedBaseHttpService.lastHttpCallInfo.serviceName).toBe(Globals.CIM_CACHE_SERVICE);
+ }));
});
diff --git a/src/app/services/cim-cache.service.ts b/src/app/services/cim-cache.service.ts
index a5c300d..3e5c8c8 100644
--- a/src/app/services/cim-cache.service.ts
+++ b/src/app/services/cim-cache.service.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { SessionContext } from './../common/session-context';
import { BaseHttpService, HttpCallInfo, HttpMethodEn } from './base-http.service';
import { Injectable } from '@angular/core';
diff --git a/src/app/services/document.service.spec.ts b/src/app/services/document.service.spec.ts
index 2f175dd..1698175 100644
--- a/src/app/services/document.service.spec.ts
+++ b/src/app/services/document.service.spec.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { BaseHttpService, HttpMethodEn } from './base-http.service';
import { TestBed, inject } from '@angular/core/testing';
import { MockBaseHttpService } from '../testing/mock-base-http.service';
diff --git a/src/app/services/document.service.ts b/src/app/services/document.service.ts
index c1158fa..adfc604 100644
--- a/src/app/services/document.service.ts
+++ b/src/app/services/document.service.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import { Globals } from '../common/globals';
diff --git a/src/app/services/grid-measure.service.spec.ts b/src/app/services/grid-measure.service.spec.ts
index 4517846..80a91a8 100644
--- a/src/app/services/grid-measure.service.spec.ts
+++ b/src/app/services/grid-measure.service.spec.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { TestBed, inject } from '@angular/core/testing';
import { BaseHttpService, HttpMethodEn } from './base-http.service';
import { GridMeasureService } from './grid-measure.service';
@@ -72,4 +76,67 @@
}));
+ it('should call getUserDepartmentsCreated', inject([GridMeasureService], (service: GridMeasureService) => {
+ expect(service).toBeTruthy();
+
+ service.getUserDepartmentsCreated();
+ expect(mockedBaseHttpService.lastHttpCallInfo.method).toBe(HttpMethodEn.get);
+ expect(mockedBaseHttpService.lastHttpCallInfo.uriFragment).toContain('getUserDepartmentsCreated');
+
+ }));
+
+ it('should call getUserDepartmentsModified', inject([GridMeasureService], (service: GridMeasureService) => {
+ expect(service).toBeTruthy();
+
+ service.getUserDepartmentsModified();
+ expect(mockedBaseHttpService.lastHttpCallInfo.method).toBe(HttpMethodEn.get);
+ expect(mockedBaseHttpService.lastHttpCallInfo.uriFragment).toContain('getUserDepartmentsModified');
+
+ }));
+
+ it('should call getUserDepartmentsResponsibleOnSite', inject([GridMeasureService], (service: GridMeasureService) => {
+ expect(service).toBeTruthy();
+
+ service.getUserDepartmentsResponsibleOnSite();
+ expect(mockedBaseHttpService.lastHttpCallInfo.method).toBe(HttpMethodEn.get);
+ expect(mockedBaseHttpService.lastHttpCallInfo.uriFragment).toContain('getUserDepartmentsResponsibleOnSite');
+
+ }));
+
+ it('should call getResponsiblesOnSiteFromSingleGridmeasures', inject([GridMeasureService], (service: GridMeasureService) => {
+ expect(service).toBeTruthy();
+
+ service.getResponsiblesOnSiteFromSingleGridmeasures();
+ expect(mockedBaseHttpService.lastHttpCallInfo.method).toBe(HttpMethodEn.get);
+ expect(mockedBaseHttpService.lastHttpCallInfo.uriFragment).toContain('getResponsiblesOnSiteFromSingleGridmeasures');
+
+ }));
+
+ it('should call getNetworkControlsFromSingleGridmeasures', inject([GridMeasureService], (service: GridMeasureService) => {
+ expect(service).toBeTruthy();
+
+ service.getNetworkControlsFromSingleGridmeasures();
+ expect(mockedBaseHttpService.lastHttpCallInfo.method).toBe(HttpMethodEn.get);
+ expect(mockedBaseHttpService.lastHttpCallInfo.uriFragment).toContain('getNetworkControlsFromSingleGridmeasures');
+
+ }));
+
+ it('should call getAffectedResourcesDistinct', inject([GridMeasureService], (service: GridMeasureService) => {
+ expect(service).toBeTruthy();
+
+ service.getAffectedResourcesDistinct();
+ expect(mockedBaseHttpService.lastHttpCallInfo.method).toBe(HttpMethodEn.get);
+ expect(mockedBaseHttpService.lastHttpCallInfo.uriFragment).toContain('getAffectedResourcesDistinct');
+
+ }));
+
+ it('should call getCalender', inject([GridMeasureService], (service: GridMeasureService) => {
+ expect(service).toBeTruthy();
+
+ service.getCalender();
+ expect(mockedBaseHttpService.lastHttpCallInfo.method).toBe(HttpMethodEn.get);
+ expect(mockedBaseHttpService.lastHttpCallInfo.uriFragment).toContain('getCalender');
+
+ }));
+
});
diff --git a/src/app/services/grid-measure.service.ts b/src/app/services/grid-measure.service.ts
index 9c46bf4..cac8fa4 100644
--- a/src/app/services/grid-measure.service.ts
+++ b/src/app/services/grid-measure.service.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/observable/throw';
@@ -20,6 +24,7 @@
import { StatusChange } from '../model/status-change';
import { BaseHttpService, HttpCallInfo, HttpMethodEn } from './base-http.service';
import { StatusMainFilter } from '../model/status-main-filter';
+import { CalendarEntry } from '../model/calendar-entry';
@Injectable()
export class GridMeasureService {
@@ -29,6 +34,7 @@
private baseHttpService: BaseHttpService,
private sessionContext: SessionContext) {
}
+
storeGridMeasure(gridMeasure: GridMeasure): Observable<GridMeasure> {
return this.baseHttpService.callService(
new HttpCallInfo(Globals.GRID_MEASURES_SERVICE_NAME, HttpMethodEn.put, '/storeGridMeasure', gridMeasure),
@@ -42,20 +48,58 @@
isMainFilterSetAndActive ? statusMainFilter.item : null),
this.sessionContext);
}
+
getGridMeasure(id: number): Observable<GridMeasure> {
return this.baseHttpService.callService(
new HttpCallInfo(Globals.GRID_MEASURES_SERVICE_NAME, HttpMethodEn.get, '/getGridMeasure/' + id, null),
this.sessionContext);
}
+
getHistoricalStatusChanges(id: number): Observable<StatusChange[]> {
return this.baseHttpService.callService(
new HttpCallInfo(Globals.GRID_MEASURES_SERVICE_NAME, HttpMethodEn.get, '/getHistoricalStatusChanges/' + id, null),
this.sessionContext);
}
+
getAffectedResourcesDistinct(): Observable<string[]> {
return this.baseHttpService.callService(
new HttpCallInfo(Globals.GRID_MEASURES_SERVICE_NAME, HttpMethodEn.get, '/getAffectedResourcesDistinct/', null),
this.sessionContext);
}
+
+ getResponsiblesOnSiteFromSingleGridmeasures(): Observable<string[]> {
+ return this.baseHttpService.callService(
+ new HttpCallInfo(Globals.GRID_MEASURES_SERVICE_NAME, HttpMethodEn.get, '/getResponsiblesOnSiteFromSingleGridmeasures', null),
+ this.sessionContext);
+ }
+
+ getNetworkControlsFromSingleGridmeasures(): Observable<string[]> {
+ return this.baseHttpService.callService(
+ new HttpCallInfo(Globals.GRID_MEASURES_SERVICE_NAME, HttpMethodEn.get, '/getNetworkControlsFromSingleGridmeasures', null),
+ this.sessionContext);
+ }
+
+ getUserDepartmentsCreated(): Observable<string[]> {
+ return this.baseHttpService.callService(
+ new HttpCallInfo(Globals.GRID_MEASURES_SERVICE_NAME, HttpMethodEn.get,
+ '/getUserDepartmentsCreated', null), this.sessionContext);
+ }
+
+ getUserDepartmentsModified(): Observable<string[]> {
+ return this.baseHttpService.callService(
+ new HttpCallInfo(Globals.GRID_MEASURES_SERVICE_NAME, HttpMethodEn.get,
+ '/getUserDepartmentsModified', null), this.sessionContext);
+ }
+
+ getUserDepartmentsResponsibleOnSite(): Observable<string[]> {
+ return this.baseHttpService.callService(
+ new HttpCallInfo(Globals.GRID_MEASURES_SERVICE_NAME, HttpMethodEn.get,
+ '/getUserDepartmentsResponsibleOnSite', null), this.sessionContext);
+ }
+
+ getCalender(): Observable<CalendarEntry[]> {
+ return this.baseHttpService.callService(
+ new HttpCallInfo(Globals.GRID_MEASURES_SERVICE_NAME, HttpMethodEn.get, '/getCalender', null), this.sessionContext);
+ }
}
diff --git a/src/app/services/http-response-interceptor.service.spec.ts b/src/app/services/http-response-interceptor.service.spec.ts
index c466e15..3136ee2 100644
--- a/src/app/services/http-response-interceptor.service.spec.ts
+++ b/src/app/services/http-response-interceptor.service.spec.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { TestBed } from '@angular/core/testing';
import { HttpResponseInterceptorService } from './http-response-interceptor.service';
diff --git a/src/app/services/http-response-interceptor.service.ts b/src/app/services/http-response-interceptor.service.ts
index 0ea81fb..e6bfc7d 100644
--- a/src/app/services/http-response-interceptor.service.ts
+++ b/src/app/services/http-response-interceptor.service.ts
@@ -1,28 +1,30 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
-import { Injectable, OnInit } from '@angular/core';
+
+import { Injectable } from '@angular/core';
import { Router, ActivatedRoute } from '@angular/router';
-import { MessageServiceCustom, MessageDefines } from '../services/message.service';
-import { BannerMessage } from '../common/banner-message';
-import { SessionContext } from '../common/session-context';
+import { ToasterMessage } from '../common/banner-message';
import { ErrorType } from '../common/enums';
+import { ToasterMessageService, MessageDefines } from './toaster-message.service';
@Injectable()
export class HttpResponseInterceptorService {
constructor(
- private messageService: MessageServiceCustom,
+ private messageService: ToasterMessageService,
private router: Router,
- private sessionContext: SessionContext,
private activatedRoute: ActivatedRoute) { this.init(); }
private init(): void {
@@ -30,20 +32,8 @@
}
private subscribeToMessageService() {
- this.messageService.errorOccured$.subscribe((errorMessage: BannerMessage) => {
- if ((errorMessage.errorType !== ErrorType.authentication)) {
- const errorTypeIsLocked = errorMessage.errorType === ErrorType.locked;
-
- errorMessage.showButton = errorTypeIsLocked;
-
-
- if (errorTypeIsLocked) {
- errorMessage.isSetTimeout = false;
- }
-
- this.sessionContext.setBannerMessage(errorMessage);
-
- } else {
+ this.messageService.errorOccured$.subscribe((errorMessage: ToasterMessage) => {
+ if ((errorMessage.errorType === ErrorType.authentication)) {
if (this.router.url.includes('loggedout')) {
return;
}
diff --git a/src/app/services/jobs/base-data-loader.service.spec.ts b/src/app/services/jobs/base-data-loader.service.spec.ts
index 2c65741..47027b5 100644
--- a/src/app/services/jobs/base-data-loader.service.spec.ts
+++ b/src/app/services/jobs/base-data-loader.service.spec.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { async, fakeAsync, tick } from '@angular/core/testing';
import { Observable } from 'rxjs/Observable';
import { SessionContext } from '../../common/session-context';
@@ -16,23 +20,22 @@
import { CostCenter } from '../../model/cost-center';
import { Status } from '../../model/status';
import { User } from '../../model/user';
-import { MessageDefines, MessageServiceCustom } from '../../services/message.service';
+import { MessageDefines, ToasterMessageService } from '../../services/toaster-message.service';
import { USERS } from '../../test-data/users';
import { AbstractMockObservableService } from '../../testing/abstract-mock-observable.service';
import { RoleAccess } from './../../model/role-access';
-import { UserDepartment } from './../../model/user-department';
import { BaseDataLoaderService } from './base-data-loader.service';
import { RoleAccessHelperService } from './role-access-helper.service';
import { BackendSettings } from './../../model/backend-settings';
import { HttpClient } from '@angular/common/http';
import { TERRITORY } from '../../test-data/territories';
-import { Territory } from '../../model/territory';
+import { MessageService } from 'primeng/api';
describe('BaseDataLoaderService', () => {
class MockDataService extends AbstractMockObservableService {
public branchList: Branch[];
public statusList: Status[];
- public departmentList: UserDepartment[];
+ public departmentList: string[];
public costCenters: CostCenter[];
public emailAddresses: string[];
public responsibleOnSiteNameList: string[];
@@ -54,20 +57,13 @@
return newService;
}
- getResponsiblesOnSiteFromGridmeasures() {
+ getResponsiblesOnSiteFromSingleGridmeasures() {
const newService = new MockDataService();
newService.content = this.responsibleOnSiteNameList;
newService.error = this.responsibleOnSiteNameError;
return newService;
}
- getNetworkControlsFromSingleGridmeasures() {
- const newService = new MockDataService();
- newService.content = this.NetworkControlsNameList;
- newService.error = this.NetworkControlsNameError;
- return newService;
- }
-
getTerritories() {
const newService = new MockDataService();
newService.content = this.areaOfSwitchingList;
@@ -87,12 +83,6 @@
newService.error = this.costCenterError;
return newService;
}
- getUserDepartments() {
- const newService = new MockDataService();
- newService.content = this.departmentList;
- newService.error = this.departmentError;
- return newService;
- }
getEmailAddressesFromTemplates() {
const newService = new MockDataService();
newService.content = this.emailAddresses;
@@ -138,27 +128,27 @@
let sessionContext: SessionContext;
- let messageService: MessageServiceCustom;
+ let toasterMessageSercie: ToasterMessageService;
let mockRoleAccessService;
let mockDataService;
let loaderServer: BaseDataLoaderService;
let mockUserService;
let roleAccessHelper: RoleAccessHelperService;
let mockBackendSettings;
-
+ let msgService: MessageService;
beforeEach(async(() => {
mockDataService = new MockDataService();
mockUserService = new MockUserService();
mockRoleAccessService = new MockRoleAccessService();
mockBackendSettings = new MockBackendSettingsService();
-
+ msgService = new MessageService();
sessionContext = new SessionContext();
sessionContext.clearStorage();
- messageService = new MessageServiceCustom(sessionContext);
+ toasterMessageSercie = new ToasterMessageService(sessionContext, msgService);
roleAccessHelper = new RoleAccessHelperService();
- loaderServer = new BaseDataLoaderService(mockDataService, mockUserService, messageService,
+ loaderServer = new BaseDataLoaderService(mockDataService, mockUserService, toasterMessageSercie,
sessionContext, mockRoleAccessService, roleAccessHelper, mockBackendSettings);
}));
@@ -167,11 +157,8 @@
it('should be load the base-data after MSG_LOG_IN_SUCCEEDED-Message "', fakeAsync(() => {
mockDataService.statusList = [{ id: 1, name: 'neu' }];
mockDataService.branchList = [{ id: 1, name: 'W', description: 'Wasser' }];
- mockDataService.departmentList = [{ id: 1, name: 'Abteilung 1' }, { id: 2, name: 'Abteilung 2' }];
mockDataService.costCenters = [{ id: 1, name: 'cc1' }, { id: 2, name: 'cc2' }];
mockDataService.emailAddresses = ['testpreconfmail@test.de', 'testpreconfmail2@test.de'];
- mockDataService.responsibleOnSiteNameList = ['harald', 'simon'];
- mockDataService.NetworkControlsNameList = ['test', 'mich'];
mockDataService.areaOfSwitchingList = JSON.parse(JSON.stringify(TERRITORY));
mockUserService.userList = USERS;
mockBackendSettings.backendSettings = [{ reminderPeriod: 48 }];
@@ -231,20 +218,15 @@
expect(sessionContext.getStatuses()).toBeNull();
expect(sessionContext.getBranches()).toBeNull();
- expect(sessionContext.getAllUserDepartments()).toBeNull();
expect(sessionContext.getAllUsers()).toBeNull();
expect(sessionContext.getBackendsettings()).toBeNull();
expect(sessionContext.getEmailAddressesFromTemplates()).toBeNull();
- expect(sessionContext.getResponsiblesOnSiteFromGridmeasures()).toBeNull();
expect(sessionContext.getTerritories()).toBeNull();
- messageService.loginLogoff$.emit(MessageDefines.MSG_LOG_IN_SUCCEEDED);
+ toasterMessageSercie.loginLogoff$.emit(MessageDefines.MSG_LOG_IN_SUCCEEDED);
tick();
- expect(sessionContext.getAllUserDepartments().length).toBe(2);
- expect(sessionContext.getAllUserDepartments()[0].name).toBe('Abteilung 1');
-
expect(sessionContext.getStatuses().length).toBe(1);
expect(sessionContext.getStatuses()[0].name).toBe('neu');
@@ -254,12 +236,6 @@
expect(sessionContext.getEmailAddressesFromTemplates().length).toBe(2);
expect(sessionContext.getEmailAddressesFromTemplates()[0]).toBe('testpreconfmail@test.de');
- expect(sessionContext.getResponsiblesOnSiteFromGridmeasures().length).toBe(2);
- expect(sessionContext.getResponsiblesOnSiteFromGridmeasures()[0]).toBe('harald');
-
- expect(sessionContext.getNetworkControlsFromSingleGridmeasures().length).toBe(2);
- expect(sessionContext.getNetworkControlsFromSingleGridmeasures()[0]).toBe('test');
-
expect(sessionContext.getTerritories().length).toBe(3);
expect(sessionContext.getTerritories()[0].name).toBe('h1');
@@ -284,12 +260,12 @@
mockDataService.areaOfSwitchingError = 'Error in areaOfSwitching service';
mockBackendSettings.backendSettingsError = 'Error in backendsettings service';
(mockRoleAccessService as MockRoleAccessService).roleAccessError = 'Error in roleAcess service';
- messageService.loginLogoff$.emit(MessageDefines.MSG_LOG_IN_SUCCEEDED);
- messageService.loginLogoff$.emit(MessageDefines.MSG_LOG_OFF);
+ toasterMessageSercie.loginLogoff$.emit(MessageDefines.MSG_LOG_IN_SUCCEEDED);
+ toasterMessageSercie.loginLogoff$.emit(MessageDefines.MSG_LOG_OFF);
tick();
- expect(console.log).toHaveBeenCalledTimes(9);
+ expect(console.log).toHaveBeenCalledTimes(7);
}));
});
diff --git a/src/app/services/jobs/base-data-loader.service.ts b/src/app/services/jobs/base-data-loader.service.ts
index 90a51d4..fc5f36e 100644
--- a/src/app/services/jobs/base-data-loader.service.ts
+++ b/src/app/services/jobs/base-data-loader.service.ts
@@ -1,16 +1,20 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { Injectable } from '@angular/core';
-import { MessageServiceCustom, MessageDefines } from '../message.service';
+import { ToasterMessageService, MessageDefines } from '../toaster-message.service';
import { UserService } from '../user.service';
import { SessionContext } from '../../common/session-context';
import { BaseDataService } from '../base-data.service';
@@ -25,7 +29,7 @@
constructor(
private baseDataService: BaseDataService,
private userService: UserService,
- private msgService: MessageServiceCustom,
+ private msgService: ToasterMessageService,
private sessionContext: SessionContext,
private roleAccessService: RoleAccessService,
private roleAccessHelper: RoleAccessHelperService,
@@ -56,18 +60,6 @@
console.log(error);
});
- this.baseDataService.getNetworkControlsFromSingleGridmeasures()
- .subscribe(res => this.sessionContext.setNetworkControlsFromSingleGridmeasures(res),
- error => {
- console.log(error);
- });
-
- this.baseDataService.getResponsiblesOnSiteFromGridmeasures()
- .subscribe(res => this.sessionContext.setResponsiblesOnSiteFromGridmeasures(res),
- error => {
- console.log(error);
- });
-
this.baseDataService.getBranches()
.subscribe(branch => this.sessionContext.setBranches(branch),
error => {
@@ -90,12 +82,6 @@
this.loadRoleAccessdefinitions();
- this.baseDataService.getUserDepartments()
- .subscribe(departments => this.sessionContext.setAllUserDepartments(departments),
- error => {
- console.log(error);
- });
-
this.baseDataService.getEmailAddressesFromTemplates()
.subscribe(emails => this.sessionContext.setEmailAddressesFromTemplates(emails),
error => {
diff --git a/src/app/services/jobs/reminder-caller-job.service.spec.ts b/src/app/services/jobs/reminder-caller-job.service.spec.ts
index e82617c..1d6bbe7 100644
--- a/src/app/services/jobs/reminder-caller-job.service.spec.ts
+++ b/src/app/services/jobs/reminder-caller-job.service.spec.ts
@@ -1,22 +1,27 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { async, fakeAsync, tick, TestBed, ComponentFixture, inject, discardPeriodicTasks } from '@angular/core/testing';
-import { MessageServiceCustom, MessageDefines } from '../../services/message.service';
+import { ToasterMessageService, MessageDefines } from '../../services/toaster-message.service';
import { AbstractMockObservableService } from '../../testing/abstract-mock-observable.service';
import { SessionContext } from '../../common/session-context';
import { ReminderCallerJobService } from './reminder-caller-job.service';
import { Globals } from '../../common/globals';
import { ReminderService } from '../reminder.service';
+import { MessageService } from 'primeng/api';
@@ -34,23 +39,24 @@
let sessionContext: SessionContext;
- let messageService: MessageServiceCustom;
+ let toasterMessageService: ToasterMessageService;
let mockReminderService;
let injectedService;
+ let msgService: MessageService;
beforeEach(async(() => {
-
+ msgService = new MessageService();
mockReminderService = new MockReminderService();
sessionContext = new SessionContext();
sessionContext.clearStorage();
- messageService = new MessageServiceCustom(sessionContext);
- injectedService = new ReminderCallerJobService(sessionContext, mockReminderService, messageService);
+ toasterMessageService = new ToasterMessageService(sessionContext, msgService);
+ injectedService = new ReminderCallerJobService(sessionContext, mockReminderService, toasterMessageService);
TestBed.configureTestingModule({
providers: [
{ provide: ReminderService, useValue: mockReminderService },
{ provide: SessionContext, useValue: sessionContext },
- MessageServiceCustom
+ ToasterMessageService
]
}).compileComponents();
@@ -60,7 +66,7 @@
spyOn(injectedService, 'init').and.callThrough();
expect(injectedService.init).toHaveBeenCalledTimes(0);
- messageService.loginLogoff$.emit(MessageDefines.MSG_LOG_IN_SUCCEEDED);
+ toasterMessageService.loginLogoff$.emit(MessageDefines.MSG_LOG_IN_SUCCEEDED);
tick();
expect(injectedService.init).toHaveBeenCalledTimes(1);
@@ -69,12 +75,12 @@
it('should destroy the timer after logout', fakeAsync(() => {
spyOn(injectedService, 'destroy').and.callThrough();
- messageService.loginLogoff$.emit(MessageDefines.MSG_LOG_IN_SUCCEEDED);
+ toasterMessageService.loginLogoff$.emit(MessageDefines.MSG_LOG_IN_SUCCEEDED);
tick();
expect(injectedService.destroy).toHaveBeenCalledTimes(0);
- messageService.loginLogoff$.emit(MessageDefines.MSG_LOG_OFF);
+ toasterMessageService.loginLogoff$.emit(MessageDefines.MSG_LOG_OFF);
tick();
expect(injectedService.destroy).toHaveBeenCalledTimes(1);
@@ -91,7 +97,7 @@
expect(sessionContext.getUpcomingReminder()).toBeFalsy();
expect(sessionContext.getOverdueReminder()).toBeFalsy();
- messageService.loginLogoff$.emit(MessageDefines.MSG_LOG_IN_SUCCEEDED);
+ toasterMessageService.loginLogoff$.emit(MessageDefines.MSG_LOG_IN_SUCCEEDED);
tick(15);
expect(injectedService.init).toHaveBeenCalledTimes(1);
@@ -111,7 +117,7 @@
expect(sessionContext.getUpcomingReminder()).toBeFalsy();
expect(sessionContext.getOverdueReminder()).toBeFalsy();
- messageService.loginLogoff$.emit(MessageDefines.MSG_LOG_IN_SUCCEEDED);
+ toasterMessageService.loginLogoff$.emit(MessageDefines.MSG_LOG_IN_SUCCEEDED);
tick(15);
expect(injectedService.init).toHaveBeenCalledTimes(1);
@@ -130,7 +136,7 @@
expect(sessionContext.getUpcomingReminder()).toBe(false);
expect(sessionContext.getOverdueReminder()).toBeFalsy();
- messageService.loginLogoff$.emit(MessageDefines.MSG_LOG_IN_SUCCEEDED);
+ toasterMessageService.loginLogoff$.emit(MessageDefines.MSG_LOG_IN_SUCCEEDED);
tick(15);
expect(injectedService.setError).toHaveBeenCalledTimes(2);
diff --git a/src/app/services/jobs/reminder-caller-job.service.ts b/src/app/services/jobs/reminder-caller-job.service.ts
index ea95390..7b1043e 100644
--- a/src/app/services/jobs/reminder-caller-job.service.ts
+++ b/src/app/services/jobs/reminder-caller-job.service.ts
@@ -1,14 +1,18 @@
-/**
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { Injectable } from '@angular/core';
import { Subscription } from 'rxjs/Subscription';
import { TimerObservable } from 'rxjs/observable/TimerObservable';
@@ -16,7 +20,7 @@
import { SessionContext } from '../../common/session-context';
-import { MessageServiceCustom, MessageDefines } from '../../services/message.service';
+import { ToasterMessageService, MessageDefines } from '../../services/toaster-message.service';
import { Globals } from '../../common/globals';
@@ -31,7 +35,7 @@
constructor(
protected _sessionContext: SessionContext,
protected reminderService: ReminderService,
- protected msgService: MessageServiceCustom
+ protected msgService: ToasterMessageService
) {
this.msgService.loginLogoff$.subscribe(msg => this.onLoginLogoff(msg));
}
diff --git a/src/app/services/jobs/role-access-helper.service.spec.ts b/src/app/services/jobs/role-access-helper.service.spec.ts
index 774aa66..bf9b9e8 100644
--- a/src/app/services/jobs/role-access-helper.service.spec.ts
+++ b/src/app/services/jobs/role-access-helper.service.spec.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { TestBed, inject } from '@angular/core/testing';
import { RoleAccessHelperService } from './role-access-helper.service';
import { RoleAccess } from '../../model/role-access';
diff --git a/src/app/services/jobs/role-access-helper.service.ts b/src/app/services/jobs/role-access-helper.service.ts
index bfa0889..c0d7cb6 100644
--- a/src/app/services/jobs/role-access-helper.service.ts
+++ b/src/app/services/jobs/role-access-helper.service.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
/* tslint:disable:no-unused-variable */
import { Injectable } from '@angular/core';
import { RoleAccess, EditRoleItems } from '../../model/role-access';
diff --git a/src/app/services/lock-helper.service.spec.ts b/src/app/services/lock-helper.service.spec.ts
index 047e848..b52eb6a 100644
--- a/src/app/services/lock-helper.service.spec.ts
+++ b/src/app/services/lock-helper.service.spec.ts
@@ -1,13 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-******************************************************************************
- */
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
import { TestBed, inject, async, fakeAsync, tick } from '@angular/core/testing';
import { AbstractMockObservableService } from '..//testing/abstract-mock-observable.service';
import { Lock } from '../model/lock';
diff --git a/src/app/services/lock-helper.service.ts b/src/app/services/lock-helper.service.ts
index 659a902..2a3a51c 100644
--- a/src/app/services/lock-helper.service.ts
+++ b/src/app/services/lock-helper.service.ts
@@ -1,13 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-******************************************************************************
- */
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
import { Injectable, EventEmitter } from '@angular/core';
import { Lock } from '../model/lock';
import { LockService } from './lock.service';
diff --git a/src/app/services/lock.service.spec.ts b/src/app/services/lock.service.spec.ts
index 8a712e6..38ea081 100644
--- a/src/app/services/lock.service.spec.ts
+++ b/src/app/services/lock.service.spec.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { BaseHttpService, HttpMethodEn } from './base-http.service';
import { TestBed, inject } from '@angular/core/testing';
import { MockBaseHttpService } from '../testing/mock-base-http.service';
diff --git a/src/app/services/lock.service.ts b/src/app/services/lock.service.ts
index 4f2f100..6d3a698 100644
--- a/src/app/services/lock.service.ts
+++ b/src/app/services/lock.service.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import { Globals } from '../common/globals';
diff --git a/src/app/services/modify-grid-config.service.spec.ts b/src/app/services/modify-grid-config.service.spec.ts
index c5d038e..a6fe184 100644
--- a/src/app/services/modify-grid-config.service.spec.ts
+++ b/src/app/services/modify-grid-config.service.spec.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { TestBed, inject } from '@angular/core/testing';
import { ModifyGridConfigService } from './modify-grid-config.service';
import { SessionContext } from '../common/session-context';
diff --git a/src/app/services/modify-grid-config.service.ts b/src/app/services/modify-grid-config.service.ts
index ea6b329..e56c63b 100644
--- a/src/app/services/modify-grid-config.service.ts
+++ b/src/app/services/modify-grid-config.service.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { Injectable } from '@angular/core';
import { GridConfig } from '../model/grid-config';
import { Observable } from 'rxjs';
diff --git a/src/app/services/reminder.service.spec.ts b/src/app/services/reminder.service.spec.ts
index 359bf7d..0b7306b 100644
--- a/src/app/services/reminder.service.spec.ts
+++ b/src/app/services/reminder.service.spec.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { TestBed, async, inject } from '@angular/core/testing';
import 'rxjs/add/observable/of';
diff --git a/src/app/services/reminder.service.ts b/src/app/services/reminder.service.ts
index 6da0581..45471a3 100644
--- a/src/app/services/reminder.service.ts
+++ b/src/app/services/reminder.service.ts
@@ -1,14 +1,18 @@
-/**
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/catch';
diff --git a/src/app/services/request-interceptor.service.ts b/src/app/services/request-interceptor.service.ts
index 7d3d0d3..8dd26e4 100644
--- a/src/app/services/request-interceptor.service.ts
+++ b/src/app/services/request-interceptor.service.ts
@@ -1,16 +1,20 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-******************************************************************************
- */
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
import { SessionContext } from './../common/session-context';
-import { AuthenticationService } from './authentication.service';
-import { MessageServiceCustom, MessageDefines } from './message.service';
+import { ToasterMessageService, MessageDefines } from './toaster-message.service';
import { Router } from '@angular/router';
import { Injectable } from '@angular/core';
import {
@@ -28,8 +32,7 @@
export class RequestInterceptor implements HttpInterceptor {
- constructor(private msgService: MessageServiceCustom,
- private authService: AuthenticationService,
+ constructor(private toasterMessageService: ToasterMessageService,
private router: Router,
private sessionContext: SessionContext) { }
@@ -51,7 +54,7 @@
// redirect to the login route
// or show a modal
if (this.sessionContext.isUserAuthenticated()) {
- this.msgService.loginLogoff$.emit(MessageDefines.MSG_LOG_OFF);
+ this.toasterMessageService.loginLogoff$.emit(MessageDefines.MSG_LOG_OFF);
this.router.navigate(['/loggedout']);
}
} else if (error.status !== 302 && (error.status < 200 || error.status >= 300)) {
diff --git a/src/app/services/role-access.service.spec.ts b/src/app/services/role-access.service.spec.ts
index 0376f7c..41f2a61 100644
--- a/src/app/services/role-access.service.spec.ts
+++ b/src/app/services/role-access.service.spec.ts
@@ -1,13 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-******************************************************************************
- */
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
import { HttpClientModule } from '@angular/common/http';
import { TestBed, async, inject } from '@angular/core/testing';
import { RoleAccessService } from './role-access.service';
diff --git a/src/app/services/role-access.service.ts b/src/app/services/role-access.service.ts
index 93c2911..c3d671f 100644
--- a/src/app/services/role-access.service.ts
+++ b/src/app/services/role-access.service.ts
@@ -1,13 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-******************************************************************************
- */
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs/Observable';
diff --git a/src/app/services/toaster-message.service.spec.ts b/src/app/services/toaster-message.service.spec.ts
index 47661f0..68779ef 100644
--- a/src/app/services/toaster-message.service.spec.ts
+++ b/src/app/services/toaster-message.service.spec.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { TestBed, inject } from '@angular/core/testing';
import { ToasterMessageService } from './toaster-message.service';
diff --git a/src/app/services/toaster-message.service.ts b/src/app/services/toaster-message.service.ts
index 96508cb..844308d 100644
--- a/src/app/services/toaster-message.service.ts
+++ b/src/app/services/toaster-message.service.ts
@@ -1,23 +1,35 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { Injectable, EventEmitter } from '@angular/core';
import { MessageService } from 'primeng/api';
import { ErrorType, ToasterButtonEventEn } from '../common/enums';
import { SessionContext } from '../common/session-context';
+import { ToasterMessage } from '../common/banner-message';
+
+export class MessageDefines {
+ static MSG_LOG_IN_SUCCEEDED = 'LOG_IN_SUCCEEDED';
+ static MSG_LOG_OFF = 'LOG_OFF';
+}
@Injectable()
export class ToasterMessageService {
public toasterEmitter$: EventEmitter<ToasterButtonEventEn> = new EventEmitter<ToasterButtonEventEn>();
+ public loginLogoff$: EventEmitter<string> = new EventEmitter<string>();
+ public errorOccured$: EventEmitter<ToasterMessage> = new EventEmitter<ToasterMessage>();
constructor(private sessionContext: SessionContext,
private messageService: MessageService) {
diff --git a/src/app/services/user-settings.service.spec.ts b/src/app/services/user-settings.service.spec.ts
index d0fc1af..97ababc 100644
--- a/src/app/services/user-settings.service.spec.ts
+++ b/src/app/services/user-settings.service.spec.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { BaseHttpService, HttpMethodEn } from './base-http.service';
import { TestBed, async, inject } from '@angular/core/testing';
import { UserSettingsService } from './user-settings.service';
diff --git a/src/app/services/user-settings.service.ts b/src/app/services/user-settings.service.ts
index d80afa1..4abcd0d 100644
--- a/src/app/services/user-settings.service.ts
+++ b/src/app/services/user-settings.service.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { Injectable } from '@angular/core';
import { UserSettings } from '../model/user-settings';
import { SessionContext } from '../common/session-context';
diff --git a/src/app/services/user.service.spec.ts b/src/app/services/user.service.spec.ts
index 65fc761..46ee2e2 100644
--- a/src/app/services/user.service.spec.ts
+++ b/src/app/services/user.service.spec.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { TestBed, async } from '@angular/core/testing';
import { Globals } from '../common/globals';
import { SessionContext } from '../common/session-context';
@@ -21,7 +25,6 @@
describe('Http-UserService (mockBackend)', () => {
let mockedBaseService: any;
-
let sessionContext: SessionContext;
beforeEach(async(() => {
TestBed.configureTestingModule({
diff --git a/src/app/services/user.service.ts b/src/app/services/user.service.ts
index 7c0af53..f0af9cc 100644
--- a/src/app/services/user.service.ts
+++ b/src/app/services/user.service.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import { BaseHttpService, HttpCallInfo, HttpMethodEn } from './base-http.service';
diff --git a/src/app/services/version-info.service.spec.ts b/src/app/services/version-info.service.spec.ts
index 5f576ec..2dbe729 100644
--- a/src/app/services/version-info.service.spec.ts
+++ b/src/app/services/version-info.service.spec.ts
@@ -1,14 +1,18 @@
/*
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
import { TestBed, inject } from '@angular/core/testing';
import { BaseHttpService, HttpMethodEn } from './base-http.service';
import { VersionInfoService } from './version-info.service';
diff --git a/src/app/services/version-info.service.ts b/src/app/services/version-info.service.ts
index cc449e0..850b066 100644
--- a/src/app/services/version-info.service.ts
+++ b/src/app/services/version-info.service.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import { SessionContext } from '../common/session-context';
diff --git a/src/app/test-data/backend-settings.ts b/src/app/test-data/backend-settings.ts
index 88ce394..91cba94 100644
--- a/src/app/test-data/backend-settings.ts
+++ b/src/app/test-data/backend-settings.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { BackendSettings } from '../model/backend-settings';
export const BACKENDSETTINGS: BackendSettings = {
diff --git a/src/app/test-data/branches.ts b/src/app/test-data/branches.ts
index 731f14a..93af3b4 100644
--- a/src/app/test-data/branches.ts
+++ b/src/app/test-data/branches.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { Branch } from '../model/branch';
export const BRANCHES: Branch[] = [
diff --git a/src/app/test-data/cim-cache-responses.ts b/src/app/test-data/cim-cache-responses.ts
index 44c34ad..a79b880 100644
--- a/src/app/test-data/cim-cache-responses.ts
+++ b/src/app/test-data/cim-cache-responses.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
export const RESSOURCEWITHTYPERESPONSEEMPTYLIST = `
<ResponseMessage>
<Header>
diff --git a/src/app/test-data/datestringarrays.ts b/src/app/test-data/datestringarrays.ts
index 0e5318a..6664292 100644
--- a/src/app/test-data/datestringarrays.ts
+++ b/src/app/test-data/datestringarrays.ts
@@ -1,15 +1,19 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
export const INPUTDATESTRINGARRAY0: string[] = [];
export const INPUTDATESTRINGARRAY1: string[] = ['', ''];
diff --git a/src/app/test-data/documents.ts b/src/app/test-data/documents.ts
index 87d1d4b..f0e59c0 100644
--- a/src/app/test-data/documents.ts
+++ b/src/app/test-data/documents.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { Document } from '../model/document';
export const DOCUMENTS: Document[] = [
diff --git a/src/app/test-data/filtering-search-text.ts b/src/app/test-data/filtering-search-text.ts
index e7a4bd8..61376ac 100644
--- a/src/app/test-data/filtering-search-text.ts
+++ b/src/app/test-data/filtering-search-text.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
export const FILTERINGSEARCHTEXT = { branchId: 'G', title: '', statusId: '' };
diff --git a/src/app/test-data/grid-measures.ts b/src/app/test-data/grid-measures.ts
index ed79f4e..527a609 100644
--- a/src/app/test-data/grid-measures.ts
+++ b/src/app/test-data/grid-measures.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { GridMeasure } from '../model/grid-measure';
export const GRIDMEASURE: GridMeasure[] = [
@@ -18,9 +22,6 @@
descriptiveId: 'descriptiveId1',
branchId: 1,
plannedStarttimeFirstSinglemeasure: '2017-01-15T11:11:00z',
- plannedStarttimeFirstSequence: '2017-01-15T11:11:00z',
- plannedEndtimeLastSinglemeasure: '2017-01-15T11:11:00z',
- plannedEndtimeGridmeasure: '2017-01-16T11:11:00z',
title: 'T1',
affectedResource: 'TESTRESOURCE1',
remark: 'TESTREMARK1',
diff --git a/src/app/test-data/locks.ts b/src/app/test-data/locks.ts
index b3a6e2c..6afda22 100644
--- a/src/app/test-data/locks.ts
+++ b/src/app/test-data/locks.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { Lock } from '../model/lock';
export const LOCKS: Lock[] = [
diff --git a/src/app/test-data/power-system-resources.ts b/src/app/test-data/power-system-resources.ts
index 9c50818..5400d76 100644
--- a/src/app/test-data/power-system-resources.ts
+++ b/src/app/test-data/power-system-resources.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { PowerSystemResource } from '../model/power-system-resource';
export const POWERSYSTEMRESOURCES: PowerSystemResource[] = [
diff --git a/src/app/test-data/role-access-definition.ts b/src/app/test-data/role-access-definition.ts
index 9d76379..4bda3a8 100644
--- a/src/app/test-data/role-access-definition.ts
+++ b/src/app/test-data/role-access-definition.ts
@@ -1,13 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-******************************************************************************
- */
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
import { RoleAccess } from '../model/role-access';
diff --git a/src/app/test-data/status-changes.ts b/src/app/test-data/status-changes.ts
index d1fc06d..27ea3e8 100644
--- a/src/app/test-data/status-changes.ts
+++ b/src/app/test-data/status-changes.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { StatusChange } from '../model/status-change';
export const STATUSCHANGES: StatusChange[] = [
diff --git a/src/app/test-data/statuses.ts b/src/app/test-data/statuses.ts
index 32fcb81..548cb7c 100644
--- a/src/app/test-data/statuses.ts
+++ b/src/app/test-data/statuses.ts
@@ -1,27 +1,34 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { Status } from '../model/status';
export const STATUSES: Status[] = [
{
id: 1,
name: 'offen',
+ colorCode: '#990000',
},
{
id: 2,
name: 'in Bearbeitung',
+ colorCode: '#990000',
},
{
id: 3,
name: 'beendet',
+ colorCode: '#990000',
}
];
diff --git a/src/app/test-data/territories.ts b/src/app/test-data/territories.ts
index df985c6..4e085e9 100644
--- a/src/app/test-data/territories.ts
+++ b/src/app/test-data/territories.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { Territory } from '../model/territory';
export const TERRITORY: Territory[] = [
diff --git a/src/app/test-data/tree.ts b/src/app/test-data/tree.ts
index 77394dc..ec9026a 100644
--- a/src/app/test-data/tree.ts
+++ b/src/app/test-data/tree.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { TreeModel, Tree } from 'ng2-tree';
const TREE_MODEL: TreeModel = {
diff --git a/src/app/test-data/users.ts b/src/app/test-data/users.ts
index e1a15ac..152213c 100644
--- a/src/app/test-data/users.ts
+++ b/src/app/test-data/users.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { User } from '../model/user';
export const USERS: User[] = [
diff --git a/src/app/testing/abstract-mock-observable.service.ts b/src/app/testing/abstract-mock-observable.service.ts
index dd037ff..a173e73 100644
--- a/src/app/testing/abstract-mock-observable.service.ts
+++ b/src/app/testing/abstract-mock-observable.service.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { Subscription } from 'rxjs/Subscription';
export abstract class AbstractMockObservableService {
diff --git a/src/app/testing/index.ts b/src/app/testing/index.ts
index b709407..661dead 100644
--- a/src/app/testing/index.ts
+++ b/src/app/testing/index.ts
@@ -1,13 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-******************************************************************************
- */
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
import { DebugElement } from '@angular/core';
import { tick, ComponentFixture } from '@angular/core/testing';
diff --git a/src/app/testing/mock-base-http.service.ts b/src/app/testing/mock-base-http.service.ts
index e3dd0fe..b521b81 100644
--- a/src/app/testing/mock-base-http.service.ts
+++ b/src/app/testing/mock-base-http.service.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { SessionContext } from '../common/session-context';
import { BaseHttpServiceInterface, HttpCallInfo } from '../services/base-http.service';
import { AbstractMockObservableService } from './abstract-mock-observable.service';
diff --git a/src/app/testing/mock.component.ts b/src/app/testing/mock.component.ts
index 782d514..e2b16ce 100644
--- a/src/app/testing/mock.component.ts
+++ b/src/app/testing/mock.component.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { Component } from '@angular/core';
export function MockComponent(options: Component): Component {
diff --git a/src/app/testing/router-stubs.ts b/src/app/testing/router-stubs.ts
index d5fc789..60e7adb 100644
--- a/src/app/testing/router-stubs.ts
+++ b/src/app/testing/router-stubs.ts
@@ -1,15 +1,19 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
// export for convenience.
export { ActivatedRoute, Router, RouterLink, RouterOutlet} from '@angular/router';
diff --git a/src/assets/css/custom.css b/src/assets/css/custom.css
index 09b65cb..0dfa6f9 100644
--- a/src/assets/css/custom.css
+++ b/src/assets/css/custom.css
@@ -1,13 +1,17 @@
-/*******************************************************************************
-* Copyright (c) 2015 BTC AG.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-* http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-* Martin Boehm, http://www.minnemedia.de - initial API and implementation
-*******************************************************************************/
+/*
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
html,
body {
@@ -23,7 +27,7 @@
body {
padding-top: 20px;
/* Margin bottom by footer height*/
- margin-bottom: 80px;
+ margin-bottom: 30px;
}
.voffset {
@@ -414,4 +418,4 @@
login:hover {
color: #bac2cb;
-}
\ No newline at end of file
+}
diff --git a/src/assets/css/main.css b/src/assets/css/main.css
index 68fc8ce..43339a8 100644
--- a/src/assets/css/main.css
+++ b/src/assets/css/main.css
@@ -1,11 +1,15 @@
/*
-******************************************************************************
-* Copyright (c) 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
diff --git a/src/assets/source-sans-pro/source-sans-pro.css b/src/assets/source-sans-pro/source-sans-pro.css
index 85aa101..e97b8a8 100644
--- a/src/assets/source-sans-pro/source-sans-pro.css
+++ b/src/assets/source-sans-pro/source-sans-pro.css
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
@font-face{
font-family: 'Source Sans Pro';
font-weight: 200;
diff --git a/src/environments/environment.prod.spec.ts b/src/environments/environment.prod.spec.ts
index 3214e5e..b2b5920 100644
--- a/src/environments/environment.prod.spec.ts
+++ b/src/environments/environment.prod.spec.ts
@@ -1,14 +1,18 @@
/*
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
import { TestBed } from '@angular/core/testing';
import { environment } from './environment.prod';
diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts
index d28c44b..c3c7eaa 100644
--- a/src/environments/environment.prod.ts
+++ b/src/environments/environment.prod.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
export const environment = {
production: true
};
diff --git a/src/environments/environment.spec.ts b/src/environments/environment.spec.ts
index cc512d0..20d60d5 100644
--- a/src/environments/environment.spec.ts
+++ b/src/environments/environment.spec.ts
@@ -1,14 +1,18 @@
/*
- ******************************************************************************
- * Copyright © 2018 PTA GmbH.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
*
- * http://www.eclipse.org/legal/epl-v10.html
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
*
- ******************************************************************************
- */
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
+*/
+
import { TestBed } from '@angular/core/testing';
import { environment } from './environment';
diff --git a/src/environments/environment.ts b/src/environments/environment.ts
index a114969..169054e 100644
--- a/src/environments/environment.ts
+++ b/src/environments/environment.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
// The file contents for the current environment will overwrite these during build.
// The build system defaults to the dev environment which uses `environment.ts`, but if you do
// `ng build --env=prod` then `environment.prod.ts` will be used instead.
diff --git a/src/index.html b/src/index.html
index 0ce3dc7..eaa83bb 100644
--- a/src/index.html
+++ b/src/index.html
@@ -1,15 +1,19 @@
-<!doctype html>
<!--
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
-->
+<!doctype html>
+
<html>
<head>
@@ -26,4 +30,4 @@
<app-root>Loading...</app-root>
</body>
-</html>
\ No newline at end of file
+</html>
diff --git a/src/main.ts b/src/main.ts
index 28fdf06..bc56657 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
diff --git a/src/polyfills.ts b/src/polyfills.ts
index 7c71611..b712c21 100644
--- a/src/polyfills.ts
+++ b/src/polyfills.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
/**
* This file includes polyfills needed by Angular and is loaded before the app.
* You can add your own extra polyfills to this file.
diff --git a/src/styles.css b/src/styles.css
index 436359e..b1881e8 100644
--- a/src/styles.css
+++ b/src/styles.css
@@ -1,15 +1,19 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
/* You can add global styles to this file, and also import other style files */
@import url("assets/source-sans-pro/source-sans-pro.css");
@@ -172,9 +176,11 @@
width: 10%;
text-align: center;
}
-.ag-layout-normal .ag-body-viewport{
- height: 99%!important;
+
+.ag-layout-normal .ag-body-viewport {
+ height: 99% !important;
}
+
.table-striped>tbody>tr:nth-of-type(odd) {
background: #e9f0f9;
}
@@ -402,4 +408,15 @@
.nav-tabs>li>a {
border: 1px solid #ddd;
-}
\ No newline at end of file
+}
+
+/* only for IE10+ */
+
+@media screen and (-ms-high-contrast: active),
+(-ms-high-contrast: none) {
+ .ag-header-cell {
+ /* color: red; */
+ line-height: 12px !important;
+ padding-top: 5px !important;
+ }
+}
diff --git a/src/test.ts b/src/test.ts
index cf24d37..dc39db9 100644
--- a/src/test.ts
+++ b/src/test.ts
@@ -1,14 +1,18 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
import 'zone.js/dist/zone-testing';
diff --git a/src/typings.d.ts b/src/typings.d.ts
index 7166679..610d3e5 100644
--- a/src/typings.d.ts
+++ b/src/typings.d.ts
@@ -1,15 +1,19 @@
/*
-******************************************************************************
-* Copyright © 2018 PTA GmbH.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-*
-* http://www.eclipse.org/legal/epl-v10.html
-*
-******************************************************************************
+ *******************************************************************************
+ * Copyright (c) 2018 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *******************************************************************************
*/
+
/* SystemJS module definition */
declare var module: NodeModule;
interface NodeModule {