- [KON-362]: Changes implemented by codereview
Signed-off-by: Dennis Schmitt <dennis.schmitt@pta.de>
diff --git a/package-lock.json b/package-lock.json
index c27e721..da730e9 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -9317,14 +9317,6 @@
"tslib": "^1.9.0"
}
},
- "ngx-toastr": {
- "version": "11.2.1",
- "resolved": "https://registry.npmjs.org/ngx-toastr/-/ngx-toastr-11.2.1.tgz",
- "integrity": "sha512-qLZA+h1lIGLQ1HAJpx5JJ8i87PAZPAN6MnexmrWipSONqrK4fRh+nUKIxqmcckIiD16dgu2O5SNloSJymTKUAw==",
- "requires": {
- "tslib": "^1.9.0"
- }
- },
"nice-try": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
diff --git a/src/app/pages/contacts/contacts-api-client.ts b/src/app/pages/contacts/contacts-api-client.ts
index ec25aad..d97399e 100644
--- a/src/app/pages/contacts/contacts-api-client.ts
+++ b/src/app/pages/contacts/contacts-api-client.ts
@@ -10,7 +10,7 @@
*
* SPDX-License-Identifier: EPL-2.0
********************************************************************************/
-import { ModifyContacts } from '../../shared/models/modifyContacts.model';
+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 '@shared/asyncServices/http';
@@ -27,8 +27,14 @@
})
export class ContactsApiClient extends HttpService {
public getContacts(request: PageRequestInterface = null): Observable<PageModel<Contact>> {
- const modifyContacts: ModifyContacts = request.queryParameter || {};
- return this._getContactsPage(modifyContacts.searchText, modifyContacts.contactTypeId, modifyContacts.sort, request.pageNumber ? (request.pageNumber - 1) : 0, request.pageSize);
+ let modifiedContacts: ModifiedContacts = null;
+ if(request != null){
+ modifiedContacts = request.queryParameter || {};
+ return this._getContactsPage(modifiedContacts.searchText, modifiedContacts.contactTypeId, modifiedContacts.sort, request.pageNumber ? (request.pageNumber - 1) : 0, request.pageSize);
+ } else {
+ return this._getContactsPage(modifiedContacts.searchText, modifiedContacts.contactTypeId, modifiedContacts.sort, 1, 3);
+ }
+
}
/**
@@ -41,7 +47,7 @@
}
/**
- * Retrieves product details by a given id
+ * Retrieves contacts details by a given id
*
* @param id
*/
diff --git a/src/app/pages/contacts/contacts-list/contacts-list.component.html b/src/app/pages/contacts/contacts-list/contacts-list.component.html
index 51d4855..02ddc40 100644
--- a/src/app/pages/contacts/contacts-list/contacts-list.component.html
+++ b/src/app/pages/contacts/contacts-list/contacts-list.component.html
@@ -18,17 +18,17 @@
<div class="diverse-options">
<div class="searching diverse-options-item">
<div class="search-options">
- <input type="text" class="item" id="searchText" placeholder="Suche" [(ngModel)]="contactsSandbox.modifyContacts.searchText" size="20">
+ <input type="text" class="item" id="searchText" placeholder="Suche" (change)="setModifiedContactsSearchText($event.target.value)">
- <select [required]="false" type="text" class="form-control item" [(ngModel)]="contactsSandbox.modifyContacts.contactTypeId">
- <option value="I_P">{{ 'Contacts.InternalContact' | translate }}</option>
- <option value="E_P">{{ 'Contacts.ExternalContact' | translate }}</option>
- <option value="COM">{{ 'Contacts.Company' | translate }}</option>
+ <select [required]="false" type="text" class="form-control item" (change)="setModifiedContactsContactTypeId($event.target.value)">
+ <option value="{{INTERNAL_PERSON}}">{{ 'Contacts.InternalContact' | translate }}</option>
+ <option value="{{EXTERNAL_PERSON}}">{{ 'Contacts.ExternalContact' | translate }}</option>
+ <option value="{{COMPANY}}">{{ 'Contacts.Company' | translate }}</option>
<option value="" selected>{{ 'Contacts.AllContactTypes' | translate }}</option>
</select>
- <div class="do-search">
- <button type="button" class="btn btn-default btn-sm" (click)="contactsSandbox.searchEvent()"
+ <div class="search-btn">
+ <button type="button" class="btn btn-default btn-sm" (click)="searchContacts()"
title="suchen">
<i class="fa fa-search fa-lg " aria-hidden="true "></i>
</button>
@@ -37,7 +37,7 @@
</div>
<div class="sorting-options diverse-options-item">
- <select [required]="false" type="text" class="form-control item" [(ngModel)]="contactsSandbox.sortContactProperty" (change)="contactsSandbox.sortEvent()">
+ <select [required]="false" type="text" class="form-control item" (change)="setSortingContactType($event.target.value); sortContacts()">
<option value="name">{{ 'Contacts.Name' | translate }}</option>
<option value="contactType">{{ 'Contacts.ContactType' | translate }}</option>
<option value="note">{{ 'Contacts.Note' | translate }}</option>
@@ -47,7 +47,7 @@
<option value="" selected>{{ 'NoSorting' | translate }}</option>
</select>
- <select [required]="false" type="text" class="form-control item" [(ngModel)]="contactsSandbox.sortingStatus" (change)="contactsSandbox.sortEvent()">
+ <select [required]="false" type="text" class="form-control item" (change)="setSortingOrder($event.target.value); sortContacts()">
<option value="asc" selected>{{ 'AscendingSorting' | translate }}</option>
<option value="desc">{{ 'DescendingSorting' | translate }}</option>
</select>
@@ -65,15 +65,13 @@
<ag-grid-angular
[serverside]="contactsSandbox.serversideModel"
- [queryParameter]="contactsSandbox.modifyContacts"
+ [queryParameter]="_modifiedContacts"
autoresizecolumns
class="ag-theme-balham ag-grid-height"
[gridOptions]="gridOptions"
[columnDefs]="columnDefinition"
[rowSelection]="'single'"
- [floatingFilter]="true"
[frameworkComponents]="frameworkComponents"
- (gridReady)="onGridReady($event)"
>
</ag-grid-angular>
<app-spinner [isRunning]="contactsSandbox.contactsLoading$ | async"></app-spinner>
diff --git a/src/app/pages/contacts/contacts-list/contacts-list.component.scss b/src/app/pages/contacts/contacts-list/contacts-list.component.scss
index 43d4e47..21933ee 100644
--- a/src/app/pages/contacts/contacts-list/contacts-list.component.scss
+++ b/src/app/pages/contacts/contacts-list/contacts-list.component.scss
@@ -1,4 +1,4 @@
- /********************************************************************************
+/********************************************************************************
* Copyright (c) 2020 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
@@ -10,7 +10,7 @@
*
* SPDX-License-Identifier: EPL-2.0
********************************************************************************/
- .contacts-grid-wrapper {
+.contacts-grid-wrapper {
position: relative;
}
@@ -20,17 +20,18 @@
.diverse-options {
display: flex;
- justify-content: space-between;
- align-content: center;
+ justify-content: space-between;
+ align-content: center;
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;
+.diverse-options-item {
+ width: 400px;
+ padding-right: 7px;
+ border-right: solid 1px #ddd;
}
ag-grid-angular {
@@ -45,74 +46,70 @@
}
.select-type-of-new-contact {
- align-self: center;
+ align-self: center;
margin-right: 2px;
}
-.searching{
- display: flex;
- flex-wrap: nowrap;
- justify-content: flex-start;
-
-
+.searching {
+ display: flex;
+ flex-wrap: nowrap;
+ justify-content: flex-start;
}
-.search-options{
- display: flex;
- flex-wrap: nowrap;
- justify-content: flex-start;
- align-items: center;
+.search-options {
+ display: flex;
+ flex-wrap: nowrap;
+ justify-content: flex-start;
+ align-items: center;
}
.item {
- margin: 5px;
+ margin: 5px;
}
-.do-search {
- display: flex;
- align-items: center;
+.search-btn {
+ display: flex;
+ align-items: center;
}
-.do-search button {
- margin: 0 5px;
- background-color: #fff;
- border: 1px solid #ccc;
-
+.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;
+.sorting-options {
+ display: flex;
+ flex-wrap: nowrap;
+ justify-content: flex-start;
+ align-items: center;
}
.dropdown-open:hover {
- background-color: transparent;
+ background-color: transparent;
}
-.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;
+.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;
}
-
-ag-grid-angular{
- height: calc(100vh - 275px);
+ag-grid-angular {
+ height: calc(100vh - 275px);
}
.form-field-label {
- width: 100%;
- font-size: 14px;
- font-weight: bold;
- margin-bottom: 5px;
+ width: 100%;
+ font-size: 14px;
+ font-weight: bold;
+ margin-bottom: 5px;
}
-.selectTypeOfNewContact{
- margin-right: 2px;
- margin-bottom: 2px;
-}
\ No newline at end of file
+.selectTypeOfNewContact {
+ margin-right: 2px;
+ margin-bottom: 2px;
+}
diff --git a/src/app/pages/contacts/contacts-list/contacts-list.component.spec.ts b/src/app/pages/contacts/contacts-list/contacts-list.component.spec.ts
index ce7128f..e5951e0 100644
--- a/src/app/pages/contacts/contacts-list/contacts-list.component.spec.ts
+++ b/src/app/pages/contacts/contacts-list/contacts-list.component.spec.ts
@@ -1,3 +1,4 @@
+import { ModifiedContacts } from './../../../shared/models/modifiedContacts.model';
/********************************************************************************
* Copyright (c) 2020 Contributors to the Eclipse Foundation
*
@@ -13,16 +14,13 @@
import { ContactsListComponent } from '@pages/contacts/contacts-list/contacts-list.component';
import { Globals } from '@app/shared/constants/globals';
-describe('ContactsListComponent', () => {
+fdescribe('ContactsListComponent', () => {
let component: ContactsListComponent;
-
let contactsSandbox: any = {};
-
let router: any = {};
beforeEach(() => {
router = { navigateByUrl() {}, navigate() {} } as any;
-
component = new ContactsListComponent(contactsSandbox, router);
});
@@ -33,7 +31,7 @@
it('should create', () => {
component.ngOnInit();
- expect(component.gridOptions).toBeDefined();
+ expect(component.gridOptions).toBeDefined();
expect(component.gridOptions.context).toBeDefined();
});
@@ -127,6 +125,53 @@
expect(spy).toHaveBeenCalledWith([url]);
});
+ it('checks if function searchContacts() would be called and works', () => {
+ const modificationContacts = new ModifiedContacts();
+ (component as any)._modifiedContacts = modificationContacts;
+ component.searchContacts();
+ expect((component as any)._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 as any)._modifiedContacts.searchText).toBe('big');
+ });
+
+ it('checks if function setModifiedContactsContactTypeId() works', () => {
+ component.setModifiedContactsContactTypeId('I_P');
+ expect((component as any)._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 _setModifiedContactsSortProperty() works', () => {
+ component.setSortingContactType('name');
+ (component as any)._setModifiedContactsSort();
+ expect((component as any)._modifiedContacts.sort).toBe('name,asc');
+
+ (component as any)._sortingOrder = null;
+ (component as any)._setModifiedContactsSort();
+ expect((component as any)._modifiedContacts.sort).toBe(null);
+
+ (component as any)._sortingContactType = null;
+ (component as any)._setModifiedContactsSort();
+ expect((component as any)._modifiedContacts.sort).toBe(null);
+ });
+
// it('checks if function onGridReady works', () => {
// const onGridReadySpy = spyOn(component, 'onGridReady');
// const params = fixture.debugElement.query(By.css('ag-grid-angular')).nativeElement;
diff --git a/src/app/pages/contacts/contacts-list/contacts-list.component.ts b/src/app/pages/contacts/contacts-list/contacts-list.component.ts
index b4c0b24..3b3ced8 100644
--- a/src/app/pages/contacts/contacts-list/contacts-list.component.ts
+++ b/src/app/pages/contacts/contacts-list/contacts-list.component.ts
@@ -17,6 +17,7 @@
import { SetFilterComponent } from '@app/shared/filters/ag-grid/set-filter/set-filter.component';
import { Router } from '@angular/router';
import { Globals } from '@app/shared/constants/globals';
+import { ModifiedContacts } from '@app/shared/models/modifiedContacts.model';
@Component({
selector: 'app-contacts-list',
@@ -28,10 +29,16 @@
public NEW_INTERNAL_PERSON_PATH = `/${Globals.PATH.PERSONS}/${Globals.PATH.INTERNAL}/${Globals.PATH.NEW}`;
public NEW_COMPANY_PATH = `/${Globals.PATH.COMPANY}/${Globals.PATH.NEW}`;
+ public INTERNAL_PERSON = Globals.CONTACT_TYPE_ID.INTERNAL_PERSON;
+ public EXTERNAL_PERSON = Globals.CONTACT_TYPE_ID.EXTERNAL_PERSON;
+ public COMPANY = Globals.CONTACT_TYPE_ID.COMPANY;
+
public columnDefinition: any = CONTACTS_COLDEF;
public frameworkComponents: { setFilterComponent: any };
- public gridApi;
- public gridColumnApi;
+
+ private _sortingOrder: string = 'asc';
+ private _sortingContactType: string = '';
+ private _modifiedContacts: ModifiedContacts = new ModifiedContacts();
constructor(
public contactsSandbox: ContactsSandbox,
@@ -62,13 +69,6 @@
this.gridOptions.context.eventSubject.subscribe(this._handleBusEvents.bind(this));
}
- onGridReady(params) {
- this.gridApi = params.api;
- this.gridColumnApi = params.columnApi;
-
- this.gridApi.sizeColumnsToFit();
- }
-
private _handleBusEvents(event: any): any {
switch (event.type) {
case 'edit':
@@ -108,4 +108,39 @@
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 setSortingContactType(sortingContactType: string){
+ this._sortingContactType = sortingContactType;
+ }
+
+ public setSortingOrder(sortingOrder: string){
+ this._sortingOrder = sortingOrder;
+ }
+
+ public searchContacts() {
+ this._modifiedContacts = { ...this._modifiedContacts };
+ }
+
+ 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/src/app/pages/contacts/contacts-routing.module.ts b/src/app/pages/contacts/contacts-routing.module.ts
index 5669417..f738158 100644
--- a/src/app/pages/contacts/contacts-routing.module.ts
+++ b/src/app/pages/contacts/contacts-routing.module.ts
@@ -13,25 +13,12 @@
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { ContactsListComponent } from '@pages/contacts/contacts-list/contacts-list.component';
-import { ExternalPersonComponent } from '../persons/external-person/external-person.component';
const contactsRoutes: Routes = [
{
path: 'overview',
component: ContactsListComponent
- },
- // {
- // path: 'new_intern_contact',
- // component: ContactsListComponent
- // },
- // {
- // path: 'new_extern_contact',
- // component: ContactsListComponent
- // },
- // {
- // path: 'new_company',
- // component: ContactsListComponent
- // },
+ }
];
@NgModule({
diff --git a/src/app/pages/contacts/contacts.sandbox.spec.ts b/src/app/pages/contacts/contacts.sandbox.spec.ts
index d96a12b..0151399 100644
--- a/src/app/pages/contacts/contacts.sandbox.spec.ts
+++ b/src/app/pages/contacts/contacts.sandbox.spec.ts
@@ -20,16 +20,11 @@
describe('ContactsSandbox', () => {
let service: ContactsSandbox = {} as any;
let appState: Store<State>;
- let actionSubject: ActionsSubject;
- let utilService: UtilService;
- let router: Router;
beforeEach(() => {
appState = { dispatch:()=> {}, pipe: () => of(true), select:()=> of(true) } as any;
- actionSubject = {} as any;
- router = { navigateByUrl() {} } as any;
- service = new ContactsSandbox(appState, actionSubject, router, utilService);
+ service = new ContactsSandbox(appState);
});
it('should create ContactsSandbox service', () => {
@@ -37,30 +32,4 @@
expect(service).toBeDefined();
});
- it('checks if function searchEvent() would be called and works', () => {
- const searchEventSpy = spyOn(service, 'searchEvent');
- service.searchEvent();
- expect(searchEventSpy).toHaveBeenCalledTimes(1);
- });
-
- it('checks if function sortEvent() works', () => {
- const setModifyContactsSortPropertySpy = spyOn((service as any), '_setModifyContactsSortProperty');
- service.sortEvent();
- expect(setModifyContactsSortPropertySpy).toHaveBeenCalledTimes(1);
- });
-
- it('checks if function _setModifyContactsSortProperty() works', () => {
- service.sortContactProperty = 'name';
- (service as any)._setModifyContactsSortProperty();
- expect(service.modifyContacts.sort).toBe('name,asc');
-
- service.sortingStatus = null;
- (service as any)._setModifyContactsSortProperty();
- expect(service.modifyContacts.sort).toBe(null);
-
- service.sortingStatus = null;
- (service as any)._setModifyContactsSortProperty();
- expect(service.modifyContacts.sort).toBe(null);
-
- });
});
diff --git a/src/app/pages/contacts/contacts.sandbox.ts b/src/app/pages/contacts/contacts.sandbox.ts
index 962d252..7a30b79 100644
--- a/src/app/pages/contacts/contacts.sandbox.ts
+++ b/src/app/pages/contacts/contacts.sandbox.ts
@@ -1,19 +1,18 @@
- /********************************************************************************
- * 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 { ModifyContacts } from '../../shared/models/modifyContacts.model';
+/********************************************************************************
+* 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 { UtilService } from '@shared/utility/utility.service';
-import { Injectable, OnInit } from '@angular/core';
+import { Injectable } from '@angular/core';
import { Store, ActionsSubject } from '@ngrx/store';
import * as store from '@shared/store';
import * as contactsActions from '@shared/store/actions/contacts.action';
@@ -23,11 +22,6 @@
@Injectable()
export class ContactsSandbox extends BaseListSandbox {
- public sortingStatus: string = 'asc';
- public sortContactProperty: string = '';
-
- public modifyContacts = new ModifyContacts();
-
public serversideModel: ServerSideModel;
/**
@@ -40,9 +34,8 @@
* @param {UtilService} utilService
* @memberof ContactsSandbox
*/
- constructor(protected appState$: Store<store.State>, protected actionsSubject: ActionsSubject, protected router: Router, protected utilService: UtilService) {
+ constructor(protected appState$: Store<store.State>) {
super(appState$);
- // this.registerEvents();
this.serversideModel = {
loadAction: contactsActions.loadContactsPage,
successAction: contactsActions.loadContactsPageSuccess,
@@ -50,28 +43,4 @@
};
}
- // public callSearchContacts(searchQueries: string[]){
- // console.log(searchQueries);
- // }
-
-
- public searchEvent() {
- this.modifyContacts = { ...this.modifyContacts };
- }
-
- public sortEvent() {
- this._setModifyContactsSortProperty();
- this.modifyContacts = { ...this.modifyContacts };
- }
-
-
- private _setModifyContactsSortProperty() {
- if (this.sortingStatus && this.sortContactProperty) {
- const sort = this.sortContactProperty + ',' + this.sortingStatus;
- this.modifyContacts.sort = sort;
- }
- else {
- this.modifyContacts.sort = null;
- }
- }
}
diff --git a/src/app/shared/containers/card-layout/card-layout.component.scss b/src/app/shared/containers/card-layout/card-layout.component.scss
index 55d92fa..2bebdd9 100644
--- a/src/app/shared/containers/card-layout/card-layout.component.scss
+++ b/src/app/shared/containers/card-layout/card-layout.component.scss
@@ -11,7 +11,7 @@
* SPDX-License-Identifier: EPL-2.0
********************************************************************************/
.card {
- height: calc(100vh - 145px);
+ height: calc(100vh - 144px);
overflow: auto;
border: none;
}
diff --git a/src/app/shared/directives/agGrid/server-side.directive.ts b/src/app/shared/directives/agGrid/server-side.directive.ts
index 01c8335..0457e53 100644
--- a/src/app/shared/directives/agGrid/server-side.directive.ts
+++ b/src/app/shared/directives/agGrid/server-side.directive.ts
@@ -44,17 +44,17 @@
public serverside: ServerSideModel;
@Input()
- public set queryParameter(v: any) {
- if (!!v) {
+ public set queryParameter(query: any) {
+ if (!!query) {
this.appState$.dispatch(
this.serverside.loadAction({
payload: {
- queryParameter: v,
+ queryParameter: query,
pageSize: this.serverside.pageSize,
} as PageRequestInterface,
}));
}
- this._queryParameter = v;
+ this._queryParameter = query;
}
diff --git a/src/app/shared/models/modifyContacts.model.ts b/src/app/shared/models/modifiedContacts.model.ts
similarity index 91%
rename from src/app/shared/models/modifyContacts.model.ts
rename to src/app/shared/models/modifiedContacts.model.ts
index 8410c20..886e071 100644
--- a/src/app/shared/models/modifyContacts.model.ts
+++ b/src/app/shared/models/modifiedContacts.model.ts
@@ -1,6 +1,6 @@
import { Contact } from '@shared/models';
-export class ModifyContacts {
+export class ModifiedContacts {
public searchText: string = null;
public contactTypeId: string = '';
diff --git a/src/app/shared/models/server-side.model.ts b/src/app/shared/models/server-side.model.ts
index 8031fad..4085140 100644
--- a/src/app/shared/models/server-side.model.ts
+++ b/src/app/shared/models/server-side.model.ts
@@ -17,8 +17,6 @@
successAction?: any;
pageSize?: number;
filter?:any;
- /**
- *
- */
+
constructor() {}
}
diff --git a/src/app/shared/store/effects/contacts.effects.spec.ts b/src/app/shared/store/effects/contacts.effects.spec.ts
index bd7156f..96cfb4a 100644
--- a/src/app/shared/store/effects/contacts.effects.spec.ts
+++ b/src/app/shared/store/effects/contacts.effects.spec.ts
@@ -43,26 +43,6 @@
expect(effects).toBeTruthy();
});
- it('should equal loadContactsSuccess after getContacts', (done) => {
- spyOn(apiClient, 'getContacts').and.returnValue(of(apiResponse));
- effects.getContacts$.pipe(take(1)).subscribe(result => {
- expect(result).toEqual(contactsActions.loadContactsSuccess({payload: apiResponse.content}));
- });
- done();
- actions$.next(contactsActions.loadContacts());
- });
-
- it('should equal loadContactsFail after getContacts Error', (done) => {
- spyOn(apiClient, 'getContacts').and.returnValue(throwError('x'));
-
- effects.getContacts$.pipe(take(1)).subscribe(result => {
- expect(result).toEqual(contactsActions.loadContactsFail({payload: 'x'}));
- });
- done();
-
- actions$.next(contactsActions.loadContacts());
- });
-
it('should equal loadContactsPageSuccess after getContactsPage', (done) => {
let request = {payload: {
pageNumber: 1,
diff --git a/src/styles.scss b/src/styles.scss
index 7f3261b..d830f19 100644
--- a/src/styles.scss
+++ b/src/styles.scss
@@ -1401,7 +1401,7 @@
opacity: 1;
}
select.form-control:not([size]):not([multiple]) {
- height: calc(2.25rem + -4px);
+ height: calc(2.25rem - 4px);
}
select.form-control:focus::-ms-value {
color: #495057;