From b14ca1ecb6b13256918663ebd356938d80f74882 Mon Sep 17 00:00:00 2001 From: Diego Tinitana Date: Thu, 23 Apr 2020 11:17:56 -0500 Subject: [PATCH 1/2] fix: #147 Display correct username fix lints --- .../components/projects/components/services/project.service.ts | 2 +- .../customer-management/services/customer.service.spec.ts | 1 - .../modules/customer-management/services/customer.service.ts | 2 +- .../customer-management/store/customer-management.selectors.ts | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/app/modules/customer-management/components/projects/components/services/project.service.ts b/src/app/modules/customer-management/components/projects/components/services/project.service.ts index b3ac3df18..0ccae09f3 100644 --- a/src/app/modules/customer-management/components/projects/components/services/project.service.ts +++ b/src/app/modules/customer-management/components/projects/components/services/project.service.ts @@ -12,7 +12,7 @@ export class ProjectService { projects: Project[] = []; url = `${environment.timeTrackerApiUrl}/projects`; - constructor(private http: HttpClient, private azureAdB2CService: AzureAdB2CService) {} + constructor(private http: HttpClient) {} getProjects(): Observable { return this.http.get(this.url); diff --git a/src/app/modules/customer-management/services/customer.service.spec.ts b/src/app/modules/customer-management/services/customer.service.spec.ts index f05524edd..923477add 100644 --- a/src/app/modules/customer-management/services/customer.service.spec.ts +++ b/src/app/modules/customer-management/services/customer.service.spec.ts @@ -45,7 +45,6 @@ describe('CustomerService', () => { { name: 'aa', description: 'bb', tenant_id: 'cc', id: '1' }, { name: 'xx', description: 'yy', tenant_id: 'zz', id: '2' }, ]; - const key = 'id'; const url = `${service.baseUrl}/1`; service.deleteCustomer(customer[0].id).subscribe(); const getCustomerRequest = httpMock.expectOne(url); diff --git a/src/app/modules/customer-management/services/customer.service.ts b/src/app/modules/customer-management/services/customer.service.ts index 9423fa775..95a8e4f38 100644 --- a/src/app/modules/customer-management/services/customer.service.ts +++ b/src/app/modules/customer-management/services/customer.service.ts @@ -11,7 +11,7 @@ import { AzureAdB2CService } from 'src/app/modules/login/services/azure.ad.b2c.s export class CustomerService { baseUrl = `${environment.timeTrackerApiUrl}/customers`; - constructor(private http: HttpClient, private service: AzureAdB2CService) {} + constructor(private http: HttpClient) {} createCustomer(customerData): Observable { return this.http.post(this.baseUrl, customerData); diff --git a/src/app/modules/customer-management/store/customer-management.selectors.ts b/src/app/modules/customer-management/store/customer-management.selectors.ts index 40c3579cd..44608a7db 100644 --- a/src/app/modules/customer-management/store/customer-management.selectors.ts +++ b/src/app/modules/customer-management/store/customer-management.selectors.ts @@ -1,5 +1,5 @@ import { createFeatureSelector, createSelector } from '@ngrx/store'; -import { Customer } from 'src/app/modules/shared/models/customer.model'; + import { CustomerState } from './customer-management.reducers'; export const getCustomerState = createFeatureSelector('customers'); From 22e6a9915cae9a848e575a7043cef5d774236d98 Mon Sep 17 00:00:00 2001 From: Diego Tinitana Date: Thu, 23 Apr 2020 11:18:27 -0500 Subject: [PATCH 2/2] fix: #147 Display correct username fix lints --- .../components/projects/components/services/project.service.ts | 1 - src/app/modules/customer-management/services/customer.service.ts | 1 - 2 files changed, 2 deletions(-) diff --git a/src/app/modules/customer-management/components/projects/components/services/project.service.ts b/src/app/modules/customer-management/components/projects/components/services/project.service.ts index 0ccae09f3..a2d52a45d 100644 --- a/src/app/modules/customer-management/components/projects/components/services/project.service.ts +++ b/src/app/modules/customer-management/components/projects/components/services/project.service.ts @@ -3,7 +3,6 @@ import { HttpClient } from '@angular/common/http'; import { Observable } from 'rxjs'; import { environment } from '../../../../../../../environments/environment'; import { Project } from '../../../../../shared/models'; -import { AzureAdB2CService } from '../../../../../login/services/azure.ad.b2c.service'; @Injectable({ providedIn: 'root', diff --git a/src/app/modules/customer-management/services/customer.service.ts b/src/app/modules/customer-management/services/customer.service.ts index 95a8e4f38..cc930a54c 100644 --- a/src/app/modules/customer-management/services/customer.service.ts +++ b/src/app/modules/customer-management/services/customer.service.ts @@ -3,7 +3,6 @@ import { HttpClient } from '@angular/common/http'; import { Observable } from 'rxjs'; import { environment } from './../../../../environments/environment'; -import { AzureAdB2CService } from 'src/app/modules/login/services/azure.ad.b2c.service'; @Injectable({ providedIn: 'root',