Skip to content

Commit 586535f

Browse files
committed
#78 improve typo and remove duplicated components
1 parent c41a001 commit 586535f

File tree

46 files changed

+119
-673
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+119
-673
lines changed

src/app/app-routing.module.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { AzureGuardService } from './guards/azure-guard.service';
55
import { ReportsComponent } from './modules/reports/pages/reports.component';
66
import { TimeClockComponent } from './modules/time-clock/pages/time-clock.component';
77
import { TimeEntriesComponent } from './modules/time-entries/pages/time-entries.component';
8-
import { ProjectManagementComponent } from './modules/project-management/pages/project-management.component';
98
import { ActivitiesManagementComponent } from './modules/activities-management/pages/activities-management.component';
109
import { HomeComponent } from './modules/home/home.component';
1110
import { LoginComponent } from './modules/login/login.component';
@@ -20,9 +19,8 @@ const routes: Routes = [
2019
{ path: 'reports', component: ReportsComponent },
2120
{ path: 'time-clock', component: TimeClockComponent },
2221
{ path: 'time-entries', component: TimeEntriesComponent },
23-
{ path: 'project-management', component: ProjectManagementComponent },
2422
{ path: 'activities-management', component: ActivitiesManagementComponent },
25-
{ path: 'customer', component: CustomerComponent },
23+
{ path: 'customer-managment', component: CustomerComponent },
2624
{ path: '', pathMatch: 'full', redirectTo: 'time-clock' },
2725
],
2826
},

src/app/app.module.ts

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@ import { UserComponent } from './modules/shared/components/user/user.component';
1616
import { SidebarComponent } from './modules/shared/components/sidebar/sidebar.component';
1717
import { ClockComponent } from './modules/shared/components/clock/clock.component';
1818
import { TimeClockComponent } from './modules/time-clock/pages/time-clock.component';
19-
import { ProjectManagementComponent } from './modules/project-management/pages/project-management.component';
2019
import { TimeEntriesComponent } from './modules/time-entries/pages/time-entries.component';
21-
import { ProjectListComponent } from './modules/project-management/components/project-list/project-list.component';
22-
import { CreateProjectComponent } from './modules/project-management/components/create-project/create-project.component';
2320
import { DetailsFieldsComponent } from './modules/shared/components/details-fields/details-fields.component';
2421
import { ProjectListHoverComponent } from './modules/time-clock/components/project-list-hover/project-list-hover.component';
2522
import { ModalComponent } from './modules/shared/components/modal/modal.component';
@@ -42,11 +39,11 @@ import { CustomerComponent } from './modules/customer-managment/pages/customer.c
4239
import { CustomerListComponent } from './modules/customer-managment/components/customer-info/components/customer-list/customer-list.component';
4340
import { SearchComponent } from './modules/customer-managment/components/search/search.component';
4441
// tslint:disable-next-line: max-line-length
45-
import { ManagmentCustomerProjectsComponent } from './modules/customer-managment/components/managment-customer-projects/managment-customer-projects.component';
42+
import { ManagementCustomerProjectsComponent } from './modules/customer-managment/components/management-customer-projects/management-customer-projects.component';
4643
import { CreateCustomerComponent } from './modules/customer-managment/components/customer-info/components/create-customer/create-customer';
4744
// tslint:disable-next-line: max-line-length
48-
import { CreateeProjectComponent } from './modules/customer-managment/components/projects/components/create-project/createe-project.component';
49-
import { ProjectLiistComponent } from './modules/customer-managment/components/projects/components/project-liist/project-liist.component';
45+
import { CreateProjectComponent } from './modules/customer-managment/components/projects/components/create-project/create-project.component';
46+
import { ProjectListComponent } from './modules/customer-managment/components/projects/components/project-list/project-list.component';
5047
// tslint:disable-next-line: max-line-length
5148
import { ProjectTypeListComponent } from './modules/customer-managment/components/projects-type/components/project-type-list/project-type-list.component';
5249
// tslint:disable-next-line: max-line-length
@@ -60,8 +57,6 @@ import { CreateProjectTypeComponent } from './modules/customer-managment/compone
6057
SidebarComponent,
6158
ClockComponent,
6259
TimeClockComponent,
63-
ProjectManagementComponent,
64-
ProjectListComponent,
6560
CreateProjectComponent,
6661
TimeClockComponent,
6762
DetailsFieldsComponent,
@@ -81,10 +76,10 @@ import { CreateProjectTypeComponent } from './modules/customer-managment/compone
8176
CustomerComponent,
8277
CustomerListComponent,
8378
SearchComponent,
84-
ManagmentCustomerProjectsComponent,
79+
ManagementCustomerProjectsComponent,
8580
CreateCustomerComponent,
86-
CreateeProjectComponent,
87-
ProjectLiistComponent,
81+
CreateProjectComponent,
82+
ProjectListComponent,
8883
ProjectTypeListComponent,
8984
CreateProjectTypeComponent,
9085
],

