Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
#78 improve structure
  • Loading branch information
daros10 committed Apr 13, 2020
commit c41a001f0c412f1f2bb9518f7869da4088328f3b
2 changes: 1 addition & 1 deletion src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { ProjectManagementComponent } from './modules/project-management/pages/p
import { ActivitiesManagementComponent } from './modules/activities-management/pages/activities-management.component';
import { HomeComponent } from './modules/home/home.component';
import { LoginComponent } from './modules/login/login.component';
import { CustomerComponent } from './modules/customer/pages/customer.component';
import { CustomerComponent } from './modules/customer-managment/pages/customer.component';

const routes: Routes = [
{
Expand Down
37 changes: 20 additions & 17 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,20 @@ import { ActivityEffects } from './modules/activities-management/store/activity-
import { ProjectEffects } from './modules/project-management/store/project.effects';
import { reducers, metaReducers } from './reducers';
import { environment } from '../environments/environment';
import { CustomerComponent } from './modules/customer/pages/customer.component';
import { CustomerTableListComponent } from './modules/customer/components/customer-table-list/customer-table-list.component';
import { SearchComponent } from './modules/customer/components/search/search.component';
// tslint:disable-next-line:import-spacing
import { ManagmentCustomerProjectsComponent }
from './modules/customer/components/managment-customer-projects/managment-customer-projects.component';
import { InputCustomerComponent } from './modules/customer/components/input-customer/input-customer';
import { InputProjectComponent } from './modules/customer/components/input-project/input-project.component';
import { ProjectTableListComponent } from './modules/customer/components/project-table-list/project-table-list.component';
import { ProjectTypeTableListComponent } from './modules/customer/components/project-type-table-list/project-type-table-list.component';
import { InputProjectTypeComponent } from './modules/customer/components/input-project-type/input-project-type.component';
import { CustomerComponent } from './modules/customer-managment/pages/customer.component';
// tslint:disable-next-line: max-line-length
import { CustomerListComponent } from './modules/customer-managment/components/customer-info/components/customer-list/customer-list.component';
import { SearchComponent } from './modules/customer-managment/components/search/search.component';
// tslint:disable-next-line: max-line-length
import { ManagmentCustomerProjectsComponent } from './modules/customer-managment/components/managment-customer-projects/managment-customer-projects.component';
import { CreateCustomerComponent } from './modules/customer-managment/components/customer-info/components/create-customer/create-customer';
// tslint:disable-next-line: max-line-length
import { CreateeProjectComponent } from './modules/customer-managment/components/projects/components/create-project/createe-project.component';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo Createe

import { ProjectLiistComponent } from './modules/customer-managment/components/projects/components/project-liist/project-liist.component';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: Liist

// tslint:disable-next-line: max-line-length
import { ProjectTypeListComponent } from './modules/customer-managment/components/projects-type/components/project-type-list/project-type-list.component';
// tslint:disable-next-line: max-line-length
import { CreateProjectTypeComponent } from './modules/customer-managment/components/projects-type/components/create-project-type/create-project-type.component';

@NgModule({
declarations: [
Expand Down Expand Up @@ -76,14 +79,14 @@ import { InputProjectTypeComponent } from './modules/customer/components/input-p
FilterProjectPipe,
SearchProjectComponent,
CustomerComponent,
CustomerTableListComponent,
CustomerListComponent,
SearchComponent,
ManagmentCustomerProjectsComponent,
InputCustomerComponent,
InputProjectComponent,
ProjectTableListComponent,
ProjectTypeTableListComponent,
InputProjectTypeComponent,
CreateCustomerComponent,
CreateeProjectComponent,
ProjectLiistComponent,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typos

ProjectTypeListComponent,
CreateProjectTypeComponent,
],
imports: [
CommonModule,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { InputCustomerComponent } from './input-customer';
import { CreateCustomerComponent } from './create-customer';

describe('InputCustomerComponent', () => {
let component: InputCustomerComponent;
let fixture: ComponentFixture<InputCustomerComponent>;
let component: CreateCustomerComponent;
let fixture: ComponentFixture<CreateCustomerComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [InputCustomerComponent],
declarations: [CreateCustomerComponent],
}).compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(InputCustomerComponent);
fixture = TestBed.createComponent(CreateCustomerComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { Component, OnInit } from '@angular/core';

@Component({
selector: 'app-create-customer',
templateUrl: './create-customer.html',
styleUrls: ['./create-customer.scss'],
})
export class CreateCustomerComponent implements OnInit {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not need to implement OnInit

constructor() {}

ngOnInit(): void {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the implements and ngOnInit can be removed from here.

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<table class="table table-sm table-bordered table-striped mb-0">
<thead class="bg-header">
<thead class="thead-orange">
<tr class="d-flex">
<th class="col-9">Name</th>
<th class="col-3 text-center"></th>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import '../../../../../../../styles/themes/orange-theme';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is not needed, remove it.

Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { CustomerTableListComponent } from './customer-table-list.component';
import { CustomerListComponent } from './customer-list.component';
import { NgxPaginationModule } from 'ngx-pagination';

describe('CustomerTableListComponent', () => {
let component: CustomerTableListComponent;
let fixture: ComponentFixture<CustomerTableListComponent>;
let component: CustomerListComponent;
let fixture: ComponentFixture<CustomerListComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [NgxPaginationModule],
declarations: [CustomerTableListComponent],
declarations: [CustomerListComponent],
}).compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(CustomerTableListComponent);
fixture = TestBed.createComponent(CustomerListComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';

@Component({
selector: 'app-customer-table-list',
templateUrl: './customer-table-list.component.html',
styleUrls: ['./customer-table-list.component.scss'],
selector: 'app-customer-list',
templateUrl: './customer-list.component.html',
styleUrls: ['./customer-list.component.scss'],
})
export class CustomerTableListComponent implements OnInit {
export class CustomerListComponent implements OnInit {
initPage1 = 1;

customers = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@
role="tabpanel"
aria-labelledby="customer-information-tab"
>
<app-input-customer></app-input-customer>
<app-create-customer></app-create-customer>
</div>
<div class="tab-pane fade mt-3" id="projects" role="tabpanel" aria-labelledby="projects-tab">
<app-input-project></app-input-project>
<app-createe-project></app-createe-project>
</div>
<div class="tab-pane fade mt-3" id="projectsType" role="tabpanel" aria-labelledby="projects-type-tab">
<app-input-project-type></app-input-project-type>
<app-create-project-type></app-create-project-type>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
</div>
</form>
<hr />
<app-project-type-table-list></app-project-type-table-list>
<app-project-type-list></app-project-type-list>
</div>
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { InputProjectTypeComponent } from './input-project-type.component';
import { CreateProjectTypeComponent } from './create-project-type.component';

describe('InputProjectTypeComponent', () => {
let component: InputProjectTypeComponent;
let fixture: ComponentFixture<InputProjectTypeComponent>;
let component: CreateProjectTypeComponent;
let fixture: ComponentFixture<CreateProjectTypeComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ InputProjectTypeComponent ]
})
.compileComponents();
declarations: [CreateProjectTypeComponent],
}).compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(InputProjectTypeComponent);
fixture = TestBed.createComponent(CreateProjectTypeComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { Component, OnInit } from '@angular/core';

@Component({
selector: 'app-create-project-type',
templateUrl: './create-project-type.component.html',
styleUrls: ['./create-project-type.component.scss'],
})
export class CreateProjectTypeComponent implements OnInit {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this implements OnInit

constructor() {}

ngOnInit(): void {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and then, remove this empty method declaration

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<table class="table table-sm table-bordered table-striped">
<thead class="bg-header">
<thead class="thead-orange">
<tr class="d-flex">
<th class="col-9">Project type</th>
<th class="col-3 text-center"></th>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import '../../../../../../../styles/themes/orange-theme';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you don't need to import anything here

Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { ProjectTypeTableListComponent } from './project-type-table-list.component';
import { ProjectTypeListComponent } from './project-type-list.component';
import { NgxPaginationModule } from 'ngx-pagination';

describe('ProjectTypeTableListComponent', () => {
let component: ProjectTypeTableListComponent;
let fixture: ComponentFixture<ProjectTypeTableListComponent>;
let component: ProjectTypeListComponent;
let fixture: ComponentFixture<ProjectTypeListComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [NgxPaginationModule],
declarations: [ProjectTypeTableListComponent],
declarations: [ProjectTypeListComponent],
}).compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(ProjectTypeTableListComponent);
fixture = TestBed.createComponent(ProjectTypeListComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Component, OnInit } from '@angular/core';

@Component({
selector: 'app-project-type-table-list',
templateUrl: './project-type-table-list.component.html',
styleUrls: ['./project-type-table-list.component.scss'],
selector: 'app-project-type-list',
templateUrl: './project-type-list.component.html',
styleUrls: ['./project-type-list.component.scss'],
})
export class ProjectTypeTableListComponent implements OnInit {
export class ProjectTypeListComponent implements OnInit {
initPage2 = 1;
projectsType = [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@
<hr />
<app-search></app-search>
</div>
<app-project-table-list></app-project-table-list>
<app-project-liist></app-project-liist>
</div>
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { InputProjectComponent } from './input-project.component';
import { CreateeProjectComponent } from './createe-project.component';

describe('InputProjectComponent', () => {
let component: InputProjectComponent;
let fixture: ComponentFixture<InputProjectComponent>;
let component: CreateeProjectComponent;
let fixture: ComponentFixture<CreateeProjectComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ InputProjectComponent ]
})
.compileComponents();
declarations: [CreateeProjectComponent],
}).compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(InputProjectComponent);
fixture = TestBed.createComponent(CreateeProjectComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { Component, OnInit } from '@angular/core';

@Component({
selector: 'app-createe-project',
templateUrl: './createe-project.component.html',
styleUrls: ['./createe-project.component.scss'],
})
export class CreateeProjectComponent implements OnInit {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove OnInit

constructor() {}

ngOnInit(): void {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this

}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<table class="table table-sm table-bordered table-striped">
<thead class="bg-header">
<thead class="thead-orange">
<tr class="d-flex">
<th class="col-9">Project</th>
<th class="col-3 text-center"></th>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import '../../../../../../../styles/themes/orange-theme';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not needed

Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { ProjectTableListComponent } from './project-table-list.component';
import { ProjectLiistComponent } from './project-liist.component';
import { NgxPaginationModule } from 'ngx-pagination';

describe('ProjectTableListComponent', () => {
let component: ProjectTableListComponent;
let fixture: ComponentFixture<ProjectTableListComponent>;
let component: ProjectLiistComponent;
let fixture: ComponentFixture<ProjectLiistComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [NgxPaginationModule],
declarations: [ProjectTableListComponent],
declarations: [ProjectLiistComponent],
}).compileComponents();
}));

beforeEach(() => {
fixture = TestBed.createComponent(ProjectTableListComponent);
fixture = TestBed.createComponent(ProjectLiistComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Component, OnInit } from '@angular/core';

@Component({
selector: 'app-project-table-list',
templateUrl: './project-table-list.component.html',
styleUrls: ['./project-table-list.component.scss'],
selector: 'app-project-liist',
templateUrl: './project-liist.component.html',
styleUrls: ['./project-liist.component.scss'],
})
export class ProjectTableListComponent implements OnInit {
export class ProjectLiistComponent implements OnInit {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove implements

initPage3 = 1;

projects = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ <h4>Customers</h4>
</div>
<app-search></app-search>
</div>
<app-customer-table-list
<app-customer-list
[showCustomerForm]="showCustomerForm"
(changeShowCustomerForm)="showCustomerForm = $event"
></app-customer-table-list>
></app-customer-list>
<div class="row" *ngIf="showCustomerForm">
<div class="col">
<app-managment-customer-projects></app-managment-customer-projects>
Expand Down

This file was deleted.

Loading