[SI-61] Add latest version
diff --git a/hooks/pre-build.js b/hooks/pre-build.js index c1e9e1d..b9491b9 100644 --- a/hooks/pre-build.js +++ b/hooks/pre-build.js
@@ -14,17 +14,18 @@ var jsonConcat = require('json-concat'); var localizationSourceFilesDE = [ - "./i18n/general.de.json", - "./i18n/components.de.json", - "./i18n/contacts.de.json", - "./i18n/persons.de.json", - "./i18n/salutations.de.json", - "./i18n/company.de.json", - "./i18n/admin.de.json", - "./i18n/addresses.de.json", - "./i18n/communications-data.de.json", - "./i18n/user-module-assignment.de.json", - "./i18n/logout.de.json" + './i18n/general.de.json', + './i18n/components.de.json', + './i18n/contacts.de.json', + './i18n/persons.de.json', + './i18n/salutations.de.json', + './i18n/company.de.json', + './i18n/admin.de.json', + './i18n/addresses.de.json', + './i18n/communications-data.de.json', + './i18n/user-module-assignment.de.json', + './i18n/logout.de.json', + './i18n/grid-failure.de.json', ]; function mergeAndSaveJsonFiles(src, dest) {
diff --git a/hooks/pre-start.js b/hooks/pre-start.js index 0accf2b..15b7e60 100644 --- a/hooks/pre-start.js +++ b/hooks/pre-start.js
@@ -14,17 +14,18 @@ var jsonConcat = require('json-concat'); var localizationSourceFilesDE = [ - "./i18n/general.de.json", - "./i18n/components.de.json", - "./i18n/contacts.de.json", - "./i18n/persons.de.json", - "./i18n/salutations.de.json", - "./i18n/company.de.json", - "./i18n/admin.de.json", - "./i18n/addresses.de.json", - "./i18n/communications-data.de.json", - "./i18n/user-module-assignment.de.json", - "./i18n/logout.de.json", + './i18n/general.de.json', + './i18n/components.de.json', + './i18n/contacts.de.json', + './i18n/persons.de.json', + './i18n/salutations.de.json', + './i18n/company.de.json', + './i18n/admin.de.json', + './i18n/addresses.de.json', + './i18n/communications-data.de.json', + './i18n/user-module-assignment.de.json', + './i18n/logout.de.json', + './i18n/grid-failure.de.json', ]; function mergeAndSaveJsonFiles(src, dest) {
diff --git a/i18n/de.json b/i18n/de.json index 1958588..5950f19 100644 --- a/i18n/de.json +++ b/i18n/de.json
@@ -217,4 +217,17 @@ "CloseTab": "Browser-Tab schließen", "SubmitLogout": "Wollen Sie sich abmelden?" } +, + "GridFailures": { + "Title": "Übersicht Störungsmeldungen", + "New": "Neue Störungsmeldung anlegen", + "FailureClassification": "Übersicht Klassifikation", + "FailureType": "Typ", + "Responsibility": "Zustaändigkeit", + "InternExtern": "Meldung durch (intern / extern)", + "StatusIntern": "Status (intern)", + "StatusExtern": "Status (extern)", + "Branch": "Sparte", + "VoltageLevel": "Spannungsebene [NS, MS, HS]" + } }
diff --git a/projects/grid-failure-information-app/src/app/app-routing.module.ts b/projects/grid-failure-information-app/src/app/app-routing.module.ts index efc143c..18f5b11 100644 --- a/projects/grid-failure-information-app/src/app/app-routing.module.ts +++ b/projects/grid-failure-information-app/src/app/app-routing.module.ts
@@ -12,12 +12,12 @@ ********************************************************************************/ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; -import { PageNotFoundComponent } from '@app/shared/components/page-not-found/pageNotFound.component'; +import { PageNotFoundComponent } from '@shared/components/page-not-found/pageNotFound.component'; import { LogoutPageComponent } from '@pages/logout/logout/logout.component'; -import { LoggedOutPageComponent } from '@app/pages/logout/logged-out/logged-out.component'; +import { LoggedOutPageComponent } from '@pages/logout/logged-out/logged-out.component'; const appRoutes: Routes = [ - { path: '', redirectTo: '/grid-failures-overview', pathMatch: 'full' }, + { path: '', redirectTo: '/grid-failures', pathMatch: 'full' }, { path: 'logout', component: LogoutPageComponent,
diff --git a/projects/grid-failure-information-app/src/app/app.component.scss b/projects/grid-failure-information-app/src/app/app.component.scss deleted file mode 100644 index e69de29..0000000 --- a/projects/grid-failure-information-app/src/app/app.component.scss +++ /dev/null
diff --git a/projects/grid-failure-information-app/src/app/app.module.ts b/projects/grid-failure-information-app/src/app/app.module.ts index 3fa4334..368fb2d 100644 --- a/projects/grid-failure-information-app/src/app/app.module.ts +++ b/projects/grid-failure-information-app/src/app/app.module.ts
@@ -27,7 +27,6 @@ import { UtilityModule } from '@shared/utility'; //Feature Modules -import { ContactsModule } from '@pages/contacts/contacts.module'; import { GridFailureModule } from '@pages/grid-failure/grid-failure.module'; import { LogoutModule } from '@pages/logout/logout.module'; @@ -104,7 +103,6 @@ }), ContainersModule, - ContactsModule, GridFailureModule, AppRoutingModule, NgbModalModule,
diff --git a/projects/grid-failure-information-app/src/app/pages/contacts/contacts-api-client.ts b/projects/grid-failure-information-app/src/app/pages/contacts/contacts-api-client.ts deleted file mode 100644 index 5fccf73..0000000 --- a/projects/grid-failure-information-app/src/app/pages/contacts/contacts-api-client.ts +++ /dev/null
@@ -1,99 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2020 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 { ModifiedContacts } from '@shared/models/modifiedContacts.model'; -import { Action } from '@ngrx/store'; -import { Injectable } from '@angular/core'; -import { HttpService, Query, GET, Path, Adapter, PUT, Body, DefaultHeaders } from '@app/shared/async-services/http'; -import { Observable } from 'rxjs'; -import { ContactsService } from '@pages/contacts/contacts.service'; -import { Contact } from '@shared/models'; -import { PageRequestInterface } from '@shared/models/page/page-request.interface'; -import { PageModel } from '@shared/models/page/page.model'; - -@Injectable() -@DefaultHeaders({ - Accept: 'application/json', - 'Content-Type': 'application/json', -}) -export class ContactsApiClient extends HttpService { - public getContacts(request: PageRequestInterface = null): Observable<PageModel<Contact>> { - let modifiedContacts: ModifiedContacts = null; - if (request != null) { - modifiedContacts = request.queryParameter || {}; - return this._getContactsPage( - modifiedContacts.searchText, - modifiedContacts.contactTypeId, - modifiedContacts.sort, - modifiedContacts.moduleName, - modifiedContacts.withoutAssignedModule, - modifiedContacts.expiringDataInPast, - modifiedContacts.deletionLockExceeded, - request.pageNumber ? request.pageNumber - 1 : 0, - request.pageSize - ); - } else { - return this._getContactsPage( - modifiedContacts.searchText, - modifiedContacts.contactTypeId, - modifiedContacts.sort, - modifiedContacts.moduleName, - modifiedContacts.withoutAssignedModule, - modifiedContacts.expiringDataInPast, - modifiedContacts.deletionLockExceeded, - 1, - 3 - ); - } - } - - /** - * Retrieves all paged contacts - */ - @GET('/contacts') - @Adapter(ContactsService.gridPageAdapter) - private _getContactsPage( - @Query('searchText') searchtext: string, - @Query('contactType') contactTypeId: string, - @Query('sort') sort: string, - @Query('moduleName') moduleName: string, - @Query('withoutAssignedModule') withoutAssignedModule: boolean, - @Query('expiringDataInPast') expiringDataInPast: boolean, - @Query('deletionLockExceeded') deletionLockExceeded: boolean, - @Query('page') pageNumber: number, - @Query('size') pageSize: number - ): Observable<any> { - return null; - } - - /** - * Retrieves contacts details by a given id - * - * @param id - */ - @GET('/contacts/{id}') - @Adapter(ContactsService.contactDetailsAdapter) - public getContactDetails(@Path('id') id: number): Observable<any> { - return null; - } - - @PUT('/contacts/{id}') - @Adapter(ContactsService.contactDetailsAdapter) - public putContactDetails(@Path('id') id: number, @Body() editedContact: Contact): Observable<Contact> { - return null; - } - - @PUT('/contacts/{id}/anonymize') - public anonymizeContact(@Path('id') id: string): Observable<void> { - return null; - } -}
diff --git a/projects/grid-failure-information-app/src/app/pages/contacts/contacts-list/contacts-list-column-definition.ts b/projects/grid-failure-information-app/src/app/pages/contacts/contacts-list/contacts-list-column-definition.ts deleted file mode 100644 index 55734e5..0000000 --- a/projects/grid-failure-information-app/src/app/pages/contacts/contacts-list/contacts-list-column-definition.ts +++ /dev/null
@@ -1,92 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2020 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 { ContactTypeCellRendererComponent } from '@shared/components/cell-renderer/contact-type-cell-renderer/contact-type-cell-renderer.component'; -import { IconCellRendererComponent } from '@shared/components/cell-renderer/icon-cell-renderer/icon-cell-renderer.component'; - -export const CONTACTS_COLDEF = [ - { - field: 'name', - colId: 'name', - headerName: 'Contacts.Name', - filter: true, - filterParams: { - debounceMs: 1000, - }, - }, - { - field: 'email', - colId: 'email', - headerName: 'Contacts.Mail', - filter: true, - filterParams: { - debounceMs: 1000, - }, - }, - { - field: 'contactType', - colId: 'contactType', - headerName: 'Contacts.ContactType', - filter: 'agTextColumnFilter', - filterParams: { - debounceMs: 1000, - }, - cellRendererFramework: ContactTypeCellRendererComponent, - }, - { - field: 'note', - colId: 'note', - maxWidth: 50, - headerName: 'Contacts.Note', - filter: 'agTextColumnFilter', - filterParams: { - debounceMs: 1000, - }, - }, - { - valueGetter: function(params) { - if (params.data.community || params.data.street || params.data.housenumber) { - return `${params.data.community}, ${params.data.street} ${params.data.housenumber}`; - } else { - return ''; - } - }, - colId: 'mainaddress', - headerName: 'Contacts.MainAddress', - filter: 'agTextColumnFilter', - filterParams: { - debounceMs: 1000, - }, - }, - { - field: 'department', - colId: 'department', - headerName: 'Contacts.Department', - filter: true, - filterParams: { - debounceMs: 1000, - }, - }, - { - field: 'tools', - headerName: ' ', - pinned: 'right', - maxWidth: 110, - minWidth: 110, - lockPosition: true, - sortable: false, - filter: false, - suppressMenu: true, - suppressSizeToFit: true, - cellRendererFramework: IconCellRendererComponent, - }, -];
diff --git a/projects/grid-failure-information-app/src/app/pages/contacts/contacts-list/contacts-list.component.html b/projects/grid-failure-information-app/src/app/pages/contacts/contacts-list/contacts-list.component.html deleted file mode 100644 index ee9ce69..0000000 --- a/projects/grid-failure-information-app/src/app/pages/contacts/contacts-list/contacts-list.component.html +++ /dev/null
@@ -1,33 +0,0 @@ -<!-- /******************************************************************************** -* Copyright (c) 2020 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-card-layout> - <div header> - <span>{{ 'Contacts.Title' | translate }}</span> - </div> - <div class="contacts-grid-wrapper" body> - <ag-grid-angular - [serverSide]="contactsSandbox.serverSideModel" - [queryParameter]="modifiedContacts" - autoResizeColumns - class="ag-theme-balham" - style="min-width: 982px; height: calc(100vh - 276px);" - [gridOptions]="gridOptions" - [columnDefs]="columnDefinition" - [rowSelection]="'single'" - [overlayNoRowsTemplate]="noRowsTemplate" - > - </ag-grid-angular> - - <app-spinner [isRunning]="contactsSandbox.contactListLoading$ | async"></app-spinner> - </div> -</app-card-layout>
diff --git a/projects/grid-failure-information-app/src/app/pages/contacts/contacts-list/contacts-list.component.scss b/projects/grid-failure-information-app/src/app/pages/contacts/contacts-list/contacts-list.component.scss deleted file mode 100644 index 7b3ad89..0000000 --- a/projects/grid-failure-information-app/src/app/pages/contacts/contacts-list/contacts-list.component.scss +++ /dev/null
@@ -1,122 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2020 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 - ********************************************************************************/ -.contacts-grid-wrapper { - position: relative; -} - -.dropdown-open:hover { - background-color: transparent; -} - -.diverse-options { - display: flex; - justify-content: space-between; - align-content: center; - min-width: 982px; - background-color: #f5f7f7; - border: 1px solid rgb(189, 195, 199); - padding: 7px 7px 5px 7px; - margin-bottom: 1px; -} - -.diverse-options-item { - padding-right: 7px; - border-right: solid 1px #ddd; -} - -.form-field-label { - width: 100%; - font-size: 13px; - font-weight: bold; - margin-bottom: 5px; -} - -.select-type-of-new-contact { - align-self: center; - margin-right: 2px; -} - -.search-options { - display: flex; - flex-wrap: nowrap; - justify-content: flex-start; - align-items: center; - flex-grow: 1; -} - -.item { - flex-basis: 185px; - margin: 5px; -} - -#search-text { - max-width: 160px; -} - -.search-btn { - display: flex; - align-items: center; -} - -.search-btn button { - margin: 0 5px; - background-color: #fff; - border: 1px solid #ccc; -} - -.sorting-options { - display: flex; - flex-wrap: nowrap; - justify-content: flex-start; - align-items: center; - min-width: 380px; -} - -.diverse-btn { - display: flex; - justify-content: flex-end; - background-color: #f5f7f7; - border: 1px solid rgb(189, 195, 199); - padding: 7px 7px 5px 0px; - margin-bottom: 1px; -} - -.form-field-label { - width: 100%; - font-size: 14px; - font-weight: bold; - margin-bottom: 5px; -} - -.selectTypeOfNewContact { - margin-right: 2px; - margin-bottom: 2px; -} -.dsgvo-filter-container { - display: flex; - flex-direction: row; - flex-wrap: nowrap; - justify-content: flex-start; - justify-self: center; -} -.dsgvo-filter-options { - display: flex; - flex-direction: row; - flex-wrap: nowrap; - justify-content: flex-start; - align-items: center; - flex-grow: 1; -} -.dsgvo-filter-item { - margin: 4px 0px 0px 12px; -}
diff --git a/projects/grid-failure-information-app/src/app/pages/contacts/contacts-list/contacts-list.component.spec.ts b/projects/grid-failure-information-app/src/app/pages/contacts/contacts-list/contacts-list.component.spec.ts deleted file mode 100644 index e0e76d3..0000000 --- a/projects/grid-failure-information-app/src/app/pages/contacts/contacts-list/contacts-list.component.spec.ts +++ /dev/null
@@ -1,214 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2020 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 { ContactsListComponent } from '@pages/contacts/contacts-list/contacts-list.component'; -import { Globals } from '@shared/constants/globals'; -import { ModifiedContacts } from '@shared/models/modifiedContacts.model'; - -describe('ContactsListComponent', () => { - let component: ContactsListComponent; - let contactsSandbox: any = {}; - let userModuleAssignmentSandbox: any = {}; - let router: any = {}; - - beforeEach(() => { - router = { navigateByUrl() {}, navigate() {} } as any; - component = new ContactsListComponent(contactsSandbox, router); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); - - it('should define gridOptions onInit', () => { - component.ngOnInit(); - - expect(component.gridOptions).toBeDefined(); - expect(component.gridOptions.context).toBeDefined(); - }); - - it('should _navigateToDetails if BusEvents is edit ', () => { - const spy = spyOn(component as any, '_navigateToDetails'); - const event: any = { type: 'edit' }; - (component as any)._handleBusEvents(event); - - expect(spy).toHaveBeenCalled(); - }); - - it('should do nothing(TODO:) if BusEvents is delete ', () => { - const event: any = { type: 'delete' }; - (component as any)._handleBusEvents(event); - - expect().nothing(); - }); - - it('should do nothing if BusEvents is undefined ', () => { - const event: any = { type: undefined }; - (component as any)._handleBusEvents(event); - - expect().nothing(); - }); - - it('should navigate to the right url', () => { - const spy = spyOn(router, 'navigate'); - const url = '/test'; - component.navigateTo(url); - - expect(spy).toHaveBeenCalledWith([url]); - }); - - it('should navigate to the external person details page', () => { - const event: any = { - data: { - contactType: Globals.CONTACT_TYPE_ID.EXTERNAL_PERSON, - uuid: 'uuid', - }, - }; - const spy = spyOn(router, 'navigate'); - (component as any)._navigateToDetails(event); - const url = `/${Globals.PATH.PERSONS}/${Globals.PATH.EXTERNAL}/`; - - expect(spy).toHaveBeenCalledWith([url, event.data.uuid]); - }); - - it('should navigate to the internal person details page', () => { - const event: any = { - data: { - contactType: Globals.CONTACT_TYPE_ID.INTERNAL_PERSON, - uuid: 'uuid', - }, - }; - const spy = spyOn(router, 'navigate'); - (component as any)._navigateToDetails(event); - const url = `/${Globals.PATH.PERSONS}/${Globals.PATH.INTERNAL}/`; - - expect(spy).toHaveBeenCalledWith([url, event.data.uuid]); - }); - - it('should navigate to the contact person details page', () => { - const event: any = { - data: { - contactType: Globals.CONTACT_TYPE_ID.CONTACT_PERSON, - uuid: 'uuid', - companyId: 'x', - }, - }; - const spy = spyOn(router, 'navigate'); - (component as any)._navigateToDetails(event); - const url = `/${Globals.PATH.COMPANY}/${event.data.companyId}/${Globals.PATH.CONTACT_PERSON}/`; - - expect(spy).toHaveBeenCalledWith([url, event.data.uuid]); - }); - - it('should navigate to the company details page', () => { - const event: any = { - data: { - contactType: Globals.CONTACT_TYPE_ID.COMPANY, - uuid: 'uuid', - }, - }; - const spy = spyOn(router, 'navigate'); - (component as any)._navigateToDetails(event); - const url = `/${Globals.PATH.COMPANY}/`; - - expect(spy).toHaveBeenCalledWith([url, event.data.uuid]); - }); - - it('should navigate to the overview if contactType undefined', () => { - const event: any = { - data: { - contactType: undefined, - uuid: 'uuid', - }, - }; - const spy = spyOn(router, 'navigate'); - (component as any)._navigateToDetails(event); - const url = '/overview'; - - expect(spy).toHaveBeenCalledWith([url]); - }); - - it('checks if function searchContacts() would be called and works', () => { - const modificationContacts = new ModifiedContacts(); - component.modifiedContacts = modificationContacts; - const event: any = { type: 'click' }; - component.searchContacts(event); - expect(component.modifiedContacts).not.toEqual(modificationContacts); - }); - - it('checks if function sortContacts() works', () => { - const setModifiedContactsSortSpy = spyOn(component as any, '_setModifiedContactsSort'); - component.sortContacts(); - expect(setModifiedContactsSortSpy).toHaveBeenCalledTimes(1); - }); - - it('checks if function setModifiedContactsSearchText() works', () => { - component.setModifiedContactsSearchText('big'); - expect(component.modifiedContacts.searchText).toBe('big'); - }); - - it('checks if function setModifiedContactsContactTypeId() works', () => { - component.setModifiedContactsContactTypeId('I_P'); - expect(component.modifiedContacts.contactTypeId).toBe('I_P'); - }); - - it('checks if function setSortingContactType() works', () => { - component.setSortingContactType('name'); - expect((component as any)._sortingContactType).toBe('name'); - }); - - it('checks if function setSortingOrder() works', () => { - component.setSortingOrder('asc'); - expect((component as any)._sortingOrder).toBe('asc'); - }); - - it('checks if function _setModifiedContactsSort() works', () => { - component.setSortingContactType('name'); - (component as any)._setModifiedContactsSort(); - expect(component.modifiedContacts.sort).toBe('name,asc'); - - (component as any)._sortingOrder = null; - (component as any)._setModifiedContactsSort(); - expect(component.modifiedContacts.sort).toBe(null); - - (component as any)._sortingContactType = null; - (component as any)._setModifiedContactsSort(); - expect(component.modifiedContacts.sort).toBe(null); - }); - - it('checks if function setModifiedContactsExpiryDateFilter() works', () => { - expect(component.modifiedContacts.expiringDataInPast).toBeFalsy(); - component.setModifiedContactsExpiryDateFilter(); - expect(component.modifiedContacts.expiringDataInPast).toBeTruthy(); - }); - - it('checks if function setModifiedContactsDeletionLockExceedFilter() works', () => { - expect(component.modifiedContacts.deletionLockExceeded).toBeFalsy(); - component.setModifiedContactsDeletionLockExceedFilter(); - expect(component.modifiedContacts.deletionLockExceeded).toBeTruthy(); - }); - - it('checks if function setModifiedContactsModuleAssignmentFilter() works', () => { - let moduleName = '-1'; - component.setModifiedContactsModuleAssignmentFilter(moduleName); - expect(component.modifiedContacts.moduleName).toBe(null); - expect(component.modifiedContacts.withoutAssignedModule).toBeTruthy(); - moduleName = ''; - component.setModifiedContactsModuleAssignmentFilter(moduleName); - expect(component.modifiedContacts.moduleName).toBe(null); - expect(component.modifiedContacts.withoutAssignedModule).toBeFalsy(); - moduleName = 'Betriebstagebuch'; - component.setModifiedContactsModuleAssignmentFilter(moduleName); - expect(component.modifiedContacts.moduleName).toBe(moduleName); - expect(component.modifiedContacts.withoutAssignedModule).toBeFalsy(); - }); -});
diff --git a/projects/grid-failure-information-app/src/app/pages/contacts/contacts-list/contacts-list.component.ts b/projects/grid-failure-information-app/src/app/pages/contacts/contacts-list/contacts-list.component.ts deleted file mode 100644 index 2055929..0000000 --- a/projects/grid-failure-information-app/src/app/pages/contacts/contacts-list/contacts-list.component.ts +++ /dev/null
@@ -1,168 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2020 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 { ContactsSandbox } from '@pages/contacts/contacts.sandbox'; -import { CONTACTS_COLDEF } from '@pages/contacts/contacts-list/contacts-list-column-definition'; -import { BaseList } from '@shared/components/base-components/base.list'; -import { Router } from '@angular/router'; -import { Globals } from '@shared/constants/globals'; -import { ModifiedContacts } from '@shared/models/modifiedContacts.model'; - -@Component({ - selector: 'app-contacts-list', - templateUrl: './contacts-list.component.html', - styleUrls: ['./contacts-list.component.scss'], -}) -export class ContactsListComponent extends BaseList { - public readonly NEW_EXTERNAL_PERSON_PATH = `/${Globals.PATH.PERSONS}/${Globals.PATH.EXTERNAL}/${Globals.PATH.NEW}`; - public readonly NEW_INTERNAL_PERSON_PATH = `/${Globals.PATH.PERSONS}/${Globals.PATH.INTERNAL}/${Globals.PATH.NEW}`; - public readonly NEW_COMPANY_PATH = `/${Globals.PATH.COMPANY}/${Globals.PATH.NEW}`; - - public readonly INTERNAL_PERSON = Globals.CONTACT_TYPE_ID.INTERNAL_PERSON; - public readonly EXTERNAL_PERSON = Globals.CONTACT_TYPE_ID.EXTERNAL_PERSON; - public readonly COMPANY = Globals.CONTACT_TYPE_ID.COMPANY; - public readonly CONTACT_PERSON = Globals.CONTACT_TYPE_ID.CONTACT_PERSON; - - public columnDefinition: any = CONTACTS_COLDEF; - public modifiedContacts: ModifiedContacts = new ModifiedContacts(); - public isDSGVOFilterAdvancedVisible = false; - - private _sortingOrder: string = 'asc'; - private _sortingContactType: string = ''; - private _expiringDataInPast = false; - private _deletionLockExceeded = false; - - constructor(public contactsSandbox: ContactsSandbox, private router: Router) { - super(); - } - - ngOnInit() { - this.gridOptions = { - ...this.gridOptions, - localeText: Globals.LOCALE_TEXT, - }; - this.gridOptions.context = { - ...this.gridOptions.context, - icons: { edit: true, delete: false }, - }; - this.gridOptions.context.eventSubject.subscribe(this._handleBusEvents.bind(this)); - } - - private _handleBusEvents(event: any): any { - switch (event.type) { - case 'readonly': - this._navigateToDetails(event); - case 'edit': - this._navigateToDetails(event); - break; - case 'delete': - // this._openDialog(event); - break; - default: - break; - } - } - - public navigateTo(url: any) { - this.router.navigate([url]); - } - - private _navigateToDetails(event: any) { - let route; - switch (event.data.contactType) { - case Globals.CONTACT_TYPE_ID.EXTERNAL_PERSON: - route = `/${Globals.PATH.PERSONS}/${Globals.PATH.EXTERNAL}/`; - break; - case Globals.CONTACT_TYPE_ID.INTERNAL_PERSON: - route = `/${Globals.PATH.PERSONS}/${Globals.PATH.INTERNAL}/`; - break; - case Globals.CONTACT_TYPE_ID.CONTACT_PERSON: - route = `/${Globals.PATH.COMPANY}/${event.data.companyId}/${Globals.PATH.CONTACT_PERSON}/`; - break; - case Globals.CONTACT_TYPE_ID.COMPANY: - route = `/${Globals.PATH.COMPANY}/`; - break; - default: - route = '/overview'; - break; - } - - this.router.navigate(route !== '/overview' ? [route, event.data.uuid] : [route]); - } - - public setModifiedContactsSearchText(searchText: string) { - this.modifiedContacts.searchText = searchText; - } - - public setModifiedContactsContactTypeId(contactTypeId: string) { - this.modifiedContacts.contactTypeId = contactTypeId; - } - - public setModifiedContactsModuleAssignmentFilter(moduleName: string) { - if (moduleName === '-1') { - //show contacts without module assignments - this.modifiedContacts.moduleName = null; - this.modifiedContacts.withoutAssignedModule = true; - } else if (moduleName == '') { - //show contacts with all module assignments - this.modifiedContacts.moduleName = null; - this.modifiedContacts.withoutAssignedModule = false; - } else { - //show contacts with specific module assignments - this.modifiedContacts.moduleName = moduleName; - this.modifiedContacts.withoutAssignedModule = false; - } - } - - public setModifiedContactsExpiryDateFilter() { - this._expiringDataInPast = !this._expiringDataInPast; - this.modifiedContacts.expiringDataInPast = this._expiringDataInPast; - } - - public setModifiedContactsDeletionLockExceedFilter() { - this._deletionLockExceeded = !this._deletionLockExceeded; - this.modifiedContacts.deletionLockExceeded = this._deletionLockExceeded; - } - - public setSortingContactType(sortingContactType: string) { - this._sortingContactType = sortingContactType; - } - - public setSortingOrder(sortingOrder: string) { - this._sortingOrder = sortingOrder; - } - - public searchContacts(event) { - if (event.type == 'click' || event.type == 'change' || (event.type == 'keyup' && event.key == 'Enter')) { - this.modifiedContacts = { ...this.modifiedContacts }; - } else { - setTimeout(() => { - this.modifiedContacts = { ...this.modifiedContacts }; - }, 1000); - } - } - - public sortContacts() { - this._setModifiedContactsSort(); - this.modifiedContacts = { ...this.modifiedContacts }; - } - - private _setModifiedContactsSort() { - if (this._sortingOrder && this._sortingContactType) { - const sort = this._sortingContactType + ',' + this._sortingOrder; - this.modifiedContacts.sort = sort; - } else { - this.modifiedContacts.sort = null; - } - } -}
diff --git a/projects/grid-failure-information-app/src/app/pages/contacts/contacts-routing.module.ts b/projects/grid-failure-information-app/src/app/pages/contacts/contacts-routing.module.ts deleted file mode 100644 index f738158..0000000 --- a/projects/grid-failure-information-app/src/app/pages/contacts/contacts-routing.module.ts +++ /dev/null
@@ -1,28 +0,0 @@ - /******************************************************************************** - * Copyright (c) 2020 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 { ContactsListComponent } from '@pages/contacts/contacts-list/contacts-list.component'; - -const contactsRoutes: Routes = [ - { - path: 'overview', - component: ContactsListComponent - } -]; - -@NgModule({ - imports: [RouterModule.forChild(contactsRoutes)], - exports: [RouterModule] -}) -export class ContactsRoutingModule {}
diff --git a/projects/grid-failure-information-app/src/app/pages/contacts/contacts.module.ts b/projects/grid-failure-information-app/src/app/pages/contacts/contacts.module.ts deleted file mode 100644 index 771f2a4..0000000 --- a/projects/grid-failure-information-app/src/app/pages/contacts/contacts.module.ts +++ /dev/null
@@ -1,56 +0,0 @@ - /******************************************************************************** - * Copyright (c) 2020 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 { ContactsSandbox } from '@pages/contacts/contacts.sandbox'; -import { ContactsRoutingModule } from '@pages/contacts/contacts-routing.module'; -import { ContactsListComponent } from '@pages/contacts/contacts-list/contacts-list.component'; - -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { ReactiveFormsModule } from '@angular/forms'; -import { RouterModule } from '@angular/router'; - -import { ComponentsModule } from '@shared/components'; -import { TranslateModule } from '@ngx-translate/core'; -import { NgrxFormsModule } from 'ngrx-forms'; -import { FormsModule } from '@angular/forms'; -import { AgGridModule } from 'ag-grid-angular'; -import { DirectivesModule } from '@shared/directives'; -import { FiltersModule } from '@shared/filters/index.module'; -import { ContainersModule } from '@shared/containers'; -import { SetFilterComponent } from '@shared/filters/ag-grid/set-filter/set-filter.component'; -import { ContactsService } from '@pages/contacts/contacts.service'; -import { ContactsApiClient } from '@pages/contacts/contacts-api-client'; -import { EffectsModule } from '@ngrx/effects'; -import { ContactsEffects } from '@shared/store/effects/contacts.effect'; - - -@NgModule({ - imports: [ - CommonModule, - ComponentsModule, - TranslateModule, - DirectivesModule, - FiltersModule, - ReactiveFormsModule, - RouterModule, - NgrxFormsModule, - FormsModule, - AgGridModule.withComponents([SetFilterComponent]), - EffectsModule.forFeature([ContactsEffects]), - ContainersModule, - ContactsRoutingModule, - ], - declarations: [ContactsListComponent], - providers: [ContactsSandbox, ContactsService, ContactsApiClient], -}) -export class ContactsModule {}
diff --git a/projects/grid-failure-information-app/src/app/pages/contacts/contacts.sandbox.spec.ts b/projects/grid-failure-information-app/src/app/pages/contacts/contacts.sandbox.spec.ts deleted file mode 100644 index 2624548..0000000 --- a/projects/grid-failure-information-app/src/app/pages/contacts/contacts.sandbox.spec.ts +++ /dev/null
@@ -1,32 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2020 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 { ContactsSandbox } from '@pages/contacts/contacts.sandbox'; -import { Store } from '@ngrx/store'; -import { State } from '@shared/store'; -import { of } from 'rxjs'; - -describe('ContactsSandbox', () => { - let service: ContactsSandbox = {} as any; - let appState: Store<State>; - - beforeEach(() => { - appState = { dispatch: () => {}, pipe: () => of(true), select: () => of(true) } as any; - - service = new ContactsSandbox(appState); - }); - - it('should create ContactsSandbox service', () => { - expect(service).toBeTruthy(); - expect(service).toBeDefined(); - }); -});
diff --git a/projects/grid-failure-information-app/src/app/pages/contacts/contacts.sandbox.ts b/projects/grid-failure-information-app/src/app/pages/contacts/contacts.sandbox.ts deleted file mode 100644 index e407ac0..0000000 --- a/projects/grid-failure-information-app/src/app/pages/contacts/contacts.sandbox.ts +++ /dev/null
@@ -1,41 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2020 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 { BaseListSandbox } from '@shared/sandbox/base-list.sandbox'; -import { Injectable } from '@angular/core'; -import { Store } from '@ngrx/store'; -import * as store from '@shared/store'; -import * as contactsActions from '@shared/store/actions/contacts.action'; -import { ServerSideModel } from '@shared/models/server-side.model'; -import { Observable } from 'rxjs'; - -@Injectable() -export class ContactsSandbox extends BaseListSandbox { - public serverSideModel: ServerSideModel; - public contactListLoading$: Observable<boolean> = this.appState$.select(store.getContactsPageLoading); - - /** - * Creates an instance of ContactsSandbox. - * - * @author Martin Gardyan <martin.gardyan@pta.de> - * @param {Store<store.State>} appState$ - * @memberof ContactsSandbox - */ - constructor(protected appState$: Store<store.State>) { - super(appState$); - this.serverSideModel = { - loadAction: contactsActions.loadContactsPage, - successAction: contactsActions.loadContactsPageSuccess, - pageSize: this.pageSize, - }; - } -}
diff --git a/projects/grid-failure-information-app/src/app/pages/contacts/contacts.service.spec.ts b/projects/grid-failure-information-app/src/app/pages/contacts/contacts.service.spec.ts deleted file mode 100644 index afa89e4..0000000 --- a/projects/grid-failure-information-app/src/app/pages/contacts/contacts.service.spec.ts +++ /dev/null
@@ -1,40 +0,0 @@ - /******************************************************************************** - * Copyright (c) 2020 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 { ContactsService } from '@pages/contacts/contacts.service'; -import { PageModel } from './../../shared/models/page/page.model'; -import { Contact } from '@shared/models'; - - - -describe('ContactsService ', () => { - let service: ContactsService; - - - beforeEach(() => { - }); - - it('should provide gridPageAdapter', () => { - const pagemodel = new PageModel<Contact>(); - pagemodel.pageSize = 667; - - expect(ContactsService.gridPageAdapter( pagemodel ).pageSize).toBe(667); - }); - - - it('should transform contact details', () => { - const abstractContact: any = { lastName: 'Heysterkamp'}; - const transContact = ContactsService.contactDetailsAdapter(abstractContact); - - expect(transContact.lastName).toBe(abstractContact.lastName); - }); -});
diff --git a/projects/grid-failure-information-app/src/app/pages/contacts/contacts.service.ts b/projects/grid-failure-information-app/src/app/pages/contacts/contacts.service.ts deleted file mode 100644 index 776626b..0000000 --- a/projects/grid-failure-information-app/src/app/pages/contacts/contacts.service.ts +++ /dev/null
@@ -1,41 +0,0 @@ - /******************************************************************************** - * Copyright (c) 2020 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 { PageModel } from '@shared/models/page/page.model'; -import { Injectable } from '@angular/core'; -import { Contact } from '@shared/models'; - -/** - * Used to retrieve contacts - * - * @export - * @class ContactsService - */ -@Injectable() -export class ContactsService { - /** - * Transforms grid data recieved from the API into array of PageModel instances - * - * @param contacts - */ - static gridPageAdapter(response: PageModel<Contact>): PageModel<Contact> { - return response; - } - /** - * Transforms contact details recieved from the API into instance of 'Contact' - * - * @param contact - */ - static contactDetailsAdapter(contact: any): Contact { - return new Contact(contact); - } -}
diff --git a/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-api-client.ts b/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-api-client.ts index 4053f0d..7d1b338 100644 --- a/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-api-client.ts +++ b/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-api-client.ts
@@ -10,9 +10,8 @@ * * SPDX-License-Identifier: EPL-2.0 ********************************************************************************/ -import { Action } from '@ngrx/store'; import { Injectable } from '@angular/core'; -import { HttpService, Query, GET, Path, Adapter, PUT, Body, DefaultHeaders } from '@app/shared/async-services/http'; +import { HttpService, GET, Adapter, DefaultHeaders } from '@app/shared/async-services/http'; import { Observable } from 'rxjs'; import { GridFailureService } from '@pages/grid-failure/grid-failure.service'; import { GridFailure } from '@shared/models'; @@ -25,7 +24,7 @@ export class GridFailureApiClient extends HttpService { @GET('/grid-failure-informations') @Adapter(GridFailureService.gridAdapter) - public getAddressTypes(): Observable<GridFailure[]> { + public getGridFailures(): Observable<GridFailure[]> { return null; } }
diff --git a/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-list/grid-failure-list-column-definition.ts b/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-list/grid-failure-list-column-definition.ts index ff51d57..f15427f 100644 --- a/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-list/grid-failure-list-column-definition.ts +++ b/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-list/grid-failure-list-column-definition.ts
@@ -11,32 +11,30 @@ * SPDX-License-Identifier: EPL-2.0 ********************************************************************************/ import { IconCellRendererComponent } from '@shared/components/cell-renderer/icon-cell-renderer/icon-cell-renderer.component'; -import { BoolCellRendererComponent } from '@app/shared/components/cell-renderer/bool-cell-renderer/bool-cell-renderer.component'; -import { DateCellRendererComponent } from '@shared/components/cell-renderer/date-cell-renderer/date-cell-renderer.component'; import * as moment from 'moment'; export const GRID_FAILURE_COLDEF = [ { field: 'failureClassification', - headerName: 'GridFailures.FailureClassification', + headerName: 'GridFailure.FailureClassification', sortable: true, filter: 'setFilterComponent', }, { field: 'failureType', - headerName: 'GridFailures.FailureTyp', + headerName: 'GridFailure.FailureType', sortable: true, filter: 'setFilterComponent', }, { field: 'responsibility', - headerName: 'GridFailures.Responsibility', + headerName: 'GridFailure.Responsibility', sortable: true, filter: 'setFilterComponent', }, { field: 'internExtern', //Meldung durch - headerName: 'GridFailures.InternExtern', + headerName: 'GridFailure.InternExtern', sortable: true, filter: 'setFilterComponent', valueGetter: function(params) { @@ -53,37 +51,37 @@ }, { field: 'statusIntern', - headerName: 'GridFailures.StatusIntern', + headerName: 'GridFailure.StatusIntern', sortable: true, filter: 'setFilterComponent', }, { field: 'statusExtern', - headerName: 'GridFailures.StatusExtern', + headerName: 'GridFailure.StatusExtern', sortable: true, filter: 'setFilterComponent', }, { field: 'branch', - headerName: 'GridFailures.Branch', + headerName: 'GridFailure.Branch', sortable: true, filter: 'setFilterComponent', }, { field: 'voltageLevel', - headerName: 'GridFailures.VoltageLevel', + headerName: 'GridFailure.VoltageLevel', sortable: true, filter: 'setFilterComponent', }, { field: 'pressureLevel', - headerName: 'GridFailures.PressureLevel', + headerName: 'GridFailure.PressureLevel', sortable: true, filter: 'setFilterComponent', }, { field: 'failureBegin', - headerName: 'GridFailures.FailureBegin', + headerName: 'GridFailure.FailureBegin', sortable: true, filter: 'setFilterComponent', valueGetter: function(params) { @@ -92,7 +90,7 @@ }, { field: 'failureEndPlanned', - headerName: 'GridFailures.FailureEndPlanned', + headerName: 'GridFailure.FailureEndPlanned', sortable: true, filter: 'setFilterComponent', valueGetter: function(params) { @@ -101,7 +99,7 @@ }, { field: 'failureEndResupplied', - headerName: 'GridFailures.FailureEndResupplied', + headerName: 'GridFailure.FailureEndResupplied', sortable: true, filter: 'setFilterComponent', valueGetter: function(params) { @@ -110,61 +108,61 @@ }, { field: 'probableReason', - headerName: 'GridFailures.ProbableReason', + headerName: 'GridFailure.ProbableReason', sortable: true, filter: 'setFilterComponent', }, { field: 'internalRemark', - headerName: 'GridFailures.InternalRemark', + headerName: 'GridFailure.InternalRemark', sortable: true, filter: 'setFilterComponent', }, { field: 'postcode', - headerName: 'GridFailures.Postcode', + headerName: 'GridFailure.Postcode', sortable: true, filter: 'setFilterComponent', }, { field: 'city', - headerName: 'GridFailures.City', + headerName: 'GridFailure.City', sortable: true, filter: 'setFilterComponent', }, { field: 'district', - headerName: 'GridFailures.District', + headerName: 'GridFailure.District', sortable: true, filter: 'setFilterComponent', }, { field: 'street', - headerName: 'GridFailures.Street', + headerName: 'GridFailure.Street', sortable: true, filter: 'setFilterComponent', }, { field: 'housenumber', - headerName: 'GridFailures.Housenumber', + headerName: 'GridFailure.Housenumber', sortable: true, filter: 'setFilterComponent', }, { field: 'stationDescription', - headerName: 'GridFailures.StationDescription', + headerName: 'GridFailure.StationDescription', sortable: true, filter: 'setFilterComponent', }, { field: 'stationCoords', - headerName: 'GridFailures.StationCoords', + headerName: 'GridFailure.StationCoords', sortable: true, filter: 'setFilterComponent', }, { field: 'radius', - headerName: 'GridFailures.Radius', + headerName: 'GridFailure.Radius', sortable: true, filter: 'setFilterComponent', },
diff --git a/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-list/grid-failure-list.component.spec.ts b/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-list/grid-failure-list.component.spec.ts index e9cd3e7..53084f3 100644 --- a/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-list/grid-failure-list.component.spec.ts +++ b/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-list/grid-failure-list.component.spec.ts
@@ -10,31 +10,22 @@ * * SPDX-License-Identifier: EPL-2.0 ********************************************************************************/ - -/* tslint:disable:no-unused-variable */ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { By } from '@angular/platform-browser'; -import { DebugElement } from '@angular/core'; - -import { GridFailureListComponent } from './grid-failure-list.component'; +import { GridFailureListComponent } from '@pages/grid-failure/grid-failure-list/grid-failure-list.component'; describe('GridFailureListComponent', () => { let component: GridFailureListComponent; - let fixture: ComponentFixture<GridFailureListComponent>; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [GridFailureListComponent], - }).compileComponents(); - })); + const sandbox: any = () => {}; beforeEach(() => { - fixture = TestBed.createComponent(GridFailureListComponent); - component = fixture.componentInstance; - fixture.detectChanges(); + component = new GridFailureListComponent(sandbox); }); it('should create', () => { expect(component).toBeTruthy(); }); + + it('should initialize gridOptions context', () => { + component.ngOnInit(); + expect(component.gridOptions.context.icons.edit).toBeTruthy(); + }); });
diff --git a/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-routing.module.ts b/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-routing.module.ts index 1378264..f8839d4 100644 --- a/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-routing.module.ts +++ b/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure-routing.module.ts
@@ -13,11 +13,11 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { GridFailureListComponent } from '@pages/grid-failure/grid-failure-list/grid-failure-list.component'; -import { GridFailuresResolver } from '@pages/grid-failure//grid-failure.resolver'; +import { GridFailuresResolver } from '@pages/grid-failure/grid-failure.resolver'; const gridFailureRoutes: Routes = [ { - path: 'grid-failures-overview', + path: 'grid-failures', component: GridFailureListComponent, resolve: { gridFailuresTable: GridFailuresResolver,
diff --git a/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure.sandbox.spec.ts b/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure.sandbox.spec.ts index c37e40b..1d66cb4 100644 --- a/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure.sandbox.spec.ts +++ b/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure.sandbox.spec.ts
@@ -10,3 +10,31 @@ * * SPDX-License-Identifier: EPL-2.0 ********************************************************************************/ +import { GridFailureSandbox } from '@pages/grid-failure/grid-failure.sandbox'; +import { Store, ActionsSubject } from '@ngrx/store'; +import { State } from '@shared/store'; +import { of } from 'rxjs'; +import * as gridFailureActions from '@shared/store/actions/grid-failures.action'; + +describe('GridFailureSandbox', () => { + let service: GridFailureSandbox; + let appState: Store<State>; + let actionSubject: ActionsSubject; + + beforeEach(() => { + appState = { dispatch: () => {}, pipe: () => of(true), select: () => of(true) } as any; + actionSubject = { pipe: () => of(true) } as any; + spyOn(appState, 'dispatch').and.callFake(() => {}); + + service = new GridFailureSandbox(appState, actionSubject); + }); + + it('should create GridFailureSandbox service', () => { + expect(service).toBeTruthy(); + }); + + it('should dispatch loadGridFailures Action via loadGridFailures()', () => { + service.loadGridFailures(); + expect(appState.dispatch).toHaveBeenCalledWith(gridFailureActions.loadGridFailures()); + }); +});
diff --git a/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure.sandbox.ts b/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure.sandbox.ts index ef851d5..d107389 100644 --- a/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure.sandbox.ts +++ b/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure.sandbox.ts
@@ -16,8 +16,8 @@ import * as store from '@shared/store'; import { Observable } from 'rxjs'; import { ILoadGridFailuresSuccess } from '@shared/store/actions/grid-failures.action'; -import * as gridFailureActions from '@app/shared/store/actions/grid-failures.action'; -import { takeUntil, take } from 'rxjs/operators'; +import * as gridFailureActions from '@shared/store/actions/grid-failures.action'; +import { take } from 'rxjs/operators'; import { ofType } from '@ngrx/effects'; @Injectable()
diff --git a/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure.service.spec.ts b/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure.service.spec.ts index c37e40b..c248957 100644 --- a/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure.service.spec.ts +++ b/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure.service.spec.ts
@@ -10,3 +10,23 @@ * * SPDX-License-Identifier: EPL-2.0 ********************************************************************************/ +import { GridFailure } from '@shared/models'; +import { GridFailureService } from '@pages/grid-failure/grid-failure.service'; + +describe(' GridFailureService', () => { + beforeEach(() => {}); + + it('should transform list', () => { + const response = [new GridFailure()]; + response[0].id = 'X'; + + expect(GridFailureService.gridAdapter(response)[0].id).toBe('X'); + }); + + it('should transform details', () => { + const response: any = { id: 'X' }; + const item = GridFailureService.itemAdapter(response); + + expect(item.id).toBe(response.id); + }); +});
diff --git a/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure.service.ts b/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure.service.ts index aa96ab7..83bc837 100644 --- a/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure.service.ts +++ b/projects/grid-failure-information-app/src/app/pages/grid-failure/grid-failure.service.ts
@@ -10,7 +10,6 @@ * * SPDX-License-Identifier: EPL-2.0 ********************************************************************************/ -import { PageModel } from '@shared/models/page/page.model'; import { Injectable } from '@angular/core'; import { GridFailure } from '@shared/models';
diff --git a/projects/grid-failure-information-app/src/app/shared/components/base-components/base.component.ts b/projects/grid-failure-information-app/src/app/shared/components/base-components/base.component.ts index 9ca5a5c..027bd37 100644 --- a/projects/grid-failure-information-app/src/app/shared/components/base-components/base.component.ts +++ b/projects/grid-failure-information-app/src/app/shared/components/base-components/base.component.ts
@@ -1,5 +1,17 @@ +/******************************************************************************** + * Copyright (c) 2020 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 { OnDestroy } from '@angular/core'; -import { BaseSandbox } from '@app/shared/sandbox/base.sandbox'; +import { BaseSandbox } from '@shared/sandbox/base.sandbox'; export class BaseComponent implements OnDestroy { constructor(public baseSandebox?: BaseSandbox) {}
diff --git a/projects/grid-failure-information-app/src/app/shared/components/cell-renderer/contact-type-cell-renderer/contact-type-cell-renderer.component.html b/projects/grid-failure-information-app/src/app/shared/components/cell-renderer/contact-type-cell-renderer/contact-type-cell-renderer.component.html deleted file mode 100644 index b54bfc6..0000000 --- a/projects/grid-failure-information-app/src/app/shared/components/cell-renderer/contact-type-cell-renderer/contact-type-cell-renderer.component.html +++ /dev/null
@@ -1,13 +0,0 @@ -<!-- /******************************************************************************** -* Copyright (c) 2020 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 -********************************************************************************/ --> -<span>{{contactType}}</span>
diff --git a/projects/grid-failure-information-app/src/app/shared/components/cell-renderer/contact-type-cell-renderer/contact-type-cell-renderer.component.scss b/projects/grid-failure-information-app/src/app/shared/components/cell-renderer/contact-type-cell-renderer/contact-type-cell-renderer.component.scss deleted file mode 100644 index 46dc5b1..0000000 --- a/projects/grid-failure-information-app/src/app/shared/components/cell-renderer/contact-type-cell-renderer/contact-type-cell-renderer.component.scss +++ /dev/null
@@ -1,12 +0,0 @@ - /******************************************************************************** - * Copyright (c) 2020 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/projects/grid-failure-information-app/src/app/shared/components/cell-renderer/contact-type-cell-renderer/contact-type-cell-renderer.component.spec.ts b/projects/grid-failure-information-app/src/app/shared/components/cell-renderer/contact-type-cell-renderer/contact-type-cell-renderer.component.spec.ts deleted file mode 100644 index bc7abcf..0000000 --- a/projects/grid-failure-information-app/src/app/shared/components/cell-renderer/contact-type-cell-renderer/contact-type-cell-renderer.component.spec.ts +++ /dev/null
@@ -1,67 +0,0 @@ - /******************************************************************************** - * Copyright (c) 2020 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 { async, ComponentFixture, TestBed } from '@angular/core/testing'; -import { NO_ERRORS_SCHEMA } from '@angular/core'; -import { Globals } from '@shared/constants/globals'; -import { ContactTypeCellRendererComponent } from './contact-type-cell-renderer.component'; - -describe('ContactTypeCellRendererComponent', () => { - let component: ContactTypeCellRendererComponent; - let fixture: ComponentFixture<ContactTypeCellRendererComponent>; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - schemas: [NO_ERRORS_SCHEMA], - declarations: [ ContactTypeCellRendererComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(ContactTypeCellRendererComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - expect(component).toBeDefined(); - }); - - it('should display EXTERNAL_PERSON for E_P value', () => { - component.agInit({ value: 'E_P' }); - expect(component.contactType).toEqual(Globals.CONTACT_TYPE.EXTERNAL_PERSON); - }); - - it('should display INTERNAL_PERSON for I_P value', () => { - component.agInit({ value: 'I_P' }); - expect(component.contactType).toEqual(Globals.CONTACT_TYPE.INTERNAL_PERSON); - }); - - it('should display COMPANY for COM value', () => { - component.agInit({ value: 'COM' }); - expect(component.contactType).toEqual(Globals.CONTACT_TYPE.COMPANY); - }); - - it('should display CONTACT_PERSON for C_P value', () => { - component.agInit({ value: 'C_P' }); - expect(component.contactType).toEqual(Globals.CONTACT_TYPE.CONTACT_PERSON); - }); - - it('should display UNKNOWN for Unknown value', () => { - component.agInit({ value: 'X' }); - expect(component.contactType).toEqual(Globals.CONTACT_TYPE.UNKNOWN); - }); - -});
diff --git a/projects/grid-failure-information-app/src/app/shared/components/cell-renderer/contact-type-cell-renderer/contact-type-cell-renderer.component.ts b/projects/grid-failure-information-app/src/app/shared/components/cell-renderer/contact-type-cell-renderer/contact-type-cell-renderer.component.ts deleted file mode 100644 index 6b23437..0000000 --- a/projects/grid-failure-information-app/src/app/shared/components/cell-renderer/contact-type-cell-renderer/contact-type-cell-renderer.component.ts +++ /dev/null
@@ -1,45 +0,0 @@ - /******************************************************************************** - * Copyright (c) 2020 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 '@shared/constants/globals'; - -@Component({ - selector: 'app-contact-type-cell-renderer', - templateUrl: './contact-type-cell-renderer.component.html', - styleUrls: ['./contact-type-cell-renderer.component.scss'] -}) -export class ContactTypeCellRendererComponent { - - public contactType: string; - - agInit(params: any): void { - - switch(params.value) { - case Globals.CONTACT_TYPE_ID.EXTERNAL_PERSON: - this.contactType = Globals.CONTACT_TYPE.EXTERNAL_PERSON; - break; - case Globals.CONTACT_TYPE_ID.INTERNAL_PERSON: - this.contactType = Globals.CONTACT_TYPE.INTERNAL_PERSON; - break; - case Globals.CONTACT_TYPE_ID.COMPANY: - this.contactType = Globals.CONTACT_TYPE.COMPANY; - break; - case Globals.CONTACT_TYPE_ID.CONTACT_PERSON: - this.contactType = Globals.CONTACT_TYPE.CONTACT_PERSON; - break; - default: - this.contactType = Globals.CONTACT_TYPE.UNKNOWN; - break; - } - } -}
diff --git a/projects/grid-failure-information-app/src/app/shared/components/column-definitions/addresses-data-list-column-definition.ts b/projects/grid-failure-information-app/src/app/shared/components/column-definitions/addresses-data-list-column-definition.ts deleted file mode 100644 index 6d3e52c..0000000 --- a/projects/grid-failure-information-app/src/app/shared/components/column-definitions/addresses-data-list-column-definition.ts +++ /dev/null
@@ -1,87 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2020 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 { IconCellRendererComponent } from '@shared/components/cell-renderer/icon-cell-renderer/icon-cell-renderer.component'; -import { BoolCellRendererComponent } from '@shared/components/cell-renderer/bool-cell-renderer/bool-cell-renderer.component'; - -export const ADDRESS_LIST_COLDEF = [ - { - field: 'addressTypeType', - colId: 'addressTypeType', - headerName: 'Address.AddressType', - sortable: true, - filter: true, - }, - { - field: 'isMainAddress', - colId: 'isMainAddress', - headerName: 'Address.MainAddress', - sortable: true, - filter: true, - cellRendererFramework: BoolCellRendererComponent, - }, - { - field: 'postcode', - colId: 'postcode', - headerName: 'Address.Postcode', - sortable: true, - filter: true, - }, - { - field: 'community', - colId: 'community', - headerName: 'Address.Community', - sortable: true, - filter: true, - }, - { - field: 'communitySuffix', - colId: 'communitySuffix', - headerName: 'Address.CommunitySuffix', - sortable: true, - filter: true, - }, - { - field: 'street', - colId: 'street', - headerName: 'Address.Street', - sortable: true, - filter: true, - }, - { - field: 'housenumber', - colId: 'housenumber', - headerName: 'Address.Housenumber', - sortable: true, - filter: true, - }, - { - field: 'note', - colId: 'note', - headerName: 'Address.Note', - sortable: true, - filter: true, - }, - { - field: 'tools', - headerName: ' ', - pinned: 'right', - maxWidth: 110, - minWidth: 110, - lockPosition: true, - sortable: false, - filter: false, - suppressMenu: true, - suppressSizeToFit: true, - cellRendererFramework: IconCellRendererComponent, - }, -];
diff --git a/projects/grid-failure-information-app/src/app/shared/components/column-definitions/communications-data-list-column-definition.ts b/projects/grid-failure-information-app/src/app/shared/components/column-definitions/communications-data-list-column-definition.ts deleted file mode 100644 index e2315fa..0000000 --- a/projects/grid-failure-information-app/src/app/shared/components/column-definitions/communications-data-list-column-definition.ts +++ /dev/null
@@ -1,50 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2020 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 { IconCellRendererComponent } from '@shared/components/cell-renderer/icon-cell-renderer/icon-cell-renderer.component'; - -export const COMMUNICATIONS_DATA_LIST_COLDEF = [ - { - field: 'communicationTypeType', - colId: 'communicationTypeType', - headerName: 'CommunicationsData.CommunicationType', - sortable: true, - filter: true, - }, - { - field: 'communicationData', - colId: 'communicationData', - headerName: 'CommunicationsData.CommunicationData', - sortable: true, - filter: true, - }, - { - field: 'note', - colId: 'note', - headerName: 'CommunicationsData.Note', - sortable: true, - filter: true, - }, - { - field: 'tools', - headerName: ' ', - pinned: 'right', - maxWidth: 110, - minWidth: 110, - lockPosition: true, - sortable: false, - filter: false, - suppressMenu: true, - suppressSizeToFit: true, - cellRendererFramework: IconCellRendererComponent, - }, -];
diff --git a/projects/grid-failure-information-app/src/app/shared/components/column-definitions/user-module-assignment-data-list-column-definition.ts b/projects/grid-failure-information-app/src/app/shared/components/column-definitions/user-module-assignment-data-list-column-definition.ts deleted file mode 100644 index 8276782..0000000 --- a/projects/grid-failure-information-app/src/app/shared/components/column-definitions/user-module-assignment-data-list-column-definition.ts +++ /dev/null
@@ -1,62 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2020 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 { IconCellRendererComponent } from '@shared/components/cell-renderer/icon-cell-renderer/icon-cell-renderer.component'; -import { DateCellRendererComponent } from '@shared/components/cell-renderer/date-cell-renderer/date-cell-renderer.component'; - -export const USER_MODULE_ASSIGNMENT_LIST_COLDEF = [ - { - field: 'modulName', - headerName: 'UserModuleAssignment.ModuleName', - sortable: true, - filter: true, - }, - { - field: 'assignmentDate', - headerName: 'UserModuleAssignment.AssignmentDate', - sortable: true, - filter: true, - cellRendererFramework: DateCellRendererComponent, - }, - { - field: 'expiringDate', - headerName: 'UserModuleAssignment.ExpiringDate', - sortable: true, - filter: true, - cellRendererFramework: DateCellRendererComponent, - }, - { - field: 'deletionLockUntil', - headerName: 'UserModuleAssignment.DeletionLockUntil', - sortable: true, - filter: true, - cellRendererFramework: DateCellRendererComponent, - }, - { - field: 'assignmentNote', - headerName: 'UserModuleAssignment.AssignmentNote', - sortable: true, - filter: true, - }, - { - field: 'tools', - headerName: ' ', - pinned: 'right', - maxWidth: 100, - lockPosition: true, - sortable: false, - filter: false, - suppressMenu: true, - suppressSizeToFit: true, - cellRendererFramework: IconCellRendererComponent, - }, -];
diff --git a/projects/grid-failure-information-app/src/app/shared/components/header/header.component.html b/projects/grid-failure-information-app/src/app/shared/components/header/header.component.html index 2990dc9..b9b1f16 100644 --- a/projects/grid-failure-information-app/src/app/shared/components/header/header.component.html +++ b/projects/grid-failure-information-app/src/app/shared/components/header/header.component.html
@@ -12,14 +12,14 @@ ********************************************************************************/ --> <nav class="navbar navbar-default navbar-fixed-top masthead overview-navbar" role="banner"> <div class="container-fluid"> - <div class="navbar-header" (click)="navigateToOverview()"> + <div class="navbar-header" (click)="navigateHome()"> <a class="navbar-brand"> <span class="open">Open</span> <span class="konsequenz">KONSEQUENZ</span> </a> </div> <div class="navbar-right" style="display: inline-flex;"> - <button type="button" class="btn btn-link navbar-btn" (click)="navigateToOverview()"> + <button type="button" class="btn btn-link navbar-btn" (click)="navigateHome()"> <em class="fa fa-home"></em> </button> <a class="btn btn-link navbar-btn" target="_blank" [href]="helpUrl">
diff --git a/projects/grid-failure-information-app/src/app/shared/components/header/header.component.spec.ts b/projects/grid-failure-information-app/src/app/shared/components/header/header.component.spec.ts index 4e4a858..be07366 100644 --- a/projects/grid-failure-information-app/src/app/shared/components/header/header.component.spec.ts +++ b/projects/grid-failure-information-app/src/app/shared/components/header/header.component.spec.ts
@@ -25,9 +25,9 @@ expect(component).toBeTruthy(); }); - it('should navigate to overview after call navigateToOverview', () => { + it('should navigate to overview after call navigateHome', () => { const spy = spyOn(router, 'navigateByUrl'); - component.navigateToOverview(); - expect(spy).toHaveBeenCalledWith('/overview'); + component.navigateHome(); + expect(spy).toHaveBeenCalledWith('/grid-failures'); }); });
diff --git a/projects/grid-failure-information-app/src/app/shared/components/header/header.component.ts b/projects/grid-failure-information-app/src/app/shared/components/header/header.component.ts index a7b2832..c5ababc 100644 --- a/projects/grid-failure-information-app/src/app/shared/components/header/header.component.ts +++ b/projects/grid-failure-information-app/src/app/shared/components/header/header.component.ts
@@ -12,7 +12,7 @@ ********************************************************************************/ import { Component, Output, Input, EventEmitter, ChangeDetectionStrategy } from '@angular/core'; import { Router } from '@angular/router'; -import { navigateToOverview } from '@shared/utility'; +import { navigateHome } from '@shared/utility'; import { Globals } from '@shared/constants/globals'; @Component({ @@ -30,7 +30,7 @@ constructor(public router: Router) {} - public navigateToOverview(): void { - navigateToOverview(this.router); + public navigateHome(): void { + navigateHome(this.router); } }
diff --git a/projects/grid-failure-information-app/src/app/shared/components/index.ts b/projects/grid-failure-information-app/src/app/shared/components/index.ts index b37c267..d3e76b4 100644 --- a/projects/grid-failure-information-app/src/app/shared/components/index.ts +++ b/projects/grid-failure-information-app/src/app/shared/components/index.ts
@@ -13,7 +13,6 @@ import { SafetyQueryDialogComponent } from '@shared/components/dialogs/safety-query-dialog/safety-query-dialog.component'; import { BoolCellRendererComponent } from '@shared/components/cell-renderer/bool-cell-renderer/bool-cell-renderer.component'; import { IconCellRendererComponent } from '@shared/components/cell-renderer/icon-cell-renderer/icon-cell-renderer.component'; -import { ContactTypeCellRendererComponent } from '@shared/components/cell-renderer/contact-type-cell-renderer/contact-type-cell-renderer.component'; import { PaginationComponent } from '@app/shared/components/pagination/pagination.component'; import { LoadingSpinnerComponent } from '@shared/components/loading-spinner/loading-spinner.component'; import { NgModule } from '@angular/core'; @@ -43,7 +42,6 @@ VersionInfo, LoadingSpinnerComponent, PaginationComponent, - ContactTypeCellRendererComponent, IconCellRendererComponent, SafetyQueryDialogComponent, ExpandableComponent, @@ -68,14 +66,7 @@ ], declarations: COMPONENTS, exports: COMPONENTS, - entryComponents: [ - PaginationComponent, - ContactTypeCellRendererComponent, - IconCellRendererComponent, - SafetyQueryDialogComponent, - BoolCellRendererComponent, - DateCellRendererComponent, - ], + entryComponents: [PaginationComponent, IconCellRendererComponent, SafetyQueryDialogComponent, BoolCellRendererComponent, DateCellRendererComponent], providers: [DatePipe, { provide: NgbDateParserFormatter, useClass: NgbDateCustomParserFormatter }], }) export class ComponentsModule {}
diff --git a/projects/grid-failure-information-app/src/app/shared/models/communication-type.model.ts b/projects/grid-failure-information-app/src/app/shared/models/communication-type.model.ts deleted file mode 100644 index b5f46aa..0000000 --- a/projects/grid-failure-information-app/src/app/shared/models/communication-type.model.ts +++ /dev/null
@@ -1,27 +0,0 @@ - /******************************************************************************** - * Copyright (c) 2020 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 CommunicationType { - - public id: string = null; - public type: string = null; - public description: string = null; - public editable: boolean = null; - public mappingLdap: boolean = null; - public isDisabled: boolean = null; - - public constructor(data: any = null) { - Object.keys(data || {}) - .filter(property => this.hasOwnProperty(property)) - .forEach(property => (this[property] = data[property])); - } -}
diff --git a/projects/grid-failure-information-app/src/app/shared/models/contact.model.ts b/projects/grid-failure-information-app/src/app/shared/models/contact.model.ts deleted file mode 100644 index 203ccc9..0000000 --- a/projects/grid-failure-information-app/src/app/shared/models/contact.model.ts +++ /dev/null
@@ -1,37 +0,0 @@ - /******************************************************************************** - * Copyright (c) 2020 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 Contact { - - public id: string = null; - public name: string = null; - public firstName: string = null; - public lastName: string = null; - public email: string = null; - public contactType: string = null; - public note: string = null; - public street: string = null; - public housenumber: string = null; - public community: string = null; - public companyName: string = null; - public companyType: string = null; - public fkContactId: number = null; - public fkSalutationId: number = null; - public salutationType: string = null; - public department: string = null; - - public constructor(data: any = null) { - Object.keys(data || {}) - .filter(property => this.hasOwnProperty(property)) - .forEach(property => (this[property] = data[property])); - } -}
diff --git a/projects/grid-failure-information-app/src/app/shared/models/grid-failure.model.ts b/projects/grid-failure-information-app/src/app/shared/models/grid-failure.model.ts index 5b1f946..46bf646 100644 --- a/projects/grid-failure-information-app/src/app/shared/models/grid-failure.model.ts +++ b/projects/grid-failure-information-app/src/app/shared/models/grid-failure.model.ts
@@ -17,11 +17,11 @@ public branchId: string = null; public city: string = null; public district: string = null; - public failureBegin: string = null; //"2020-02-26T20:34:57.033Z", + public failureBegin: string = null; public failureClassification: string = null; public failureClassificationId: string = null; - public failureEndPlanned: string = null; //2020-02-26T20:34:57.033Z", - public failureEndResupplied: string = null; //"2020-02-26T20:34:57.033Z", + public failureEndPlanned: string = null; + public failureEndResupplied: string = null; public failureType: string = null; public failureTypeId: string = null; public housenumber: string = null;
diff --git a/projects/grid-failure-information-app/src/app/shared/models/index.ts b/projects/grid-failure-information-app/src/app/shared/models/index.ts index 489385e..4a205e6 100644 --- a/projects/grid-failure-information-app/src/app/shared/models/index.ts +++ b/projects/grid-failure-information-app/src/app/shared/models/index.ts
@@ -10,5 +10,4 @@ * * SPDX-License-Identifier: EPL-2.0 ********************************************************************************/ -export * from './contact.model'; export * from './grid-failure.model';
diff --git a/projects/grid-failure-information-app/src/app/shared/models/modifiedContacts.model.ts b/projects/grid-failure-information-app/src/app/shared/models/modifiedContacts.model.ts deleted file mode 100644 index e7817a9..0000000 --- a/projects/grid-failure-information-app/src/app/shared/models/modifiedContacts.model.ts +++ /dev/null
@@ -1,17 +0,0 @@ -import { Contact } from '@shared/models'; - -export class ModifiedContacts { - public searchText: string = null; - public contactTypeId: string = ''; - public sort: string = null; - public moduleName: string = null; - public withoutAssignedModule: boolean = null; - public expiringDataInPast: boolean = null; - public deletionLockExceeded: boolean = null; - - public constructor(data: any = null) { - Object.keys(data || {}) - .filter(property => this.hasOwnProperty(property)) - .forEach(property => (this[property] = data[property])); - } -}
diff --git a/projects/grid-failure-information-app/src/app/shared/models/product.model.ts b/projects/grid-failure-information-app/src/app/shared/models/product.model.ts deleted file mode 100644 index fe5939b..0000000 --- a/projects/grid-failure-information-app/src/app/shared/models/product.model.ts +++ /dev/null
@@ -1,33 +0,0 @@ - /******************************************************************************** - * Copyright (c) 2020 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 Product { - public id: number = null; - public serialNumber: string = null; - public name: string = null; - public description: string = null; - public category: string = null; - public warrantyExpiration: string = null; - public price: number = null; - public currency: string = null; - - /** - *Creates an instance of Product. - * @param {*} [data=null] - * @memberof Product - */ - public constructor(data: any = null) { - Object.keys(data || {}) - .filter(property => this.hasOwnProperty(property)) - .forEach(property => (this[property] = data[property])); - } -}
diff --git a/projects/grid-failure-information-app/src/app/shared/store/actions/contacts.action.ts b/projects/grid-failure-information-app/src/app/shared/store/actions/contacts.action.ts deleted file mode 100644 index 826eef0..0000000 --- a/projects/grid-failure-information-app/src/app/shared/store/actions/contacts.action.ts +++ /dev/null
@@ -1,34 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2020 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 { createAction, props } from '@ngrx/store'; -import { Contact } from '@shared/models'; -import { PageRequestInterface } from '@shared/models/page/page-request.interface'; -import { PageModel } from '@shared/models/page/page.model'; - -export interface ILoadContactsPage { - payload: PageRequestInterface; -} -export interface ILoadContactsPageSuccess { - payload: PageModel<Contact>; -} - -export interface ILoadContactsPageFail { - payload: string; -} -export const loadContactsPage = createAction('[Contacts] Load Page', props<ILoadContactsPage>()); -export const loadContactsPageSuccess = createAction('[Contacts] Load Page Success', props<ILoadContactsPageSuccess>()); -export const loadContactsPageFail = createAction('[Contacts] Load Page Fail', props<ILoadContactsPageFail>()); - -export const anonymizeContact = createAction('[Contact] Anonymize', props<{ payload: string }>()); -export const anonymizeContactSuccess = createAction('[Contact] Anonymize Success'); -export const anonymizeContactFail = createAction('[Contact] Anonymize Fail', props<{ payload: string }>());
diff --git a/projects/grid-failure-information-app/src/app/shared/store/effects/contacts.effect.ts b/projects/grid-failure-information-app/src/app/shared/store/effects/contacts.effect.ts deleted file mode 100644 index a273757..0000000 --- a/projects/grid-failure-information-app/src/app/shared/store/effects/contacts.effect.ts +++ /dev/null
@@ -1,54 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2020 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 'rxjs/add/operator/catch'; -import 'rxjs/add/operator/map'; -import 'rxjs/add/operator/switchMap'; -import { Injectable } from '@angular/core'; -import { createEffect, Actions, ofType } from '@ngrx/effects'; -import { of } from 'rxjs/observable/of'; -import * as contactsActions from '@shared/store/actions/contacts.action'; -import { ContactsApiClient } from '@pages/contacts/contacts-api-client'; -import { catchError, map, switchMap } from 'rxjs/operators'; -import { PageRequestInterface } from '@shared/models/page/page-request.interface'; - -@Injectable() -export class ContactsEffects { - /* paged list */ - getContactsPage$: any = createEffect(() => - this._actions$.pipe( - ofType(contactsActions.loadContactsPage), - map(action => action['payload']), - switchMap((request: PageRequestInterface) => { - return this._contactsApiClient.getContacts(request).pipe( - map(contacts => contactsActions.loadContactsPageSuccess({ payload: contacts })), - catchError(error => of(contactsActions.loadContactsPageFail({ payload: error }))) - ); - }) - ) - ); - - anonymizeContact$: any = createEffect(() => - this._actions$.pipe( - ofType(contactsActions.anonymizeContact), - map(action => action['payload']), - switchMap((id: string) => { - return this._contactsApiClient.anonymizeContact(id).pipe( - map(() => contactsActions.anonymizeContactSuccess()), - catchError(error => of(contactsActions.anonymizeContactFail({ payload: error }))) - ); - }) - ) - ); - - constructor(private _actions$: Actions, private _contactsApiClient: ContactsApiClient) {} -}
diff --git a/projects/grid-failure-information-app/src/app/shared/store/effects/contacts.effects.spec.ts b/projects/grid-failure-information-app/src/app/shared/store/effects/contacts.effects.spec.ts deleted file mode 100644 index 9d4c8ec..0000000 --- a/projects/grid-failure-information-app/src/app/shared/store/effects/contacts.effects.spec.ts +++ /dev/null
@@ -1,86 +0,0 @@ -/******************************************************************************** - * Copyright (c) 2020 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 { PageRequestInterface } from '@shared/models/page/page-request.interface'; -import { take } from 'rxjs/operators'; -import { ContactsEffects } from '@shared/store/effects/contacts.effect'; -import { Subject, of, throwError, Observable } from 'rxjs'; -import { Contact } from '@shared/models'; -import * as contactsActions from '@shared/store/actions/contacts.action'; -import { ContactsApiClient } from '@pages/contacts/contacts-api-client'; -import { PageModel } from '@shared/models/page/page.model'; - -describe('Contacts Effects', () => { - let effects: ContactsEffects; - let actions$: Subject<any>; - let apiClient: ContactsApiClient; - let apiResponse = new PageModel<Contact>({ - content: [new Contact({ id: '1' })], - }) as any; - - beforeEach(() => { - apiClient = { - getContacts() {}, - anonymizeContact() {}, - } as any; - actions$ = new Subject(); - effects = new ContactsEffects(actions$, apiClient); - }); - - it('should be truthy', () => { - expect(effects).toBeTruthy(); - }); - - it('should equal loadContactsPageSuccess after getContactsPage', done => { - let request = { - payload: { - pageNumber: 1, - pageSize: 3, - } as PageRequestInterface, - }; - spyOn(apiClient, 'getContacts').and.returnValue(of(apiResponse)); - - effects.getContactsPage$.pipe(take(1)).subscribe(result => { - expect(result).toEqual(contactsActions.loadContactsPageSuccess({ payload: apiResponse })); - }); - done(); - - actions$.next(contactsActions.loadContactsPage(request)); - }); - - it('should equal loadContactsPageFail after getContactsPage Error', done => { - let request = { - payload: { - pageNumber: 1, - pageSize: 3, - } as PageRequestInterface, - }; - spyOn(apiClient, 'getContacts').and.returnValue(throwError('x')); - - effects.getContactsPage$.pipe(take(1)).subscribe(result => { - expect(result).toEqual(contactsActions.loadContactsPageFail({ payload: 'x' })); - }); - done(); - - actions$.next(contactsActions.loadContactsPage(request)); - }); - - it('should successfully process on anonymizeContact action', done => { - apiResponse = new Observable<void>(); - spyOn(apiClient, 'anonymizeContact').and.returnValue(of(apiResponse)); - effects.anonymizeContact$.pipe(take(1)).subscribe(result => { - expect(result).toEqual(contactsActions.anonymizeContactSuccess()); - }); - done(); - actions$.next(contactsActions.anonymizeContact({ payload: 'x' })); - }); -});
diff --git a/projects/grid-failure-information-app/src/app/shared/store/effects/grid-failures.effect.ts b/projects/grid-failure-information-app/src/app/shared/store/effects/grid-failures.effect.ts index 3b74d8b..e566510 100644 --- a/projects/grid-failure-information-app/src/app/shared/store/effects/grid-failures.effect.ts +++ b/projects/grid-failure-information-app/src/app/shared/store/effects/grid-failures.effect.ts
@@ -16,10 +16,9 @@ import { Injectable } from '@angular/core'; import { createEffect, Actions, ofType } from '@ngrx/effects'; import { of } from 'rxjs/observable/of'; -import * as gridFailureActions from '@app/shared/store/actions/grid-failures.action'; +import * as gridFailureActions from '@shared/store/actions/grid-failures.action'; import { GridFailureApiClient } from '@pages/grid-failure/grid-failure-api-client'; import { catchError, map, switchMap } from 'rxjs/operators'; -import { GridFailure } from '@shared/models'; import { Store } from '@ngrx/store'; @Injectable() @@ -28,7 +27,7 @@ this._actions$.pipe( ofType(gridFailureActions.loadGridFailures), switchMap(() => { - return this._apiClient.getAddressTypes().pipe( + return this._apiClient.getGridFailures().pipe( map(item => gridFailureActions.loadGridFailuresSuccess({ payload: item })), catchError(error => of(gridFailureActions.loadGridFailuresFail({ payload: error }))) );
diff --git a/projects/grid-failure-information-app/src/app/shared/store/index.ts b/projects/grid-failure-information-app/src/app/shared/store/index.ts index b5c4299..03dcc98 100644 --- a/projects/grid-failure-information-app/src/app/shared/store/index.ts +++ b/projects/grid-failure-information-app/src/app/shared/store/index.ts
@@ -19,7 +19,6 @@ */ import * as fromSettings from '@shared/store/reducers/settings.reducer'; import * as fromGridFailures from '@shared/store/reducers/grid-failures/grid-failures.reducer'; -import * as fromContactsPage from '@shared/store/reducers/contacts/contacts-page.reducer'; import { createFeatureSelector } from '@ngrx/store'; import { createSelector } from 'reselect'; @@ -29,7 +28,6 @@ */ export interface State { settings: fromSettings.State; - contactsPage: fromContactsPage.State; } export interface GridFailureState { @@ -44,7 +42,6 @@ */ export const reducers = { settings: fromSettings.reducer, - contactsPage: fromContactsPage.reducer, }; export const gridFailureReducers = { @@ -67,15 +64,6 @@ export const getAvailableLanguages = createSelector(getSettingsState, fromSettings.getAvailableLanguages); /** - * Contacts Page store functions - */ -export const getContactsPageState = (state: State) => state.contactsPage; -export const getContactsPageLoaded = createSelector(getContactsPageState, fromContactsPage.getLoaded); -export const getContactsPageLoading = createSelector(getContactsPageState, fromContactsPage.getLoading); -export const getContactsPageFailed = createSelector(getContactsPageState, fromContactsPage.getFailed); -export const getContactsPageData = createSelector(getContactsPageState, fromContactsPage.getData); - -/** * Settings store functions */ export const getUser = createSelector(getSettingsState, fromSettings.getUser);
diff --git a/projects/grid-failure-information-app/src/app/shared/store/reducers/contacts/contacts-page.reducer.spec.ts b/projects/grid-failure-information-app/src/app/shared/store/reducers/contacts/contacts-page.reducer.spec.ts deleted file mode 100644 index b4a8900..0000000 --- a/projects/grid-failure-information-app/src/app/shared/store/reducers/contacts/contacts-page.reducer.spec.ts +++ /dev/null
@@ -1,85 +0,0 @@ - /******************************************************************************** - * Copyright (c) 2020 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 { PageModel } from '@shared/models/page/page.model'; -import * as contactsActions from '@shared/store/actions/contacts.action'; -import {contactsPageReducer, INITIAL_STATE, getData, getLoading, getLoaded, getFailed, reducer} from '@shared/store/reducers/contacts/contacts-page.reducer'; - -describe('ContactsPage reducer', () => { - - it('should return the initial state', () => { - const action = { type: 'NOOP' } as any; - const result = reducer(undefined, action); - - expect(result).toBe(INITIAL_STATE); - }); - - // it('should return initial state in case of missing action', () => { - // const result = reducer(undefined, null); - // expect(result).toBe(INITIAL_STATE); - // }); - - it('should trigger loading state', () => { - const action = contactsActions.loadContactsPage({payload: 'xy'} as any); - const result = contactsPageReducer(INITIAL_STATE, action); - - expect(result).toEqual({ - ...INITIAL_STATE, - loading: true, - }); - }); - - it('should trigger loaded state', () => { - const contacts: contactsActions.ILoadContactsPageSuccess = {payload: new PageModel}; - contacts.payload.content = []; - const action = contactsActions.loadContactsPageSuccess(contacts); - const result = contactsPageReducer(INITIAL_STATE, action); - - expect(result.loaded).toBe(true); - }); - - it('should trigger failed state', () => { - const error: contactsActions.ILoadContactsPageFail = {payload: 'err_msg'}; - const action = contactsActions.loadContactsPageFail(error); - const result = contactsPageReducer(INITIAL_STATE, action); - - expect(result).toEqual({ - ...INITIAL_STATE, - failed: true, - }); - }); - - it('getData return state.data', () => { - const state = { ...INITIAL_STATE }; - const result = getData(state); - expect(result).toBe(state.data); - }); - - it('getLoading return state.loading', () => { - const state = { ...INITIAL_STATE }; - const result = getLoading(state); - expect(result).toBe(state.loading); - }); - - it('getLoaded return state.loaded', () => { - const state = { ...INITIAL_STATE }; - const result = getLoaded(state); - expect(result).toBe(state.loaded); - }); - - it('getFailed return state.failed', () => { - const state = { ...INITIAL_STATE }; - const result = getFailed(state); - expect(result).toBe(state.failed); - }); - -});
diff --git a/projects/grid-failure-information-app/src/app/shared/store/reducers/contacts/contacts-page.reducer.ts b/projects/grid-failure-information-app/src/app/shared/store/reducers/contacts/contacts-page.reducer.ts deleted file mode 100644 index 8875e22..0000000 --- a/projects/grid-failure-information-app/src/app/shared/store/reducers/contacts/contacts-page.reducer.ts +++ /dev/null
@@ -1,71 +0,0 @@ - /******************************************************************************** - * Copyright (c) 2020 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 { PageModel } from '@shared/models/page/page.model'; -import * as contactsActions from '@shared/store/actions/contacts.action'; -import { Contact } from '@shared/models'; -import { Action, createReducer, on } from '@ngrx/store'; - -/* ref.: https://ngrx.io/guide/store/reducers */ - -export interface State { - loading: boolean; - loaded: boolean; - failed: boolean; - data: PageModel<Contact>; -} - -export const INITIAL_STATE: State = { - loading: false, - loaded: false, - failed: false, - data: null, -}; -export const contactsPageReducer = createReducer( - INITIAL_STATE, - on(contactsActions.loadContactsPage, (state: State | undefined, action: Action) => { - return { - ...state, - loading: true, - loaded: false, - failed: false, - data: null - }; - }), - on(contactsActions.loadContactsPageSuccess, (state: State | undefined, action: Action) => { - return { - ...state, - loading: false, - loaded: true, - failed: false, - data: action['payload'] - }; - }), - on(contactsActions.loadContactsPageFail, (state: State | undefined, action: Action) => { - return { - ...state, - loaded: false, - loading: false, - failed: true, - data: null - }; - }) -); -export function reducer(state = INITIAL_STATE, action: Action): State { - - return contactsPageReducer(state, action); -} - -export const getData = (state: State) => state.data; -export const getLoading = (state: State) => state.loading; -export const getLoaded = (state: State) => state.loaded; -export const getFailed = (state: State) => state.failed;
diff --git a/projects/grid-failure-information-app/src/app/shared/store/reducers/grid-failures/grid-failures.reducer.ts b/projects/grid-failure-information-app/src/app/shared/store/reducers/grid-failures/grid-failures.reducer.ts index d6d04ba..f5f4757 100644 --- a/projects/grid-failure-information-app/src/app/shared/store/reducers/grid-failures/grid-failures.reducer.ts +++ b/projects/grid-failure-information-app/src/app/shared/store/reducers/grid-failures/grid-failures.reducer.ts
@@ -10,7 +10,7 @@ * * SPDX-License-Identifier: EPL-2.0 ********************************************************************************/ -import * as gridFailureActions from '@app/shared/store/actions/grid-failures.action'; +import * as gridFailureActions from '@shared/store/actions/grid-failures.action'; import { GridFailure } from '@shared/models'; import { createReducer, on } from '@ngrx/store';
diff --git a/projects/grid-failure-information-app/src/app/shared/utility/utilityHelpers.spec.ts b/projects/grid-failure-information-app/src/app/shared/utility/utilityHelpers.spec.ts index 4f44799..4ce7b42 100644 --- a/projects/grid-failure-information-app/src/app/shared/utility/utilityHelpers.spec.ts +++ b/projects/grid-failure-information-app/src/app/shared/utility/utilityHelpers.spec.ts
@@ -13,10 +13,10 @@ import * as utilityHelpers from '@shared/utility/utilityHelpers'; describe('utilityHelpers', () => { - it('should navigate to overview after call navigateToOverview', () => { + it('should navigate to overview after call navigateHome', () => { const router = { navigateByUrl() {} } as any; const spy = spyOn(router, 'navigateByUrl'); - utilityHelpers.navigateToOverview(router); - expect(spy).toHaveBeenCalledWith('/overview'); + utilityHelpers.navigateHome(router); + expect(spy).toHaveBeenCalledWith('/grid-failures'); }); });
diff --git a/projects/grid-failure-information-app/src/app/shared/utility/utilityHelpers.ts b/projects/grid-failure-information-app/src/app/shared/utility/utilityHelpers.ts index 72a1697..33a8360 100644 --- a/projects/grid-failure-information-app/src/app/shared/utility/utilityHelpers.ts +++ b/projects/grid-failure-information-app/src/app/shared/utility/utilityHelpers.ts
@@ -47,6 +47,6 @@ }, }; -export function navigateToOverview(router: Router): void { - router.navigateByUrl(`/overview`); +export function navigateHome(router: Router): void { + router.navigateByUrl(`/grid-failures`); }
diff --git a/projects/openk/gird-failure-information-map/src/lib/gird-failure-information-map.component.ts b/projects/openk/gird-failure-information-map/src/lib/gird-failure-information-map.component.ts index b2427cd..972542d 100644 --- a/projects/openk/gird-failure-information-map/src/lib/gird-failure-information-map.component.ts +++ b/projects/openk/gird-failure-information-map/src/lib/gird-failure-information-map.component.ts
@@ -6,7 +6,7 @@ styleUrls: ['./grid-failure-information-map.component.scss'], }) export class GirdFailureInformationMapComponent implements AfterViewInit { - private _map; + private _map: any; constructor() {} ngAfterViewInit(): void {
diff --git a/proxy.conf-integration.json b/proxy.conf-integration.json index 1eb0248..a45f017 100644 --- a/proxy.conf-integration.json +++ b/proxy.conf-integration.json
@@ -1,6 +1,6 @@ { "/api": { - "target": "http://entdockergss:9155/", + "target": "http://entdockergss:9165/", "secure": false, "pathRewrite": { "^/api": ""