From 1ca70b8c4a6d1c0c5b4f1aed72a00254e9a054e3 Mon Sep 17 00:00:00 2001 From: daros10 Date: Wed, 11 Mar 2020 23:09:21 -0500 Subject: [PATCH 01/16] time clock in UI --- .../time-clock/time-clock.component.html | 74 ++++++++++++++++++- 1 file changed, 72 insertions(+), 2 deletions(-) diff --git a/src/app/components/optionsSidebar/time-clock/time-clock.component.html b/src/app/components/optionsSidebar/time-clock/time-clock.component.html index 80644640c..27f5d3e3f 100644 --- a/src/app/components/optionsSidebar/time-clock/time-clock.component.html +++ b/src/app/components/optionsSidebar/time-clock/time-clock.component.html @@ -1,5 +1,75 @@
-

time-clock works!

+
+
+
+
+ Time clock +
+
+ +
+
+
-
\ No newline at end of file +
+

Dario clocked out at hh:mm:ss

+
Totals
+
+
+
+
Current
+

-

+
+
+
Day
+

4:22

+ +
+
+
Week
+

14:00

+
+
+
Projects
+
+
+ +
+
+

Top

+
    +
  • + Customer › ernst-and-young + +
  • +
  • + Customer + + +
  • +
  • + Training + +
  • +
+
+ +
+
+
+ +
+
+ +
+ +
+ +
+ +
+ +
\ No newline at end of file From c656f2c7553585a5852ab86e01453fd3431dc48d Mon Sep 17 00:00:00 2001 From: daros10 Date: Sun, 15 Mar 2020 21:42:46 -0500 Subject: [PATCH 02/16] added code coverage dependecies --- angular.json | 240 +++++++++--------- .../time-clock/time-clock.component.html | 27 +- .../time-clock/time-clock.component.ts | 12 +- 3 files changed, 155 insertions(+), 124 deletions(-) diff --git a/angular.json b/angular.json index d51457a0a..c6bb80e94 100644 --- a/angular.json +++ b/angular.json @@ -1,128 +1,126 @@ { - "$schema": "./node_modules/@angular/cli/lib/config/schema.json", - "version": 1, - "newProjectRoot": "projects", - "projects": { - "time-tracker": { - "projectType": "application", - "schematics": {}, - "root": "", - "sourceRoot": "src", - "prefix": "app", - "architect": { - "build": { - "builder": "@angular-devkit/build-angular:browser", - "options": { - "outputPath": "dist/time-tracker", - "index": "src/index.html", - "main": "src/main.ts", - "polyfills": "src/polyfills.ts", - "tsConfig": "tsconfig.app.json", - "aot": true, - "assets": [ - "src/favicon.ico", - "src/assets" - ], - "styles": [ - "src/styles.css" - ], - "scripts": [] - }, - "configurations": { - "production": { - "fileReplacements": [ - { - "replace": "src/environments/environment.ts", - "with": "src/environments/environment.prod.ts" - } - ], - "optimization": true, - "outputHashing": "all", - "sourceMap": false, - "extractCss": true, - "namedChunks": false, - "extractLicenses": true, - "vendorChunk": false, - "buildOptimizer": true, - "budgets": [ - { - "type": "initial", - "maximumWarning": "2mb", - "maximumError": "5mb" + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", + "version": 1, + "newProjectRoot": "projects", + "projects": { + "time-tracker": { + "projectType": "application", + "schematics": {}, + "root": "", + "sourceRoot": "src", + "prefix": "app", + "architect": { + "build": { + "builder": "@angular-devkit/build-angular:browser", + "options": { + "outputPath": "dist/time-tracker", + "index": "src/index.html", + "main": "src/main.ts", + "polyfills": "src/polyfills.ts", + "tsConfig": "tsconfig.app.json", + "aot": true, + "assets": [ + "src/favicon.ico", + "src/assets" + ], + "styles": [ + "src/styles.css" + ], + "scripts": [] + }, + "configurations": { + "production": { + "fileReplacements": [{ + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.prod.ts" + }], + "optimization": true, + "outputHashing": "all", + "sourceMap": false, + "extractCss": true, + "namedChunks": false, + "extractLicenses": true, + "vendorChunk": false, + "buildOptimizer": true, + "budgets": [{ + "type": "initial", + "maximumWarning": "2mb", + "maximumError": "5mb" + }, + { + "type": "anyComponentStyle", + "maximumWarning": "6kb", + "maximumError": "10kb" + } + ] + } + } + }, + "serve": { + "builder": "@angular-devkit/build-angular:dev-server", + "options": { + "browserTarget": "time-tracker:build" + }, + "configurations": { + "production": { + "browserTarget": "time-tracker:build:production" + } + } + }, + "extract-i18n": { + "builder": "@angular-devkit/build-angular:extract-i18n", + "options": { + "browserTarget": "time-tracker:build" + } + }, + "test": { + "builder": "@angular-devkit/build-angular:karma", + "options": { + "main": "src/test.ts", + "codeCoverage": true, + "polyfills": "src/polyfills.ts", + "tsConfig": "tsconfig.spec.json", + "karmaConfig": "karma.conf.js", + "assets": [ + "src/favicon.ico", + "src/assets" + ], + "styles": [ + "src/styles.css" + ], + "scripts": [] + } }, - { - "type": "anyComponentStyle", - "maximumWarning": "6kb", - "maximumError": "10kb" + "lint": { + "builder": "@angular-devkit/build-angular:tslint", + "options": { + "tsConfig": [ + "tsconfig.app.json", + "tsconfig.spec.json", + "e2e/tsconfig.json" + ], + "exclude": [ + "**/node_modules/**" + ] + } + }, + "e2e": { + "builder": "@angular-devkit/build-angular:protractor", + "options": { + "protractorConfig": "e2e/protractor.conf.js", + "devServerTarget": "time-tracker:serve" + }, + "configurations": { + "production": { + "devServerTarget": "time-tracker:serve:production" + } + } } - ] - } - } - }, - "serve": { - "builder": "@angular-devkit/build-angular:dev-server", - "options": { - "browserTarget": "time-tracker:build" - }, - "configurations": { - "production": { - "browserTarget": "time-tracker:build:production" - } - } - }, - "extract-i18n": { - "builder": "@angular-devkit/build-angular:extract-i18n", - "options": { - "browserTarget": "time-tracker:build" - } - }, - "test": { - "builder": "@angular-devkit/build-angular:karma", - "options": { - "main": "src/test.ts", - "polyfills": "src/polyfills.ts", - "tsConfig": "tsconfig.spec.json", - "karmaConfig": "karma.conf.js", - "assets": [ - "src/favicon.ico", - "src/assets" - ], - "styles": [ - "src/styles.css" - ], - "scripts": [] - } - }, - "lint": { - "builder": "@angular-devkit/build-angular:tslint", - "options": { - "tsConfig": [ - "tsconfig.app.json", - "tsconfig.spec.json", - "e2e/tsconfig.json" - ], - "exclude": [ - "**/node_modules/**" - ] - } - }, - "e2e": { - "builder": "@angular-devkit/build-angular:protractor", - "options": { - "protractorConfig": "e2e/protractor.conf.js", - "devServerTarget": "time-tracker:serve" - }, - "configurations": { - "production": { - "devServerTarget": "time-tracker:serve:production" } - } } - } + }, + "defaultProject": "time-tracker", + "cli": { + "analytics": false } - }, - "defaultProject": "time-tracker", - "cli": { - "analytics": false - } } \ No newline at end of file diff --git a/src/app/components/optionsSidebar/time-clock/time-clock.component.html b/src/app/components/optionsSidebar/time-clock/time-clock.component.html index 27f5d3e3f..8e406950c 100644 --- a/src/app/components/optionsSidebar/time-clock/time-clock.component.html +++ b/src/app/components/optionsSidebar/time-clock/time-clock.component.html @@ -24,7 +24,6 @@

