-
Notifications
You must be signed in to change notification settings - Fork 1
#3-Time clock find project #54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… Time-Clock-Timer-Component
… TimeClock-find-project-#3
…ime-tracker-ui into TimeClock-find-project-#3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should only see in "app-project-list-hover" an active projects list but I can see all projects.
@@ -0,0 +1,3 @@ | |||
<div class="form-group"> | |||
<input (keyup)="changeFilterValue()" type="text" class="form-control" placeholder=" Search project" name="filterProject" [(ngModel)]="filterProject" style="font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif, FontAwesome"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, fix the indentation, remember that we are using an indentation based in 2 spaces.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
<div class="card" *ngFor="let project of projects | filterProject:filterProjects; let rowIndex = index"> | ||
<div class="card-header"> | ||
<h2 class="mb-0"> | ||
<a type="button" data-toggle="collapse" [attr.data-target]="'#row'+rowIndex" [attr.aria-controls]="'row'+rowIndex"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, fix the indentation, remember that we are using an indentation based in 2 spaces.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
*ngIf="showButton === i && selectedId !== item.id" | ||
class="badge badge-light" | ||
>Clock In</span | ||
<li class="list-group-item list-group-item-action d-flex justify-content-between align-items-center" *ngFor="let item of projects | filterProject:filterProjects; let i = index" (mouseenter)="showButton = i" (mouseleave)="showButton = -1" (click)="clockIn(item.id)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, fix the indentation, remember that we are using an indentation based in 2 spaces.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -99,8 +99,9 @@ export class TimeClockComponent implements OnInit { | |||
timer() { | |||
this.secondsCounterRealTime += 1; | |||
if ( this.secondsCounterRealTime === 59 ) { | |||
this.minuteCounterRealTime += 1; | |||
this.secondsCounterRealTime = 0; | |||
console.log('entroooo'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove console log please.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
<div class="col-10 text-right"> | ||
<i class="far fa-question-circle"></i> | ||
<div class="text-center mt-5"> | ||
<div class="card"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, fix the indentation, remember that we are using an indentation based in 2 spaces.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
</app-project-list> | ||
</div> | ||
<app-create-project class="item" [projectToEdit]="project" (savedProject)="updateProject($event)" (cancelForm)="cancelForm()"> | ||
</app-create-project> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please, fix the indentation, remember that we are using an indentation based in 2 spaces.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -197,6 +198,13 @@ describe('TimeClockComponent', () => { | |||
expect(component.secondsCounterRealTime).not.toEqual(0); | |||
}); | |||
|
|||
it('inside timer first if' , () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand what this test is doing?
Could you please explain what are you testing here?
|
||
employeClockIn(): boolean { | ||
this.isClockInEnable = true; | ||
this.isClockIn = !this.isClockIn; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this.isClockIn = true; ???
this.isHidenForm = false; | ||
this.startTimer(); | ||
this.setArrivalAndDepartureTimes(); | ||
return this.isClockIn; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are you returning a value here?
I think the intention of this function is to notify the user has clicked on clock-in, right?
} | ||
|
||
employeClockOut() { | ||
if (this.isEnterTechnology === false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since users can enter more than one technologies, you should rename this var to:
this.areTechnologiesEntered
} | ||
} | ||
|
||
enterTechnology(data: string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the intention of this function?
@@ -45,4 +45,18 @@ describe('ClockComponent', () => { | |||
expect(component.showClock).toHaveBeenCalled(); | |||
}); | |||
|
|||
it('should be verify the init state of vars' , () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what are you testing here?
expect(component.displayTime).toBeFalsy(); | ||
}); | ||
|
||
it('should enter if and assign the value to vars' , () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what are you testing here?
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 ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This if statement should be tested since this is the logic we want to make sure it's working.
expect(component).toBeTruthy(); | ||
}); | ||
|
||
it('called method' , () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what are you testing here?
<a [routerLink]="['/project-management']" routerLinkActive="dark" class="list-group-item list-group-item-action bg-light"><i class="far fa-folder-open"></i> Projects</a> | ||
<a [routerLink]="['/activities-management']" routerLinkActive="dark" class="list-group-item list-group-item-action bg-light"><i class="far fa-file-alt"></i> Activities</a> | ||
</div> | ||
<!-- Sidebar --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rebase your branch against master. This code has been already updated.
This PR contains the functionality to search for projects in Time Clock and Prjocte views.