Skip to content

Conversation

daros10
Copy link
Contributor

@daros10 daros10 commented Mar 28, 2020

This PR contains the functionality to search for projects in Time Clock and Prjocte views.

Copy link
Contributor

@macrisguncay macrisguncay left a 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="&#xF002; Search project" name="filterProject" [(ngModel)]="filterProject" style="font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif, FontAwesome">
Copy link
Contributor

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.

Copy link
Contributor Author

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">
Copy link
Contributor

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.

Copy link
Contributor Author

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)"
Copy link
Contributor

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.

Copy link
Contributor Author

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');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove console log please.

Copy link
Contributor Author

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">
Copy link
Contributor

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.

Copy link
Contributor Author

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>
Copy link
Contributor

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.

Copy link
Contributor Author

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' , () => {
Copy link
Contributor

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;
Copy link
Contributor

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;
Copy link
Contributor

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) {
Copy link
Contributor

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) {
Copy link
Contributor

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' , () => {
Copy link
Contributor

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' , () => {
Copy link
Contributor

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 ) {
Copy link
Contributor

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' , () => {
Copy link
Contributor

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 -->
Copy link
Contributor

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.

@daros10 daros10 closed this Mar 31, 2020
@daros10 daros10 deleted the TimeClock-find-project-#3 branch March 31, 2020 01:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants