Skip to content

Commit c4fbfff

Browse files
author
Juan Gabriel Guzman
committed
style: #222 Removing dead code
1 parent 6642ec8 commit c4fbfff

File tree

7 files changed

+19
-25
lines changed

7 files changed

+19
-25
lines changed

src/app/modules/shared/components/technologies/technologies.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div class="input-group input-group-sm">
22
<div class="input-group-prepend">
3-
<span class="input-group-text span-width">Tecnologias</span>
3+
<span class="input-group-text span-width">Technology</span>
44
</div>
55
<input
66
(input)="queryTechnologies($event)"

src/app/modules/shared/components/technologies/technologies.component.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,6 @@
4444

4545
.span-width {
4646
width: 6rem;
47-
background-image: $background-pantone !important;
47+
background-image: $background-pantone;
4848
color: white;
4949
}

src/app/modules/shared/components/technologies/technologies.component.spec.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
import {async, ComponentFixture, TestBed} from '@angular/core/testing';
2-
import {provideMockStore, MockStore} from '@ngrx/store/testing';
2+
import {MockStore, provideMockStore} from '@ngrx/store/testing';
33
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
44

55
import {TechnologyState} from '../../store/technology.reducers';
66
import {allTechnologies} from '../../store/technology.selectors';
77
import {TechnologiesComponent} from './technologies.component';
88
import * as actions from '../../store/technology.actions';
99
import {ProjectState} from '../../../customer-management/components/projects/components/store/project.reducer';
10-
import {getCustomerProjects} from '../../../customer-management/components/projects/components/store/project.selectors';
11-
import * as entryActions from '../../../time-clock/store/entry.actions';
1210

1311
describe('Technologies component', () => {
14-
type Merged = TechnologyState & ProjectState;
1512
let component: TechnologiesComponent;
1613
let fixture: ComponentFixture<TechnologiesComponent>;
1714
let store: MockStore<TechnologyState>;

src/app/modules/shared/components/technologies/technologies.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {Technology} from '../../models';
1414
export class TechnologiesComponent implements OnInit {
1515
private readonly MAX_NUM_TECHNOLOGIES = 10;
1616
private readonly MIN_QUERY_LENGTH = 2;
17-
private query = '';
17+
public query = '';
1818
showList = false;
1919
isLoading = false;
2020
technology: Technology;

src/app/modules/time-clock/components/entry-fields/entry-fields.component.spec.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
import {async, ComponentFixture, TestBed} from '@angular/core/testing';
2-
import {provideMockStore, MockStore} from '@ngrx/store/testing';
2+
import {MockStore, provideMockStore} from '@ngrx/store/testing';
33
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
44

55
import {TechnologyState} from '../../../shared/store/technology.reducers';
66
import {allTechnologies} from '../../../shared/store/technology.selectors';
77
import {EntryFieldsComponent} from './entry-fields.component';
88
import {ProjectState} from '../../../customer-management/components/projects/components/store/project.reducer';
99
import {getCustomerProjects} from '../../../customer-management/components/projects/components/store/project.selectors';
10-
import * as actions from '../../../shared/store/technology.actions';
1110
import * as entryActions from '../../store/entry.actions';
1211

1312
describe('EntryFieldsComponent', () => {

src/app/modules/time-clock/components/entry-fields/entry-fields.component.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import {getActiveTimeEntry} from './../../store/entry.selectors';
2-
import {Component, OnInit, ViewChild, ElementRef, Renderer2} from '@angular/core';
2+
import {Component, OnInit} from '@angular/core';
33
import {FormBuilder, FormGroup} from '@angular/forms';
4-
import {Store, select} from '@ngrx/store';
4+
import {select, Store} from '@ngrx/store';
55

6-
import {Technology, Activity, NewEntry} from '../../../shared/models';
6+
import {Activity, NewEntry} from '../../../shared/models';
77
import {ProjectState} from '../../../customer-management/components/projects/components/store/project.reducer';
88
import {TechnologyState} from '../../../shared/store/technology.reducers';
9-
import {LoadActivities, ActivityState, allActivities} from '../../../activities-management/store';
9+
import {ActivityState, allActivities, LoadActivities} from '../../../activities-management/store';
1010

1111
import * as entryActions from '../../store/entry.actions';
1212

src/app/modules/time-clock/components/project-list-hover/project-list-hover.component.ts

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,28 @@
1-
import { getProjects } from './../../../customer-management/components/projects/components/store/project.selectors';
2-
import { Component, OnInit } from '@angular/core';
3-
import { Store, select } from '@ngrx/store';
1+
import {getProjects} from './../../../customer-management/components/projects/components/store/project.selectors';
2+
import {Component, OnInit} from '@angular/core';
3+
import {Store, select} from '@ngrx/store';
44

5-
import { getActiveTimeEntry } from './../../store/entry.selectors';
6-
import { Project } from 'src/app/modules/shared/models';
7-
import { ProjectState } from '../../../customer-management/components/projects/components/store/project.reducer';
5+
import {getActiveTimeEntry} from './../../store/entry.selectors';
6+
import {Project} from 'src/app/modules/shared/models';
7+
import {ProjectState} from '../../../customer-management/components/projects/components/store/project.reducer';
88
import * as actions from '../../../customer-management/components/projects/components/store/project.actions';
99
import * as entryActions from '../../store/entry.actions';
10-
import { ToastrService } from 'ngx-toastr';
10+
import {ToastrService} from 'ngx-toastr';
1111

1212
@Component({
1313
selector: 'app-project-list-hover',
1414
templateUrl: './project-list-hover.component.html',
1515
styleUrls: ['./project-list-hover.component.scss'],
1616
})
1717
export class ProjectListHoverComponent implements OnInit {
18-
19-
selectedId: string;
2018
listProjects: Project[] = [];
21-
filterProjects = '';
2219
showButton = '';
2320
keyword = 'name';
2421
nameActiveProject: string;
2522
activeEntry;
2623

27-
constructor(private store: Store<ProjectState>, private toastr: ToastrService) { }
24+
constructor(private store: Store<ProjectState>, private toastr: ToastrService) {
25+
}
2826

2927
ngOnInit(): void {
3028
this.store.dispatch(new actions.LoadProjects());
@@ -59,7 +57,7 @@ export class ProjectListHoverComponent implements OnInit {
5957
const entry = {id: this.activeEntry.id, project_id: id};
6058
this.store.dispatch(new entryActions.UpdateActiveEntry(entry));
6159
} else {
62-
const newEntry = { project_id: id, start_date: new Date().toISOString() };
60+
const newEntry = {project_id: id, start_date: new Date().toISOString()};
6361
this.store.dispatch(new entryActions.CreateEntry(newEntry));
6462
this.toastr.success('You just clocked-in');
6563
}

0 commit comments

Comments
 (0)