src/app/modules/customer-managment/components/customer-info/components/create-customer/create-customer.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ describe('InputCustomerComponent', () => {
1818
fixture.detectChanges();
1919
});
2020

21-
it('should create', () => {
21+
it('component should create', () => {
2222
expect(component).toBeTruthy();
2323
});
2424
});
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
import { Component, OnInit } from '@angular/core';
1+
import { Component } from '@angular/core';
22

33
@Component({
44
selector: 'app-create-customer',
55
templateUrl: './create-customer.html',
66
styleUrls: ['./create-customer.scss'],
77
})
8-
export class CreateCustomerComponent implements OnInit {
8+
export class CreateCustomerComponent {
99
constructor() {}
10-
11-
ngOnInit(): void {}
1210
}

src/app/modules/customer-managment/components/customer-info/components/customer-list/customer-list.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<tbody>
99
<tr
1010
class="d-flex"
11-
*ngFor="let customer of customers | paginate: { itemsPerPage: 5, currentPage: initPage1, id: 'first' }"
11+
*ngFor="let customer of customers | paginate: { itemsPerPage: itemsPerPage, currentPage: initPage1, id: 'first' }"
1212
>
1313
<td class="col-sm-9">{{ customer.name }}</td>
1414
<td class="col-sm-3 text-center">

src/app/modules/customer-managment/components/customer-info/components/customer-list/customer-list.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ describe('CustomerTableListComponent', () => {
2020
fixture.detectChanges();
2121
});
2222

23-
it('should create', () => {
23+
it('component should create', () => {
2424
expect(component).toBeTruthy();
2525
});
2626

src/app/modules/customer-managment/components/customer-info/components/customer-list/customer-list.component.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
1+
import { Component, Input, Output, EventEmitter } from '@angular/core';
2+
import { ITEMS_PER_PAGE } from 'src/environments/environment';
23

34
@Component({
45
selector: 'app-customer-list',
56
templateUrl: './customer-list.component.html',
67
styleUrls: ['./customer-list.component.scss'],
78
})
8-
export class CustomerListComponent implements OnInit {
9+
export class CustomerListComponent {
910
initPage1 = 1;
11+
itemsPerPage = ITEMS_PER_PAGE;
1012

1113
customers = [
1214
{
@@ -32,8 +34,6 @@ export class CustomerListComponent implements OnInit {
3234

3335
constructor() {}
3436

35-
ngOnInit(): void {}
36-
3737
activateCustomerForm() {
3838
this.showCustomerForm = true;
3939
this.changeShowCustomerForm.emit(this.showCustomerForm);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
<app-create-customer></app-create-customer>
4545
</div>
4646
<div class="tab-pane fade mt-3" id="projects" role="tabpanel" aria-labelledby="projects-tab">
47-
<app-createe-project></app-createe-project>
47+
<app-create-project></app-create-project>
4848
</div>
4949
<div class="tab-pane fade mt-3" id="projectsType" role="tabpanel" aria-labelledby="projects-type-tab">
5050
<app-create-project-type></app-create-project-type>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2+
3+
import { ManagementCustomerProjectsComponent } from './management-customer-projects.component';
4+
5+
describe('ManagmentCustomerProjectsComponent', () => {
6+
let component: ManagementCustomerProjectsComponent;
7+
let fixture: ComponentFixture<ManagementCustomerProjectsComponent>;
8+
9+
beforeEach(async(() => {
10+
TestBed.configureTestingModule({
11+
declarations: [ManagementCustomerProjectsComponent],
12+
}).compileComponents();
13+
}));
14+
15+
beforeEach(() => {
16+
fixture = TestBed.createComponent(ManagementCustomerProjectsComponent);
17+
component = fixture.componentInstance;
18+
fixture.detectChanges();
19+
});
20+
21+
it('component should create', () => {
22+
expect(component).toBeTruthy();
23+
});
24+
});

0 commit comments

Comments
 (0)