-
Notifications
You must be signed in to change notification settings - Fork 1
78 customer administration screens #101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 17 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
fdbff24
customer administration screens
daros10 7d5d5e1
#78 added unit test
daros10 49cfc77
Merge branch 'master' into 78-customers-administration-screen
enriquezrene 254aa11
#78 fix lint suggestions
enriquezrene f8184b4
customer administration screens
daros10 15617dd
#78 added unit test
daros10 5a01b00
#78 fix lint suggestions
enriquezrene d178cf4
#78 get last changes of master
daros10 c41a001
#78 improve structure
daros10 6d6a4bb
Merge branch 'master' into 78-customers-administration-screen
enriquezrene 586535f
#78 improve typo and remove duplicated components
daros10 a7f3b53
Merge branch '78-customers-administration-screen' of https://github.c…
daros10 17026d3
#78 PR comments
enriquezrene c872c6e
#78 PR comments
enriquezrene 9df55d0
Merge branch 'master' into 78-customers-administration-screen
enriquezrene 825d379
#78 PR comments
enriquezrene 0fed631
fix: #78 PR comments
enriquezrene 996b857
fix: #78 customers management screen and solving dependency vulnerabi…
enriquezrene File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
...stomer-managment/components/customer-info/components/create-customer/create-customer.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| <div class="container"> | ||
| <form style="width: 600px;"> | ||
| <div class="form-group"> | ||
| <input type="text" class="form-control form-control-sm" id="" aria-describedby="" placeholder="Customer name" /> | ||
| <textarea | ||
| class="form-control form-control-sm mt-2" | ||
| id="exampleFormControlTextarea1" | ||
| rows="3" | ||
| placeholder="Customer description" | ||
| ></textarea> | ||
| <button type="submit" class="btn btn-sm btn-primary">Save</button> | ||
| <button type="submit" class="btn btn-sm btn-secondary mb-2 ml-2 mt-2">Cancel</button> | ||
| </div> | ||
| </form> | ||
| </div> |
Empty file.
24 changes: 24 additions & 0 deletions
24
...mer-managment/components/customer-info/components/create-customer/create-customer.spec.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
|
||
| import { CreateCustomerComponent } from './create-customer'; | ||
|
|
||
| describe('InputCustomerComponent', () => { | ||
| let component: CreateCustomerComponent; | ||
| let fixture: ComponentFixture<CreateCustomerComponent>; | ||
|
|
||
| beforeEach(async(() => { | ||
| TestBed.configureTestingModule({ | ||
| declarations: [CreateCustomerComponent], | ||
| }).compileComponents(); | ||
| })); | ||
|
|
||
| beforeEach(() => { | ||
| fixture = TestBed.createComponent(CreateCustomerComponent); | ||
| component = fixture.componentInstance; | ||
| fixture.detectChanges(); | ||
| }); | ||
|
|
||
| it('component should be created', () => { | ||
| expect(component).toBeTruthy(); | ||
| }); | ||
| }); |
10 changes: 10 additions & 0 deletions
10
...customer-managment/components/customer-info/components/create-customer/create-customer.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| import { Component } from '@angular/core'; | ||
|
|
||
| @Component({ | ||
| selector: 'app-create-customer', | ||
| templateUrl: './create-customer.html', | ||
| styleUrls: ['./create-customer.scss'], | ||
| }) | ||
| export class CreateCustomerComponent { | ||
| constructor() {} | ||
| } |
33 changes: 33 additions & 0 deletions
33
...-managment/components/customer-info/components/customer-list/customer-list.component.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| <table class="table table-sm table-bordered table-striped mb-0"> | ||
| <thead class="thead-orange"> | ||
| <tr class="d-flex"> | ||
| <th class="col-9">Name</th> | ||
| <th class="col-3 text-center"></th> | ||
| </tr> | ||
| </thead> | ||
| <tbody> | ||
| <tr | ||
| class="d-flex" | ||
| *ngFor="let customer of customers | paginate: { itemsPerPage: itemsPerPage, currentPage: initPage1, id: 'first' }" | ||
| > | ||
| <td class="col-sm-9">{{ customer.name }}</td> | ||
| <td class="col-sm-3 text-center"> | ||
| <button type="button" class="btn btn-sm btn-secondary"> | ||
| <i class="fa fa-pencil fa-xs"></i> | ||
| </button> | ||
| <button type="button" class="btn btn-sm btn-danger ml-2"> | ||
| <i class="fas fa-trash-alt fa-xs"></i> | ||
| </button> | ||
| </td> | ||
| </tr> | ||
| </tbody> | ||
| </table> | ||
| <div class="d-flex align-items-end flex-column"> | ||
| <pagination-controls | ||
| class="mt-auto p-2 custom-pagination" | ||
| (pageChange)="initPage1 = $event" | ||
| id="first" | ||
| previousLabel="" | ||
| nextLabel="" | ||
| ></pagination-controls> | ||
| </div> |
1 change: 1 addition & 0 deletions
1
...-managment/components/customer-info/components/customer-list/customer-list.component.scss
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| @import '../../../../../../../styles/themes/orange-theme'; | ||
27 changes: 27 additions & 0 deletions
27
...nagment/components/customer-info/components/customer-list/customer-list.component.spec.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
|
||
| import { CustomerListComponent } from './customer-list.component'; | ||
| import { NgxPaginationModule } from 'ngx-pagination'; | ||
|
|
||
| describe('CustomerTableListComponent', () => { | ||
| let component: CustomerListComponent; | ||
| let fixture: ComponentFixture<CustomerListComponent>; | ||
|
|
||
| beforeEach(async(() => { | ||
| TestBed.configureTestingModule({ | ||
| imports: [NgxPaginationModule], | ||
| declarations: [CustomerListComponent], | ||
| }).compileComponents(); | ||
| })); | ||
|
|
||
| beforeEach(() => { | ||
| fixture = TestBed.createComponent(CustomerListComponent); | ||
| component = fixture.componentInstance; | ||
| fixture.detectChanges(); | ||
| }); | ||
|
|
||
| it('component should be created', () => { | ||
| expect(component).toBeTruthy(); | ||
| }); | ||
|
|
||
| }); |
34 changes: 34 additions & 0 deletions
34
...er-managment/components/customer-info/components/customer-list/customer-list.component.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| import { Component } from '@angular/core'; | ||
| import { ITEMS_PER_PAGE } from 'src/environments/environment'; | ||
|
|
||
| @Component({ | ||
| selector: 'app-customer-list', | ||
| templateUrl: './customer-list.component.html', | ||
| styleUrls: ['./customer-list.component.scss'], | ||
| }) | ||
| export class CustomerListComponent { | ||
| initPage1 = 1; | ||
| itemsPerPage = ITEMS_PER_PAGE; | ||
|
|
||
| customers = [ | ||
| { | ||
| id: '1', | ||
| name: 'GoSpace', | ||
| }, | ||
| { | ||
| id: '2', | ||
| name: 'GruHub', | ||
| }, | ||
| { | ||
| id: '3', | ||
| name: 'e&y', | ||
| }, | ||
| { | ||
| id: '4', | ||
| name: 'Mido', | ||
| }, | ||
| ]; | ||
|
|
||
| constructor() {} | ||
|
|
||
| } |
53 changes: 53 additions & 0 deletions
53
...gment/components/management-customer-projects/management-customer-projects.component.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| <div class="container border mb-4 mt-0"> | ||
| <ul class="nav nav-tabs mt-2" id="myTab" role="tablist"> | ||
| <li class="nav-item"> | ||
| <a | ||
| class="nav-link active nav-active text-black font-weight-bold" | ||
| id="customer-information-tab" | ||
| data-toggle="tab" | ||
| href="#customer-information" | ||
| role="tab" | ||
| aria-controls="customer-information" | ||
| >Customer information</a | ||
| > | ||
| </li> | ||
| <li class="nav-item"> | ||
| <a | ||
| class="nav-link nav-active text-black font-weight-bold" | ||
| id="projects-type-tab" | ||
| data-toggle="tab" | ||
| href="#projectsType" | ||
| role="tab" | ||
| aria-controls="projects-type" | ||
| >Project types</a | ||
| > | ||
| </li> | ||
| <li class="nav-item"> | ||
| <a | ||
| class="nav-link nav-active text-black font-weight-bold" | ||
| id="projects-tab" | ||
| data-toggle="tab" | ||
| href="#projects" | ||
| role="tab" | ||
| aria-controls="projects" | ||
| >Projects</a | ||
| > | ||
| </li> | ||
| </ul> | ||
| <div class="tab-content" id="myTabContent"> | ||
| <div | ||
| class="tab-pane fade show active mt-3" | ||
| id="customer-information" | ||
| role="tabpanel" | ||
| aria-labelledby="customer-information-tab" | ||
| > | ||
| <app-create-customer></app-create-customer> | ||
| </div> | ||
| <div class="tab-pane fade mt-3" id="projects" role="tabpanel" aria-labelledby="projects-tab"> | ||
| <app-create-project></app-create-project> | ||
| </div> | ||
| <div class="tab-pane fade mt-3" id="projectsType" role="tabpanel" aria-labelledby="projects-type-tab"> | ||
| <app-create-project-type></app-create-project-type> | ||
| </div> | ||
| </div> | ||
| </div> |
8 changes: 8 additions & 0 deletions
8
...gment/components/management-customer-projects/management-customer-projects.component.scss
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| @import '../../../../../styles/colors.scss'; | ||
|
|
||
| .nav-active { | ||
| color: $modal-button-secondary; | ||
| } | ||
| .nav-item > a:hover { | ||
| opacity: 0.6; | ||
| } |
24 changes: 24 additions & 0 deletions
24
...nt/components/management-customer-projects/management-customer-projects.component.spec.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
|
||
| import { ManagementCustomerProjectsComponent } from './management-customer-projects.component'; | ||
|
|
||
| describe('ManagmentCustomerProjectsComponent', () => { | ||
| let component: ManagementCustomerProjectsComponent; | ||
| let fixture: ComponentFixture<ManagementCustomerProjectsComponent>; | ||
|
|
||
| beforeEach(async(() => { | ||
| TestBed.configureTestingModule({ | ||
| declarations: [ManagementCustomerProjectsComponent], | ||
| }).compileComponents(); | ||
| })); | ||
|
|
||
| beforeEach(() => { | ||
| fixture = TestBed.createComponent(ManagementCustomerProjectsComponent); | ||
| component = fixture.componentInstance; | ||
| fixture.detectChanges(); | ||
| }); | ||
|
|
||
| it('component should be created', () => { | ||
| expect(component).toBeTruthy(); | ||
| }); | ||
| }); |
10 changes: 10 additions & 0 deletions
10
...nagment/components/management-customer-projects/management-customer-projects.component.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| import { Component } from '@angular/core'; | ||
|
|
||
| @Component({ | ||
| selector: 'app-management-customer-projects', | ||
| templateUrl: './management-customer-projects.component.html', | ||
| styleUrls: ['./management-customer-projects.component.scss'], | ||
| }) | ||
| export class ManagementCustomerProjectsComponent { | ||
| constructor() {} | ||
| } |
13 changes: 13 additions & 0 deletions
13
...omponents/projects-type/components/create-project-type/create-project-type.component.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| <div class="container"> | ||
| <form style="width: 600px;"> | ||
| <div class="form-group"> | ||
| <input type="text" class="form-control form-control-sm" id="" aria-describedby="" placeholder="Name" /> | ||
| <textarea class="form-control form-control-sm mt-2" id="descriptionTextArea" rows="3" | ||
| placeholder="Description"></textarea> | ||
| <button type="submit" class="btn btn-sm btn-primary">Save</button> | ||
| <button type="submit" class="btn btn-sm btn-secondary mb-2 ml-2 mt-2">Cancel</button> | ||
| </div> | ||
| </form> | ||
| <hr /> | ||
| <app-project-type-list></app-project-type-list> | ||
| </div> |
Empty file.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.