-

Day

4:22

-
Week
@@ -55,6 +54,30 @@
Projects

+ +
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
@@ -63,7 +86,7 @@
Projects
- +
diff --git a/src/app/components/optionsSidebar/time-clock/time-clock.component.ts b/src/app/components/optionsSidebar/time-clock/time-clock.component.ts index f34bb7b11..c1d7dc2c8 100644 --- a/src/app/components/optionsSidebar/time-clock/time-clock.component.ts +++ b/src/app/components/optionsSidebar/time-clock/time-clock.component.ts @@ -7,7 +7,17 @@ import { Component, OnInit } from '@angular/core'; }) export class TimeClockComponent implements OnInit { - constructor() { } + isClockIn: boolean; + + constructor() { + this.isClockIn = false; + } + + employeClockIn(): boolean { + this.isClockIn = true; + console.log('valor es' + this.isClockIn); + return this.isClockIn; + } ngOnInit(): void { } From aeb6fbad280d83101daa7f4b69ddb3f59a0f03ac Mon Sep 17 00:00:00 2001 From: daros10 Date: Mon, 16 Mar 2020 09:22:11 -0500 Subject: [PATCH 03/16] clockIn/out --- src/app/app.module.ts | 3 +++ .../time-clock/time-clock.component.html | 15 ++++----------- .../time-clock/time-clock.component.ts | 10 +++------- 3 files changed, 10 insertions(+), 18 deletions(-) diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 5bf489d58..90e7011ee 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -7,6 +7,8 @@ import { NavbarComponent } from './components/shared/navbar/navbar.component'; import { UserComponent } from './components/shared/user/user.component'; import { SidebarComponent } from './components/shared/sidebar/sidebar.component'; import { ClockComponent } from './components/shared/clock/clock.component'; +import { TimeClockComponent } from './components/optionsSidebar/time-clock/time-clock.component'; + @NgModule({ declarations: [ @@ -15,6 +17,7 @@ import { ClockComponent } from './components/shared/clock/clock.component'; UserComponent, SidebarComponent, ClockComponent, + TimeClockComponent ], imports: [ BrowserModule, diff --git a/src/app/components/optionsSidebar/time-clock/time-clock.component.html b/src/app/components/optionsSidebar/time-clock/time-clock.component.html index 8e406950c..3e43c39ef 100644 --- a/src/app/components/optionsSidebar/time-clock/time-clock.component.html +++ b/src/app/components/optionsSidebar/time-clock/time-clock.component.html @@ -1,4 +1,4 @@ -
+
@@ -53,9 +53,7 @@
Projects

- - -
+
@@ -75,9 +73,7 @@
Projects
-
-
@@ -86,13 +82,10 @@
Projects
- + +
-
-
-
-
\ No newline at end of file diff --git a/src/app/components/optionsSidebar/time-clock/time-clock.component.ts b/src/app/components/optionsSidebar/time-clock/time-clock.component.ts index c1d7dc2c8..99e8a2ea0 100644 --- a/src/app/components/optionsSidebar/time-clock/time-clock.component.ts +++ b/src/app/components/optionsSidebar/time-clock/time-clock.component.ts @@ -5,21 +5,17 @@ import { Component, OnInit } from '@angular/core'; templateUrl: './time-clock.component.html', styleUrls: ['./time-clock.component.css'] }) -export class TimeClockComponent implements OnInit { +export class TimeClockComponent { isClockIn: boolean; constructor() { - this.isClockIn = false; + this.isClockIn = true; } employeClockIn(): boolean { - this.isClockIn = true; + this.isClockIn = !this.isClockIn; console.log('valor es' + this.isClockIn); return this.isClockIn; } - - ngOnInit(): void { - } - } From 490a689ade1e1b06db84826f32917190fbae387a Mon Sep 17 00:00:00 2001 From: daros10 Date: Mon, 16 Mar 2020 09:30:10 -0500 Subject: [PATCH 04/16] update folders --- src/app/app-routing.module.ts | 10 +++++----- src/app/app.module.ts | 2 +- .../getting-started/getting-started.component.css | 0 .../getting-started/getting-started.component.html | 0 .../getting-started/getting-started.component.spec.ts | 0 .../getting-started/getting-started.component.ts | 0 .../reports/reports.component.css | 0 .../reports/reports.component.html | 0 .../reports/reports.component.spec.ts | 0 .../reports/reports.component.ts | 0 .../time-clock/time-clock.component.css | 0 .../time-clock/time-clock.component.html | 0 .../time-clock/time-clock.component.spec.ts | 0 .../time-clock/time-clock.component.ts | 0 .../time-entries/time-entries.component.css | 0 .../time-entries/time-entries.component.html | 0 .../time-entries/time-entries.component.spec.ts | 0 .../time-entries/time-entries.component.ts | 0 .../time-off/time-off.component.css | 0 .../time-off/time-off.component.html | 0 .../time-off/time-off.component.spec.ts | 0 .../time-off/time-off.component.ts | 0 22 files changed, 6 insertions(+), 6 deletions(-) rename src/app/components/{optionsSidebar => options-sidebar}/getting-started/getting-started.component.css (100%) rename src/app/components/{optionsSidebar => options-sidebar}/getting-started/getting-started.component.html (100%) rename src/app/components/{optionsSidebar => options-sidebar}/getting-started/getting-started.component.spec.ts (100%) rename src/app/components/{optionsSidebar => options-sidebar}/getting-started/getting-started.component.ts (100%) rename src/app/components/{optionsSidebar => options-sidebar}/reports/reports.component.css (100%) rename src/app/components/{optionsSidebar => options-sidebar}/reports/reports.component.html (100%) rename src/app/components/{optionsSidebar => options-sidebar}/reports/reports.component.spec.ts (100%) rename src/app/components/{optionsSidebar => options-sidebar}/reports/reports.component.ts (100%) rename src/app/components/{optionsSidebar => options-sidebar}/time-clock/time-clock.component.css (100%) rename src/app/components/{optionsSidebar => options-sidebar}/time-clock/time-clock.component.html (100%) rename src/app/components/{optionsSidebar => options-sidebar}/time-clock/time-clock.component.spec.ts (100%) rename src/app/components/{optionsSidebar => options-sidebar}/time-clock/time-clock.component.ts (100%) rename src/app/components/{optionsSidebar => options-sidebar}/time-entries/time-entries.component.css (100%) rename src/app/components/{optionsSidebar => options-sidebar}/time-entries/time-entries.component.html (100%) rename src/app/components/{optionsSidebar => options-sidebar}/time-entries/time-entries.component.spec.ts (100%) rename src/app/components/{optionsSidebar => options-sidebar}/time-entries/time-entries.component.ts (100%) rename src/app/components/{optionsSidebar => options-sidebar}/time-off/time-off.component.css (100%) rename src/app/components/{optionsSidebar => options-sidebar}/time-off/time-off.component.html (100%) rename src/app/components/{optionsSidebar => options-sidebar}/time-off/time-off.component.spec.ts (100%) rename src/app/components/{optionsSidebar => options-sidebar}/time-off/time-off.component.ts (100%) diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 28cc3b06d..495f9a184 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -1,10 +1,10 @@ import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; -import { GettingStartedComponent } from './components/optionsSidebar/getting-started/getting-started.component'; -import { ReportsComponent } from './components/optionsSidebar/reports/reports.component'; -import { TimeClockComponent } from './components/optionsSidebar/time-clock/time-clock.component'; -import { TimeEntriesComponent } from './components/optionsSidebar/time-entries/time-entries.component'; -import { TimeOffComponent } from './components/optionsSidebar/time-off/time-off.component'; +import { GettingStartedComponent } from './components/options-sidebar/getting-started/getting-started.component'; +import { ReportsComponent } from './components/options-sidebar/reports/reports.component'; +import { TimeClockComponent } from './components/options-sidebar/time-clock/time-clock.component'; +import { TimeEntriesComponent } from './components/options-sidebar/time-entries/time-entries.component'; +import { TimeOffComponent } from './components/options-sidebar/time-off/time-off.component'; const routes: Routes = [ diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 90e7011ee..b4a5fd970 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -7,7 +7,7 @@ import { NavbarComponent } from './components/shared/navbar/navbar.component'; import { UserComponent } from './components/shared/user/user.component'; import { SidebarComponent } from './components/shared/sidebar/sidebar.component'; import { ClockComponent } from './components/shared/clock/clock.component'; -import { TimeClockComponent } from './components/optionsSidebar/time-clock/time-clock.component'; +import { TimeClockComponent } from './components/options-sidebar/time-clock/time-clock.component'; @NgModule({ diff --git a/src/app/components/optionsSidebar/getting-started/getting-started.component.css b/src/app/components/options-sidebar/getting-started/getting-started.component.css similarity index 100% rename from src/app/components/optionsSidebar/getting-started/getting-started.component.css rename to src/app/components/options-sidebar/getting-started/getting-started.component.css diff --git a/src/app/components/optionsSidebar/getting-started/getting-started.component.html b/src/app/components/options-sidebar/getting-started/getting-started.component.html similarity index 100% rename from src/app/components/optionsSidebar/getting-started/getting-started.component.html rename to src/app/components/options-sidebar/getting-started/getting-started.component.html diff --git a/src/app/components/optionsSidebar/getting-started/getting-started.component.spec.ts b/src/app/components/options-sidebar/getting-started/getting-started.component.spec.ts similarity index 100% rename from src/app/components/optionsSidebar/getting-started/getting-started.component.spec.ts rename to src/app/components/options-sidebar/getting-started/getting-started.component.spec.ts diff --git a/src/app/components/optionsSidebar/getting-started/getting-started.component.ts b/src/app/components/options-sidebar/getting-started/getting-started.component.ts similarity index 100% rename from src/app/components/optionsSidebar/getting-started/getting-started.component.ts rename to src/app/components/options-sidebar/getting-started/getting-started.component.ts diff --git a/src/app/components/optionsSidebar/reports/reports.component.css b/src/app/components/options-sidebar/reports/reports.component.css similarity index 100% rename from src/app/components/optionsSidebar/reports/reports.component.css rename to src/app/components/options-sidebar/reports/reports.component.css diff --git a/src/app/components/optionsSidebar/reports/reports.component.html b/src/app/components/options-sidebar/reports/reports.component.html similarity index 100% rename from src/app/components/optionsSidebar/reports/reports.component.html rename to src/app/components/options-sidebar/reports/reports.component.html diff --git a/src/app/components/optionsSidebar/reports/reports.component.spec.ts b/src/app/components/options-sidebar/reports/reports.component.spec.ts similarity index 100% rename from src/app/components/optionsSidebar/reports/reports.component.spec.ts rename to src/app/components/options-sidebar/reports/reports.component.spec.ts diff --git a/src/app/components/optionsSidebar/reports/reports.component.ts b/src/app/components/options-sidebar/reports/reports.component.ts similarity index 100% rename from src/app/components/optionsSidebar/reports/reports.component.ts rename to src/app/components/options-sidebar/reports/reports.component.ts diff --git a/src/app/components/optionsSidebar/time-clock/time-clock.component.css b/src/app/components/options-sidebar/time-clock/time-clock.component.css similarity index 100% rename from src/app/components/optionsSidebar/time-clock/time-clock.component.css rename to src/app/components/options-sidebar/time-clock/time-clock.component.css diff --git a/src/app/components/optionsSidebar/time-clock/time-clock.component.html b/src/app/components/options-sidebar/time-clock/time-clock.component.html similarity index 100% rename from src/app/components/optionsSidebar/time-clock/time-clock.component.html rename to src/app/components/options-sidebar/time-clock/time-clock.component.html diff --git a/src/app/components/optionsSidebar/time-clock/time-clock.component.spec.ts b/src/app/components/options-sidebar/time-clock/time-clock.component.spec.ts similarity index 100% rename from src/app/components/optionsSidebar/time-clock/time-clock.component.spec.ts rename to src/app/components/options-sidebar/time-clock/time-clock.component.spec.ts diff --git a/src/app/components/optionsSidebar/time-clock/time-clock.component.ts b/src/app/components/options-sidebar/time-clock/time-clock.component.ts similarity index 100% rename from src/app/components/optionsSidebar/time-clock/time-clock.component.ts rename to src/app/components/options-sidebar/time-clock/time-clock.component.ts diff --git a/src/app/components/optionsSidebar/time-entries/time-entries.component.css b/src/app/components/options-sidebar/time-entries/time-entries.component.css similarity index 100% rename from src/app/components/optionsSidebar/time-entries/time-entries.component.css rename to src/app/components/options-sidebar/time-entries/time-entries.component.css diff --git a/src/app/components/optionsSidebar/time-entries/time-entries.component.html b/src/app/components/options-sidebar/time-entries/time-entries.component.html similarity index 100% rename from src/app/components/optionsSidebar/time-entries/time-entries.component.html rename to src/app/components/options-sidebar/time-entries/time-entries.component.html diff --git a/src/app/components/optionsSidebar/time-entries/time-entries.component.spec.ts b/src/app/components/options-sidebar/time-entries/time-entries.component.spec.ts similarity index 100% rename from src/app/components/optionsSidebar/time-entries/time-entries.component.spec.ts rename to src/app/components/options-sidebar/time-entries/time-entries.component.spec.ts diff --git a/src/app/components/optionsSidebar/time-entries/time-entries.component.ts b/src/app/components/options-sidebar/time-entries/time-entries.component.ts similarity index 100% rename from src/app/components/optionsSidebar/time-entries/time-entries.component.ts rename to src/app/components/options-sidebar/time-entries/time-entries.component.ts diff --git a/src/app/components/optionsSidebar/time-off/time-off.component.css b/src/app/components/options-sidebar/time-off/time-off.component.css similarity index 100% rename from src/app/components/optionsSidebar/time-off/time-off.component.css rename to src/app/components/options-sidebar/time-off/time-off.component.css diff --git a/src/app/components/optionsSidebar/time-off/time-off.component.html b/src/app/components/options-sidebar/time-off/time-off.component.html similarity index 100% rename from src/app/components/optionsSidebar/time-off/time-off.component.html rename to src/app/components/options-sidebar/time-off/time-off.component.html diff --git a/src/app/components/optionsSidebar/time-off/time-off.component.spec.ts b/src/app/components/options-sidebar/time-off/time-off.component.spec.ts similarity index 100% rename from src/app/components/optionsSidebar/time-off/time-off.component.spec.ts rename to src/app/components/options-sidebar/time-off/time-off.component.spec.ts diff --git a/src/app/components/optionsSidebar/time-off/time-off.component.ts b/src/app/components/options-sidebar/time-off/time-off.component.ts similarity index 100% rename from src/app/components/optionsSidebar/time-off/time-off.component.ts rename to src/app/components/options-sidebar/time-off/time-off.component.ts From 7ca2d8545bef38de3c73ed2a96068b08dcca6cfb Mon Sep 17 00:00:00 2001 From: daros10 Date: Mon, 16 Mar 2020 09:47:36 -0500 Subject: [PATCH 05/16] resize button --- .../options-sidebar/time-clock/time-clock.component.html | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 3e43c39ef..f384b5d96 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,5 +1,4 @@
-
@@ -82,8 +81,8 @@
Projects
- - + +
From e0ed4b8036ba5f5e4293474e5c8699d0329d9b41 Mon Sep 17 00:00:00 2001 From: daros10 Date: Mon, 16 Mar 2020 19:42:50 -0500 Subject: [PATCH 06/16] change tags name --- .../getting-started.component.spec.ts | 4 ++-- .../reports/reports.component.spec.ts | 21 +++++++++++++++++-- .../time-clock/time-clock.component.spec.ts | 4 ++-- .../time-entries.component.spec.ts | 4 ++-- .../time-off/time-off.component.spec.ts | 18 +++++++++++++++- 5 files changed, 42 insertions(+), 9 deletions(-) diff --git a/src/app/components/options-sidebar/getting-started/getting-started.component.spec.ts b/src/app/components/options-sidebar/getting-started/getting-started.component.spec.ts index 5bb8ecb36..bff58d1a2 100644 --- a/src/app/components/options-sidebar/getting-started/getting-started.component.spec.ts +++ b/src/app/components/options-sidebar/getting-started/getting-started.component.spec.ts @@ -35,8 +35,8 @@ describe('GettingStartedComponent', () => { const { app, fixture } = setup(); fixture.detectChanges(); const compile = fixture.debugElement.nativeElement; - const h1tag = compile.querySelector('p'); - expect(h1tag.textContent).toBe('getting-started works!'); + const ptag = compile.querySelector('p'); + expect(ptag.textContent).toBe('getting-started works!'); })); diff --git a/src/app/components/options-sidebar/reports/reports.component.spec.ts b/src/app/components/options-sidebar/reports/reports.component.spec.ts index 0c7a3d220..f2f2f33e7 100644 --- a/src/app/components/options-sidebar/reports/reports.component.spec.ts +++ b/src/app/components/options-sidebar/reports/reports.component.spec.ts @@ -6,6 +6,13 @@ describe('ReportsComponent', () => { let component: ReportsComponent; let fixture: ComponentFixture; + function setup() { + // tslint:disable-next-line: no-shadowed-variable + const fixture = TestBed.createComponent(ReportsComponent); + const app = fixture.debugElement.componentInstance; + return { fixture, app }; + } + beforeEach(async(() => { TestBed.configureTestingModule({ declarations: [ ReportsComponent ] @@ -19,7 +26,17 @@ describe('ReportsComponent', () => { fixture.detectChanges(); }); - it('should create', () => { + it('should be created', () => { expect(component).toBeTruthy(); }); -}); + + it('should have p tag as \'reports works!\'', async(() => { + // tslint:disable-next-line: no-shadowed-variable + const { app, fixture } = setup(); + fixture.detectChanges(); + const compile = fixture.debugElement.nativeElement; + const ptag = compile.querySelector('p'); + expect(ptag.textContent).toBe('reports works!'); + })); + +}); \ No newline at end of file diff --git a/src/app/components/options-sidebar/time-clock/time-clock.component.spec.ts b/src/app/components/options-sidebar/time-clock/time-clock.component.spec.ts index 5d211697d..dd751df08 100644 --- a/src/app/components/options-sidebar/time-clock/time-clock.component.spec.ts +++ b/src/app/components/options-sidebar/time-clock/time-clock.component.spec.ts @@ -35,8 +35,8 @@ describe('TimeClockComponent', () => { const { app, fixture } = setup(); fixture.detectChanges(); const compile = fixture.debugElement.nativeElement; - const h1tag = compile.querySelector('p'); - expect(h1tag.textContent).toBe('time-clock works!'); + const ptag = compile.querySelector('p'); + expect(ptag.textContent).toBe('time-clock works!'); })); }); diff --git a/src/app/components/options-sidebar/time-entries/time-entries.component.spec.ts b/src/app/components/options-sidebar/time-entries/time-entries.component.spec.ts index 6d98e2515..304646888 100644 --- a/src/app/components/options-sidebar/time-entries/time-entries.component.spec.ts +++ b/src/app/components/options-sidebar/time-entries/time-entries.component.spec.ts @@ -35,8 +35,8 @@ describe('TimeEntriesComponent', () => { const { app, fixture } = setup(); fixture.detectChanges(); const compile = fixture.debugElement.nativeElement; - const h1tag = compile.querySelector('p'); - expect(h1tag.textContent).toBe('time-entries works!'); + const ptag = compile.querySelector('p'); + expect(ptag.textContent).toBe('time-entries works!'); })); }); \ No newline at end of file diff --git a/src/app/components/options-sidebar/time-off/time-off.component.spec.ts b/src/app/components/options-sidebar/time-off/time-off.component.spec.ts index 66b7d9fd0..8aa6ed544 100644 --- a/src/app/components/options-sidebar/time-off/time-off.component.spec.ts +++ b/src/app/components/options-sidebar/time-off/time-off.component.spec.ts @@ -6,6 +6,13 @@ describe('TimeOffComponent', () => { let component: TimeOffComponent; let fixture: ComponentFixture; + function setup() { + // tslint:disable-next-line: no-shadowed-variable + const fixture = TestBed.createComponent(TimeOffComponent); + const app = fixture.debugElement.componentInstance; + return { fixture, app }; + } + beforeEach(async(() => { TestBed.configureTestingModule({ declarations: [ TimeOffComponent ] @@ -19,7 +26,16 @@ describe('TimeOffComponent', () => { fixture.detectChanges(); }); - it('should create', () => { + it('should be created', () => { expect(component).toBeTruthy(); }); + + it('should have p tag as \'time-off works!\'', async(() => { + // tslint:disable-next-line: no-shadowed-variable + const { app, fixture } = setup(); + fixture.detectChanges(); + const compile = fixture.debugElement.nativeElement; + const ptag = compile.querySelector('p'); + expect(ptag.textContent).toBe('time-off works!'); + })); }); From 26554fbeb282c10167310a402730ad0a7fbd2ed1 Mon Sep 17 00:00:00 2001 From: daros10 Date: Mon, 16 Mar 2020 20:54:25 -0500 Subject: [PATCH 07/16] added validations in form --- .../time-clock/time-clock.component.html | 11 +++++++--- .../time-clock/time-clock.component.ts | 22 ++++++++++++++++++- 2 files changed, 29 insertions(+), 4 deletions(-) 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 f384b5d96..eb7b7e4dc 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,4 +1,8 @@
+ +
@@ -12,7 +16,8 @@
-

Dario clocked out at hh:mm:ss

+

Dario clocked in at hh:mm:ss

+

Dario clocked out at hh:mm:ss

Totals

@@ -68,7 +73,7 @@
Projects
- +
@@ -82,7 +87,7 @@
Projects
- +
diff --git a/src/app/components/options-sidebar/time-clock/time-clock.component.ts b/src/app/components/options-sidebar/time-clock/time-clock.component.ts index 99e8a2ea0..3c2134aed 100644 --- a/src/app/components/options-sidebar/time-clock/time-clock.component.ts +++ b/src/app/components/options-sidebar/time-clock/time-clock.component.ts @@ -8,14 +8,34 @@ import { Component, OnInit } from '@angular/core'; export class TimeClockComponent { isClockIn: boolean; + isEnterTechnology: boolean; + showAlertEnterTecnology: boolean; constructor() { this.isClockIn = true; + this.isEnterTechnology = false; } employeClockIn(): boolean { this.isClockIn = !this.isClockIn; - console.log('valor es' + this.isClockIn); return this.isClockIn; } + + employeClockOut() { + if ( this.isEnterTechnology === false ) { + this.isClockIn = false; + this.showAlertEnterTecnology = true; + } else { + this.isClockIn = true; + this.showAlertEnterTecnology = false; + } + } + + enterTechnology(data: string) { + if ( data.length > 0 ) { + this.isEnterTechnology = true; + } else { + this.isEnterTechnology = false; + } + } } From 7a87d471904dfcafe219952bad31253e363f42e3 Mon Sep 17 00:00:00 2001 From: daros10 Date: Mon, 16 Mar 2020 21:04:50 -0500 Subject: [PATCH 08/16] added interpolation in vars --- .../options-sidebar/time-clock/time-clock.component.html | 4 ++-- .../options-sidebar/time-clock/time-clock.component.ts | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) 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 eb7b7e4dc..dde0a1bf2 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 @@ -16,8 +16,8 @@
-

Dario clocked in at hh:mm:ss

-

Dario clocked out at hh:mm:ss

+

{{ username }} clocked in at {{ clockInUsername }}

+

{{ username }} clocked out at {{ clockOutUsername }}

Totals

diff --git a/src/app/components/options-sidebar/time-clock/time-clock.component.ts b/src/app/components/options-sidebar/time-clock/time-clock.component.ts index 3c2134aed..85106481a 100644 --- a/src/app/components/options-sidebar/time-clock/time-clock.component.ts +++ b/src/app/components/options-sidebar/time-clock/time-clock.component.ts @@ -7,6 +7,10 @@ import { Component, OnInit } from '@angular/core'; }) export class TimeClockComponent { + username = 'Dario'; + clockInUsername = 'hh:mm:ss'; + clockOutUsername = 'hh:mm:ss'; + isClockIn: boolean; isEnterTechnology: boolean; showAlertEnterTecnology: boolean; From b402f4057a2a45b7b5642bb6a6962114998d351d Mon Sep 17 00:00:00 2001 From: daros10 Date: Mon, 16 Mar 2020 21:07:06 -0500 Subject: [PATCH 09/16] added validation clock out --- .../options-sidebar/time-clock/time-clock.component.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/components/options-sidebar/time-clock/time-clock.component.ts b/src/app/components/options-sidebar/time-clock/time-clock.component.ts index 85106481a..c152e0ee6 100644 --- a/src/app/components/options-sidebar/time-clock/time-clock.component.ts +++ b/src/app/components/options-sidebar/time-clock/time-clock.component.ts @@ -31,6 +31,7 @@ export class TimeClockComponent { this.showAlertEnterTecnology = true; } else { this.isClockIn = true; + this.isEnterTechnology = false; this.showAlertEnterTecnology = false; } } From c34f9fafe346e0dcb334745971962c4b64e3ab4e Mon Sep 17 00:00:00 2001 From: daros10 Date: Mon, 16 Mar 2020 21:21:49 -0500 Subject: [PATCH 10/16] added unit test --- .../options-sidebar/time-clock/time-clock.component.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/components/options-sidebar/time-clock/time-clock.component.spec.ts b/src/app/components/options-sidebar/time-clock/time-clock.component.spec.ts index dd751df08..3487ccce0 100644 --- a/src/app/components/options-sidebar/time-clock/time-clock.component.spec.ts +++ b/src/app/components/options-sidebar/time-clock/time-clock.component.spec.ts @@ -30,13 +30,13 @@ describe('TimeClockComponent', () => { expect(component).toBeTruthy(); }); - it('should have p tag as \'time-clock works!\'', async(() => { + it('should have p tag as \'Dario clocked out at hh:mm:ss\'', async(() => { // tslint:disable-next-line: no-shadowed-variable const { app, fixture } = setup(); fixture.detectChanges(); const compile = fixture.debugElement.nativeElement; const ptag = compile.querySelector('p'); - expect(ptag.textContent).toBe('time-clock works!'); + expect(ptag.textContent).toBe('Dario clocked out at hh:mm:ss'); })); }); From 65b5195447ebbc509497bfdc3ea8be9d250d46f9 Mon Sep 17 00:00:00 2001 From: daros10 Date: Mon, 16 Mar 2020 22:34:54 -0500 Subject: [PATCH 11/16] added timer --- .../time-clock/time-clock.component.html | 2 +- .../time-clock/time-clock.component.ts | 41 +++++++++++++++++-- .../shared/clock/clock.component.ts | 16 ++++++-- 3 files changed, 51 insertions(+), 8 deletions(-) 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 dde0a1bf2..706c4eae5 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 @@ -23,7 +23,7 @@
Totals
Current
-

-

+

{{ hour | number: '2.0-2' }}:{{ minute | number: '2.0-2' }}:{{ seconds | number: '2.0-2' }}

Day
diff --git a/src/app/components/options-sidebar/time-clock/time-clock.component.ts b/src/app/components/options-sidebar/time-clock/time-clock.component.ts index c152e0ee6..042df381c 100644 --- a/src/app/components/options-sidebar/time-clock/time-clock.component.ts +++ b/src/app/components/options-sidebar/time-clock/time-clock.component.ts @@ -1,27 +1,38 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, OnDestroy } from '@angular/core'; +import { interval, timer } from 'rxjs'; + @Component({ selector: 'app-time-clock', templateUrl: './time-clock.component.html', styleUrls: ['./time-clock.component.css'] }) -export class TimeClockComponent { +export class TimeClockComponent implements OnInit { username = 'Dario'; clockInUsername = 'hh:mm:ss'; clockOutUsername = 'hh:mm:ss'; - isClockIn: boolean; isEnterTechnology: boolean; showAlertEnterTecnology: boolean; + hour: number; + minute: number; + seconds: number; + + public timer; + constructor() { this.isClockIn = true; this.isEnterTechnology = false; + this.hour = 0; + this.minute = 0; + this.seconds = 0; } employeClockIn(): boolean { this.isClockIn = !this.isClockIn; + this.enableTimer(); return this.isClockIn; } @@ -33,6 +44,7 @@ export class TimeClockComponent { this.isClockIn = true; this.isEnterTechnology = false; this.showAlertEnterTecnology = false; + console.log('Disble Timer'); } } @@ -43,4 +55,27 @@ export class TimeClockComponent { this.isEnterTechnology = false; } } + + enableTimer() { + this.timer = interval(1000); + this.timer.subscribe( (data) => { + this.seconds += 1; + if ( this.seconds === 59 ) { + this.minute += 1; + this.seconds = 0; + if ( this.minute === 59 ) { + this.hour += 1; + this.minute = 0; + } + } + // console.log(this.hour + ' : ' + this.minute + ' : ' + this.seconds); + }); + + } + + + ngOnInit(): void { + } + + } diff --git a/src/app/components/shared/clock/clock.component.ts b/src/app/components/shared/clock/clock.component.ts index cf8f474d4..02ecb96ef 100644 --- a/src/app/components/shared/clock/clock.component.ts +++ b/src/app/components/shared/clock/clock.component.ts @@ -1,4 +1,5 @@ import { Component, OnInit } from '@angular/core'; +import { interval, timer } from 'rxjs'; @Component({ selector: 'app-clock', @@ -14,16 +15,23 @@ export class ClockComponent implements OnInit { displayTime: boolean; constructor() { - this.currentDate = new Date(); - this.hour = this.currentDate.getHours(); - this.minutes = this.currentDate.getMinutes(); - this.seconds = this.currentDate.getSeconds(); + this.showClcok(); this.displayTime = false; setTimeout(() => { this.displayTime = true; }, 3000); } + showClcok() { + const timer = interval(1000); + timer.subscribe( (data) => { + this.currentDate = new Date(); + this.hour = this.currentDate.getHours(); + this.minutes = this.currentDate.getMinutes(); + this.seconds = this.currentDate.getSeconds(); + } ); + } + ngOnInit(): void { } From ec2d162081c491ac91efa2af4cd3cdfd721ef694 Mon Sep 17 00:00:00 2001 From: daros10 Date: Tue, 17 Mar 2020 11:08:13 -0500 Subject: [PATCH 12/16] added test for clock --- .../time-clock/time-clock.component.ts | 26 ------------------- .../shared/clock/clock.component.spec.ts | 12 +++++++++ .../shared/clock/clock.component.ts | 8 +++--- 3 files changed, 16 insertions(+), 30 deletions(-) diff --git a/src/app/components/options-sidebar/time-clock/time-clock.component.ts b/src/app/components/options-sidebar/time-clock/time-clock.component.ts index 042df381c..cbba5580d 100644 --- a/src/app/components/options-sidebar/time-clock/time-clock.component.ts +++ b/src/app/components/options-sidebar/time-clock/time-clock.component.ts @@ -1,6 +1,4 @@ import { Component, OnInit, OnDestroy } from '@angular/core'; -import { interval, timer } from 'rxjs'; - @Component({ selector: 'app-time-clock', @@ -15,13 +13,10 @@ export class TimeClockComponent implements OnInit { isClockIn: boolean; isEnterTechnology: boolean; showAlertEnterTecnology: boolean; - hour: number; minute: number; seconds: number; - public timer; - constructor() { this.isClockIn = true; this.isEnterTechnology = false; @@ -32,7 +27,6 @@ export class TimeClockComponent implements OnInit { employeClockIn(): boolean { this.isClockIn = !this.isClockIn; - this.enableTimer(); return this.isClockIn; } @@ -44,7 +38,6 @@ export class TimeClockComponent implements OnInit { this.isClockIn = true; this.isEnterTechnology = false; this.showAlertEnterTecnology = false; - console.log('Disble Timer'); } } @@ -56,26 +49,7 @@ export class TimeClockComponent implements OnInit { } } - enableTimer() { - this.timer = interval(1000); - this.timer.subscribe( (data) => { - this.seconds += 1; - if ( this.seconds === 59 ) { - this.minute += 1; - this.seconds = 0; - if ( this.minute === 59 ) { - this.hour += 1; - this.minute = 0; - } - } - // console.log(this.hour + ' : ' + this.minute + ' : ' + this.seconds); - }); - - } - - ngOnInit(): void { } - } diff --git a/src/app/components/shared/clock/clock.component.spec.ts b/src/app/components/shared/clock/clock.component.spec.ts index 22d176fcc..761908de4 100644 --- a/src/app/components/shared/clock/clock.component.spec.ts +++ b/src/app/components/shared/clock/clock.component.spec.ts @@ -6,6 +6,7 @@ describe('ClockComponent', () => { let component: ClockComponent; let fixture: ComponentFixture; + beforeEach(async(() => { TestBed.configureTestingModule({ declarations: [ ClockComponent ] @@ -22,4 +23,15 @@ describe('ClockComponent', () => { it('should create', () => { expect(component).toBeTruthy(); }); + + it('should show the current hour of day', () => { + const currentHour = 11; + expect(component.currentDate.getHours()).toEqual(currentHour); + }); + + it('should show the current minutes of day', () => { + const currenMinutes = 5; + expect(component.currentDate.getMinutes()).toEqual(currenMinutes); + }); + }); diff --git a/src/app/components/shared/clock/clock.component.ts b/src/app/components/shared/clock/clock.component.ts index 02ecb96ef..0eea6b977 100644 --- a/src/app/components/shared/clock/clock.component.ts +++ b/src/app/components/shared/clock/clock.component.ts @@ -8,7 +8,7 @@ import { interval, timer } from 'rxjs'; }) export class ClockComponent implements OnInit { - currentDate: Date; + currentDate: Date = new Date(); hour: number; minutes: number; seconds: number; @@ -23,13 +23,13 @@ export class ClockComponent implements OnInit { } showClcok() { - const timer = interval(1000); - timer.subscribe( (data) => { + const timenInterval = interval(1000); + timenInterval.subscribe( (data) => { this.currentDate = new Date(); this.hour = this.currentDate.getHours(); this.minutes = this.currentDate.getMinutes(); this.seconds = this.currentDate.getSeconds(); - } ); + }); } ngOnInit(): void { From 8556927416dce08962a418ccd82b7a483600c251 Mon Sep 17 00:00:00 2001 From: daros10 Date: Tue, 17 Mar 2020 11:21:43 -0500 Subject: [PATCH 13/16] use back-ticks --- src/app/app.module.ts | 1 - .../time-clock/time-clock.component.spec.ts | 17 ++++++++--------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 1c7f95523..d211b1109 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -14,7 +14,6 @@ import { TimeClockComponent } from './components/options-sidebar/time-clock/time import { ProjectManagementComponent } from './components/options-sidebar/project-management/project-management.component'; import { ProjectListComponent } from './components/shared/project-list/project-list.component'; import { CreateProjectComponent } from './components/shared/create-project/create-project.component'; -import { TimeClockComponent } from './components/options-sidebar/time-clock/time-clock.component'; import { DetailsFieldsComponent } from './components/shared/details-fields/details-fields.component'; import { ProjectListHoverComponent } from './components/shared/project-list-hover/project-list-hover.component'; diff --git a/src/app/components/options-sidebar/time-clock/time-clock.component.spec.ts b/src/app/components/options-sidebar/time-clock/time-clock.component.spec.ts index ba434e059..4927e4433 100644 --- a/src/app/components/options-sidebar/time-clock/time-clock.component.spec.ts +++ b/src/app/components/options-sidebar/time-clock/time-clock.component.spec.ts @@ -1,11 +1,10 @@ -import { async, ComponentFixture, TestBed } from "@angular/core/testing"; -import { By } from "@angular/platform-browser"; -import { DebugElement } from "@angular/core"; +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { By } from '@angular/platform-browser'; +import { DebugElement } from '@angular/core'; +import { TimeClockComponent } from './time-clock.component'; +import { ProjectListHoverComponent } from '../../shared/project-list-hover/project-list-hover.component'; -import { TimeClockComponent } from "./time-clock.component"; -import { ProjectListHoverComponent } from "../../shared/project-list-hover/project-list-hover.component"; - -describe("TimeClockComponent", () => { +describe('TimeClockComponent', () => { let component: TimeClockComponent; let fixture: ComponentFixture; let de: DebugElement; @@ -30,7 +29,7 @@ describe("TimeClockComponent", () => { fixture.detectChanges(); }); - it("should be created", () => { + it('should be created', () => { expect(component).toBeTruthy(); }); @@ -43,7 +42,7 @@ describe("TimeClockComponent", () => { expect(ptag.textContent).toBe('Dario clocked out at hh:mm:ss'); })); - it("should set showfileds as true", () => { + it('should set showfileds as true', () => { const show = true; component.setShowFields(show); expect(component.showFields).toBe(true); From f0c823d8af99164ef5a5ea6d3b11a73553372d40 Mon Sep 17 00:00:00 2001 From: daros10 Date: Wed, 18 Mar 2020 10:00:56 -0500 Subject: [PATCH 14/16] added clockIn in hover --- .../options-sidebar/time-clock/time-clock.component.html | 3 --- .../options-sidebar/time-clock/time-clock.component.ts | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) 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 b0bbe49ec..0b293f4d0 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 @@ -42,10 +42,7 @@
Projects

Top

    - - -

diff --git a/src/app/components/options-sidebar/time-clock/time-clock.component.ts b/src/app/components/options-sidebar/time-clock/time-clock.component.ts index 4176e7a15..598e022cf 100644 --- a/src/app/components/options-sidebar/time-clock/time-clock.component.ts +++ b/src/app/components/options-sidebar/time-clock/time-clock.component.ts @@ -53,6 +53,7 @@ export class TimeClockComponent implements OnInit { } setShowFields(show: boolean) { + this.isClockIn = !this.isClockIn; this.showFields = show; } From d097ab15c8483c7ddcb80386fbd4fe39d9d06cf5 Mon Sep 17 00:00:00 2001 From: daros10 Date: Wed, 18 Mar 2020 10:05:15 -0500 Subject: [PATCH 15/16] change value in hover --- .../options-sidebar/time-clock/time-clock.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/components/options-sidebar/time-clock/time-clock.component.ts b/src/app/components/options-sidebar/time-clock/time-clock.component.ts index 598e022cf..126859216 100644 --- a/src/app/components/options-sidebar/time-clock/time-clock.component.ts +++ b/src/app/components/options-sidebar/time-clock/time-clock.component.ts @@ -53,7 +53,7 @@ export class TimeClockComponent implements OnInit { } setShowFields(show: boolean) { - this.isClockIn = !this.isClockIn; + this.isClockIn = false; this.showFields = show; } From 2e0bc6b494f5eb0234151e172c43100b92c2c324 Mon Sep 17 00:00:00 2001 From: daros10 Date: Wed, 18 Mar 2020 10:26:22 -0500 Subject: [PATCH 16/16] remove spaces --- .../options-sidebar/time-clock/time-clock.component.html | 6 ++++-- .../options-sidebar/time-clock/time-clock.component.ts | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) 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 0b293f4d0..d92c43de2 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,4 +1,5 @@
+ @@ -45,7 +46,7 @@
Projects

- +
@@ -80,4 +81,5 @@
Projects
-
\ No newline at end of file +
+
\ No newline at end of file diff --git a/src/app/components/options-sidebar/time-clock/time-clock.component.ts b/src/app/components/options-sidebar/time-clock/time-clock.component.ts index 126859216..2a9c9a7f6 100644 --- a/src/app/components/options-sidebar/time-clock/time-clock.component.ts +++ b/src/app/components/options-sidebar/time-clock/time-clock.component.ts @@ -6,6 +6,7 @@ import { Component, OnInit } from '@angular/core'; styleUrls: ['./time-clock.component.css'] }) export class TimeClockComponent implements OnInit { + projects = [ { id: 'P1', name: 'Project 1' }, { id: 'P2', name: 'Project 2' }, @@ -13,8 +14,6 @@ export class TimeClockComponent implements OnInit { { id: 'P4', name: 'Project 4' } ]; - showFields: boolean; - username = 'Dario'; clockInUsername = 'hh:mm:ss'; clockOutUsername = 'hh:mm:ss'; @@ -22,6 +21,7 @@ export class TimeClockComponent implements OnInit { isClockIn: boolean; isEnterTechnology: boolean; showAlertEnterTecnology: boolean; + showFields: boolean; constructor() { this.isClockIn = true;