diff --git a/src/app/app.module.ts b/src/app/app.module.ts
index 74ac726c5..01eadf0ac 100644
--- a/src/app/app.module.ts
+++ b/src/app/app.module.ts
@@ -23,10 +23,10 @@ import { ModalComponent } from './components/shared/modal/modal.component';
import { MonthPickerComponent } from './components/shared/month-picker/month-picker.component';
import { EmptyStateComponent } from './components/shared/empty-state/empty-state.component';
import { GroupByDatePipe } from './components/shared/pipes/group-by-date/group-by-date.pipe';
-// tslint:disable-next-line:max-line-length
+import { SearchProjectComponent } from './components/shared/search-project/search-project.component';
+import { FilterProjectPipe } from './components/shared/pipes/filter-project/filter-project.pipe';
import { ActivitiesManagementComponent } from './components/options-sidebar/activities/activities-management/activities-management.component';
-
@NgModule({
declarations: [
AppComponent,
@@ -46,6 +46,8 @@ import { ActivitiesManagementComponent } from './components/options-sidebar/acti
MonthPickerComponent,
EmptyStateComponent,
GroupByDatePipe,
+ SearchProjectComponent,
+ FilterProjectPipe,
ActivitiesManagementComponent,
CreateActivityComponent,
ActivityListComponent
diff --git a/src/app/components/options-sidebar/activities/activities-management/activities-management.component.html b/src/app/components/options-sidebar/activities/activities-management/activities-management.component.html
index 64f49bcc2..36d7ac8f9 100644
--- a/src/app/components/options-sidebar/activities/activities-management/activities-management.component.html
+++ b/src/app/components/options-sidebar/activities/activities-management/activities-management.component.html
@@ -1,7 +1,4 @@
-
-
-
0; else notShow">
-
-
-
-
-
-
Description:
-
{{activity.description}}
-
-
-
-
+
\ No newline at end of file
diff --git a/src/app/components/options-sidebar/activities/create-activity/create-activity.component.spec.ts b/src/app/components/options-sidebar/activities/create-activity/create-activity.component.spec.ts
index 15cace0a6..6d87e39c0 100644
--- a/src/app/components/options-sidebar/activities/create-activity/create-activity.component.spec.ts
+++ b/src/app/components/options-sidebar/activities/create-activity/create-activity.component.spec.ts
@@ -18,5 +18,4 @@ describe('CreateActivityComponent', () => {
it('should create the component', () => {
expect(component).toBeTruthy();
});
-
});
diff --git a/src/app/components/options-sidebar/project-management/project-management.component.html b/src/app/components/options-sidebar/project-management/project-management.component.html
index bc3f14b30..0a2459df9 100644
--- a/src/app/components/options-sidebar/project-management/project-management.component.html
+++ b/src/app/components/options-sidebar/project-management/project-management.component.html
@@ -1,17 +1,9 @@
-
+
\ No newline at end of file
diff --git a/src/app/components/options-sidebar/project-management/project-management.component.spec.ts b/src/app/components/options-sidebar/project-management/project-management.component.spec.ts
index 642bcb2fa..795db934b 100644
--- a/src/app/components/options-sidebar/project-management/project-management.component.spec.ts
+++ b/src/app/components/options-sidebar/project-management/project-management.component.spec.ts
@@ -7,6 +7,7 @@ import { ProjectService } from '../../../services/project.service';
import { of } from 'rxjs';
import { CreateProjectComponent } from '../../../components/shared/create-project/create-project.component';
import { ProjectListComponent } from '../../../components/shared/project-list/project-list.component';
+import { FilterProjectPipe } from 'src/app/components/shared/pipes/filter-project/filter-project.pipe';
describe('ProjectManagementComponent', () => {
let component: ProjectManagementComponent;
@@ -45,7 +46,7 @@ describe('ProjectManagementComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
- declarations: [ ProjectManagementComponent, CreateProjectComponent, ProjectListComponent ],
+ declarations: [ ProjectManagementComponent, CreateProjectComponent, ProjectListComponent, FilterProjectPipe ],
providers: [ { provide: ProjectService, useValue: projectServiceStub }],
imports: [
FormsModule,
diff --git a/src/app/components/options-sidebar/reports/reports.component.html b/src/app/components/options-sidebar/reports/reports.component.html
index c779010be..eb65621b2 100644
--- a/src/app/components/options-sidebar/reports/reports.component.html
+++ b/src/app/components/options-sidebar/reports/reports.component.html
@@ -1,5 +1,3 @@
-
-
reports works!
-
+
reports works!
\ No newline at end of file
diff --git a/src/app/components/options-sidebar/time-clock/time-clock.component.html b/src/app/components/options-sidebar/time-clock/time-clock.component.html
index b7dfb02f9..916ff4081 100644
--- a/src/app/components/options-sidebar/time-clock/time-clock.component.html
+++ b/src/app/components/options-sidebar/time-clock/time-clock.component.html
@@ -1,9 +1,4 @@
-
-
-
- Field technology is requiered. Enter this field for clock out.
-
-
+
-
-
{{ username }} clocked in at {{ hour | number: '2.0-2' }}:{{ minute | number: '2.0-2' }}:{{ seconds | number: '2.0-2' }}
-
{{ username }} clocked out at {{ hour | number: '2.0-2' }}:{{ minute | number: '2.0-2' }}:{{ seconds | number: '2.0-2' }}
+
{{ username }} clocked in at
+ {{ hour | number: '2.0-2' }}:{{ minute | number: '2.0-2' }}:{{ seconds | number: '2.0-2' }}
+
{{ username }} clocked out at
+ {{ hour | number: '2.0-2' }}:{{ minute | number: '2.0-2' }}:{{ seconds | number: '2.0-2' }}
Totals
Current
- {{ hour | number: '2.0-2' }}:{{ minute | number: '2.0-2' }}:{{ seconds | number: '2.0-2' }}
+
+ {{ hourCounterRealTime | number: '2.0-2' }}:{{ minuteCounterRealTime | number: '2.0-2' }}:{{ secondsCounterRealTime | number: '2.0-2' }}
+
Day
- 4:22
+ 00:00
Week
- 14:00
+ 00:00
Projects
-
Top
-
-
-
+
+
\ No newline at end of file
diff --git a/src/app/components/shared/clock/clock.component.html b/src/app/components/shared/clock/clock.component.html
index 1a4412038..9ae08dd37 100644
--- a/src/app/components/shared/clock/clock.component.html
+++ b/src/app/components/shared/clock/clock.component.html
@@ -1,8 +1,8 @@
-
-
-
-
-
{{ hour | number: '2.0-2' }}:{{ minutes | number: '2.0-2' }}:{{ seconds | number: '2.0-2' }}
-
+
+
+
+
+
{{ hour | number: '2.0-2' }}:{{ minutes | number: '2.0-2' }}:{{ seconds | number: '2.0-2' }}
+
\ No newline at end of file
diff --git a/src/app/components/shared/clock/clock.component.spec.ts b/src/app/components/shared/clock/clock.component.spec.ts
index 22f10997f..d6f7a06b7 100644
--- a/src/app/components/shared/clock/clock.component.spec.ts
+++ b/src/app/components/shared/clock/clock.component.spec.ts
@@ -45,4 +45,18 @@ describe('ClockComponent', () => {
expect(component.showClock).toHaveBeenCalled();
});
+ it('should be verify the init state of vars' , () => {
+ expect(component.hour).toEqual(0);
+ expect(component.minutes).toEqual(0);
+ expect(component.seconds).toEqual(0);
+ expect(component.displayTime).toBeFalsy();
+ });
+
+ it('should enter if and assign the value to vars' , () => {
+ component.showClock();
+ expect(component.hour).toEqual(0);
+ expect(component.minutes).toEqual(0);
+ expect(component.seconds).toEqual(0);
+ });
+
});
diff --git a/src/app/components/shared/clock/clock.component.ts b/src/app/components/shared/clock/clock.component.ts
index ac956ae05..3bdbe970f 100644
--- a/src/app/components/shared/clock/clock.component.ts
+++ b/src/app/components/shared/clock/clock.component.ts
@@ -17,6 +17,9 @@ export class ClockComponent implements OnInit {
constructor() {
this.showClock();
this.displayTime = false;
+ this.hour = 0;
+ this.minutes = 0;
+ this.seconds = 0;
setTimeout(() => {
this.displayTime = true;
}, 3000);
diff --git a/src/app/components/shared/create-project/create-project.component.html b/src/app/components/shared/create-project/create-project.component.html
index f6d9e9fd3..2fed6b515 100644
--- a/src/app/components/shared/create-project/create-project.component.html
+++ b/src/app/components/shared/create-project/create-project.component.html
@@ -5,13 +5,16 @@
Project
@@ -35,4 +40,4 @@
Project
-
+
\ No newline at end of file
diff --git a/src/app/components/shared/pipes/filter-project/filter-project.pipe.spec.ts b/src/app/components/shared/pipes/filter-project/filter-project.pipe.spec.ts
new file mode 100644
index 000000000..9b14140dc
--- /dev/null
+++ b/src/app/components/shared/pipes/filter-project/filter-project.pipe.spec.ts
@@ -0,0 +1,14 @@
+import { FilterProjectPipe } from './filter-project.pipe';
+import { Project } from '../../../../interfaces/project';
+
+describe('FilterProjectPipe', () => {
+ it('create an instance', () => {
+ const pipe = new FilterProjectPipe();
+ expect(pipe).toBeTruthy();
+ });
+
+ it('test method of pipe', () => {
+ expect(new FilterProjectPipe().transform([] , '')).toEqual([]);
+ });
+
+});
diff --git a/src/app/components/shared/pipes/filter-project/filter-project.pipe.ts b/src/app/components/shared/pipes/filter-project/filter-project.pipe.ts
new file mode 100644
index 000000000..4bf0bc50f
--- /dev/null
+++ b/src/app/components/shared/pipes/filter-project/filter-project.pipe.ts
@@ -0,0 +1,20 @@
+import { Pipe, PipeTransform } from '@angular/core';
+import { Project } from 'src/app/interfaces';
+
+@Pipe({
+ name: 'filterProject'
+})
+export class FilterProjectPipe implements PipeTransform {
+
+ transform(value: Project[] = [], arg: string): string[] {
+
+ const restultProjects = [];
+ // tslint:disable-next-line: prefer-for-of
+ for ( let i = 0; i < value.length; i++ ) {
+ if ( value[i].name.toLowerCase().indexOf(arg.toLowerCase()) > -1 ) {
+ restultProjects.push(value[i]);
+ }
+ }
+ return restultProjects;
+ }
+}
diff --git a/src/app/components/shared/project-list-hover/project-list-hover.component.html b/src/app/components/shared/project-list-hover/project-list-hover.component.html
index 212bf4d2d..dbd6deb4c 100644
--- a/src/app/components/shared/project-list-hover/project-list-hover.component.html
+++ b/src/app/components/shared/project-list-hover/project-list-hover.component.html
@@ -1,17 +1,9 @@
+