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
style: #222 Removing dead code
  • Loading branch information
Juan Gabriel Guzman committed May 13, 2020
commit 424ad5f4a110a5b4f4c62ac5c00cb60d0c6f5c66
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="input-group input-group-sm">
<div class="input-group-prepend">
<span class="input-group-text span-width">Tecnologias</span>
<span class="input-group-text span-width">Technology</span>
</div>
<input
(input)="queryTechnologies($event)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@

.span-width {
width: 6rem;
background-image: $background-pantone !important;
background-image: $background-pantone;
color: white;
}
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
import {async, ComponentFixture, TestBed} from '@angular/core/testing';
import {provideMockStore, MockStore} from '@ngrx/store/testing';
import {MockStore, provideMockStore} from '@ngrx/store/testing';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';

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

describe('Technologies component', () => {
type Merged = TechnologyState & ProjectState;
let component: TechnologiesComponent;
let fixture: ComponentFixture<TechnologiesComponent>;
let store: MockStore<TechnologyState>;
Expand Down Expand Up @@ -67,7 +64,6 @@ describe('Technologies component', () => {
'karma',
'github',
];
console.log(component.selectedTechnologies.length);
length = component.selectedTechnologies.length;
component.addTechnology(name);
expect(component.selectedTechnologies.length).toBe(10);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {Technology} from '../../models';
export class TechnologiesComponent implements OnInit {
private readonly MAX_NUM_TECHNOLOGIES = 10;
private readonly MIN_QUERY_LENGTH = 2;
private query = '';
public query = '';
showList = false;
isLoading = false;
technology: Technology;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import {async, ComponentFixture, TestBed} from '@angular/core/testing';
import {provideMockStore, MockStore} from '@ngrx/store/testing';
import {MockStore, provideMockStore} from '@ngrx/store/testing';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';

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

describe('EntryFieldsComponent', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import {getActiveTimeEntry} from './../../store/entry.selectors';
import {Component, OnInit, ViewChild, ElementRef, Renderer2} from '@angular/core';
import {Component, OnInit} from '@angular/core';
import {FormBuilder, FormGroup} from '@angular/forms';
import {Store, select} from '@ngrx/store';
import {select, Store} from '@ngrx/store';

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

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,30 +1,28 @@
import { getProjects } from './../../../customer-management/components/projects/components/store/project.selectors';
import { Component, OnInit } from '@angular/core';
import { Store, select } from '@ngrx/store';
import {getProjects} from './../../../customer-management/components/projects/components/store/project.selectors';
import {Component, OnInit} from '@angular/core';
import {Store, select} from '@ngrx/store';

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

@Component({
selector: 'app-project-list-hover',
templateUrl: './project-list-hover.component.html',
styleUrls: ['./project-list-hover.component.scss'],
})
export class ProjectListHoverComponent implements OnInit {

selectedId: string;
listProjects: Project[] = [];
filterProjects = '';
showButton = '';
keyword = 'name';
nameActiveProject: string;
activeEntry;

constructor(private store: Store<ProjectState>, private toastr: ToastrService) { }
constructor(private store: Store<ProjectState>, private toastr: ToastrService) {
}

ngOnInit(): void {
this.store.dispatch(new actions.LoadProjects());
Expand Down Expand Up @@ -59,7 +57,7 @@ export class ProjectListHoverComponent implements OnInit {
const entry = {id: this.activeEntry.id, project_id: id};
this.store.dispatch(new entryActions.UpdateActiveEntry(entry));
} else {
const newEntry = { project_id: id, start_date: new Date().toISOString() };
const newEntry = {project_id: id, start_date: new Date().toISOString()};
this.store.dispatch(new entryActions.CreateEntry(newEntry));
this.toastr.success('You just clocked-in');
}
Expand Down