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
Next Next commit
Merge branch 'master' of https://github.com/ioet/time-tracker-ui into…
… Time_Clock-Clock-In
  • Loading branch information
daros10 committed Mar 18, 2020
commit 03e8fa152ac787aadee52f03e8bdcabb089d4542
3 changes: 3 additions & 0 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ 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 { DetailsFieldsComponent } from './components/shared/details-fields/details-fields.component';
import { ProjectListHoverComponent } from './components/shared/project-list-hover/project-list-hover.component';


@NgModule({
declarations: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,13 @@ <h6 class="text-left"><strong>Projects</strong></h6>
</form>
<p class="text-left"><i class="fas fa-folder"></i><strong> Top</strong></p>
<ul class="list-group">
<li class="list-group-item d-flex justify-content-between align-items-center">
Customer › ernst-and-young
<button type="button" class="btn btn-success btn-sm">Clock In</button>
</li>
<li class="list-group-item d-flex justify-content-between align-items-center">
Customer
<i class="fas fa-chevron-right"></i>

</li>
<li class="list-group-item d-flex justify-content-between align-items-center">
Training
<i class="fas fa-chevron-right"></i>
</li>
<app-project-list-hover [projects]="projects" (showFields)="setShowFields($event)"></app-project-list-hover>


</ul>
<br>
<form *ngIf="!isClockIn">
<form *ngIf="!isClockIn || showFields ">
<div class="form-group row">
<label for="inputActivity" class="col-sm-2 col-form-label text-center"><strong>Activity</strong></label>
<div class="col-sm-10">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
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<TimeClockComponent>;
let de: DebugElement;
Expand All @@ -30,7 +30,7 @@ describe("TimeClockComponent", () => {
fixture.detectChanges();
});

it("should be created", () => {
it('should be created', () => {
expect(component).toBeTruthy();
});

Expand All @@ -41,9 +41,10 @@ describe("TimeClockComponent", () => {
const compile = fixture.debugElement.nativeElement;
const ptag = compile.querySelector('p');
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);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
import { Component, OnInit } from "@angular/core";
import { Component, OnInit } from '@angular/core';

@Component({
selector: "app-time-clock",
templateUrl: "./time-clock.component.html",
styleUrls: ["./time-clock.component.css"]
selector: 'app-time-clock',
templateUrl: './time-clock.component.html',
styleUrls: ['./time-clock.component.css']
})
export class TimeClockComponent {
export class TimeClockComponent implements OnInit {
projects = [
{ id: 'P1', name: 'Project 1' },
{ id: 'P2', name: 'Project 2' },
{ id: 'P3', name: 'Project 3' },
{ id: 'P4', name: 'Project 4' }
];

showFields: boolean;

username = 'Dario';
clockInUsername = 'hh:mm:ss';
Expand Down Expand Up @@ -43,4 +51,10 @@ export class TimeClockComponent {
this.isEnterTechnology = false;
}
}

setShowFields(show: boolean) {
this.showFields = show;
}

ngOnInit(): void {}
}
You are viewing a condensed version of this merge commit. You can view the full changes here.