Skip to content

Conversation

@DiegoTinitana
Copy link
Contributor

No description provided.

@DiegoTinitana DiegoTinitana force-pushed the 90_Manage_customer_project_types branch from 7d811c0 to e88d1b9 Compare April 20, 2020 22:59

</div>
</form>
<hr />
Copy link
Contributor

Choose a reason for hiding this comment

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

we can have a clean create-project-type.component if we move <app-project-type-list></app-project-type-list> to management-customer-projects.component.html. we can set in protect type tab the following:

<div class="container">
      <app-create-project-type></app-create-project-type>
      <app-project-type-list></app-project-type-list>
</div>

please remove <app-project-type-list></app-project-type-list> and <div class="container"> from here.

<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>
<button type="button" class="btn btn-sm btn-secondary"><i class="fa fa-pencil fa-xs" (click)="updateProjectType(projectType.id)"></i></button>
<button type="button" class="btn btn-sm btn-danger ml-2"><i class="fas fa-trash-alt fa-xs" (click)="deleteProjectType(projectType.id)" ></i></button>
Copy link
Contributor

Choose a reason for hiding this comment

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

you could change the click event to button label because the experience in the UI is uncomfortable. currently, you need to touch exactly over the icon for it works.

import { ProjectTypeListComponent } from './project-type-list.component';
import { provideMockStore, MockStore } from '@ngrx/store/testing';
import { allProjectTypes, ProjectTypeState } from '../../store';
import { NgxPaginationModule } from 'ngx-pagination';
Copy link
Contributor

Choose a reason for hiding this comment

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

please sort this import.

createProjectType(projectTypeData): Observable<any> {
const body = {
...projectTypeData,
};
Copy link
Contributor

Choose a reason for hiding this comment

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

it is not necessary if you don't need to add a new attribute.

const url = `${this.baseUrl}/${projectTypeData.id}`;

const body = {
...projectTypeData,
Copy link
Contributor

Choose a reason for hiding this comment

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

it is not necessary if you don't need to add a new attribute.

import { ProjectType } from '../../../../shared/models';

export enum ProjectTypeActionTypes {
LOAD_PROJECT_TYPES = '[projectType] LOAD_PROJECT_TYPES',
Copy link
Contributor

Choose a reason for hiding this comment

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

change all [projectType] to [ProjectType]

export interface ProjectType {
id: string;
name: string;
description: string;
Copy link
Contributor

Choose a reason for hiding this comment

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

description is optional, please add ? symbol.

id: string;
name: string;
description: string;
tenant_id?: string;
Copy link
Contributor

Choose a reason for hiding this comment

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

@enriquezrene I'm not sure if tenant_id still should be a property. We can get it from session storage and in this case, we don't use it

rows="3"
placeholder="Description"
formControlName="description"
></textarea>
Copy link
Contributor

Choose a reason for hiding this comment

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

we can set a default value for optional fields, that way we can avoid the error when we do two continue creations only with required fields

@DiegoTinitana DiegoTinitana force-pushed the 90_Manage_customer_project_types branch from e88d1b9 to 1a2b4d5 Compare April 21, 2020 16:26
@DiegoTinitana DiegoTinitana force-pushed the 90_Manage_customer_project_types branch from 1a2b4d5 to 5986a9f Compare April 21, 2020 16:50
@codecov
Copy link

codecov bot commented Apr 21, 2020

Codecov Report

Merging #152 into master will increase coverage by 0.53%.
The diff coverage is 90.99%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #152      +/-   ##
==========================================
+ Coverage   91.87%   92.40%   +0.53%     
==========================================
  Files          50       53       +3     
  Lines         517      619     +102     
  Branches       32       36       +4     
==========================================
+ Hits          475      572      +97     
- Misses         33       37       +4     
- Partials        9       10       +1     
Impacted Files Coverage Δ
...shared/pipes/filter-project/filter-project.pipe.ts 100.00% <ø> (+14.28%) ⬆️
...ents/projects-type/store/project-type.selectors.ts 55.55% <55.55%> (ø)
...s/project-type-list/project-type-list.component.ts 81.81% <77.77%> (-18.19%) ⬇️
...eate-project-type/create-project-type.component.ts 83.33% <83.33%> (-16.67%) ⬇️
...nents/projects-type/store/project-type.reducers.ts 95.65% <95.65%> (ø)
...nts/projects-type/services/project-type.service.ts 100.00% <100.00%> (ø)
...onents/projects-type/store/project-type.actions.ts 100.00% <100.00%> (ø)
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c490d9d...5986a9f. Read the comment docs.

@enriquezrene enriquezrene merged commit fa0eb34 into master Apr 21, 2020
@enriquezrene enriquezrene deleted the 90_Manage_customer_project_types branch April 21, 2020 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants