Skip to content
Prev Previous commit
Next Next commit
#3 added search in time clock view
  • Loading branch information
daros10 committed Mar 27, 2020
commit f4b586c52fb7dd5cc707409d1416962631c803b9
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ <h3>00:00</h3>
</div>
</div>
<h6 class="text-left"><strong>Projects</strong></h6>
<app-search-project></app-search-project>
<p class="text-left"><i class="fas fa-folder"></i><strong> Top</strong></p>
<ul class="list-group">
<app-project-list-hover [projects]="projects" (showFields)="setShowFields($event)"></app-project-list-hover>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
<app-search-project (changeFilterProject)="filterProjects = $event"></app-search-project>
<ul class="list-group content-projects">
<li
class="list-group-item list-group-item-action d-flex justify-content-between align-items-center"
*ngFor="let item of projects; let i = index"
(mouseenter)="showButton = i"
(mouseleave)="showButton = -1"
(click)="clockIn(item.id)"
[ngClass]="{ active: selectedId === item.id }"
>
{{ item.name }}
<span
*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

[ngClass]="{ active: selectedId === item.id }">
{{ item.name }}
<span *ngIf="showButton === i && selectedId !== item.id" class="badge badge-light">Clock In</span
>
</li>
</ul>
</ul>
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export class ProjectListHoverComponent implements OnInit {

selectedId: string;
showButton: number;
filterProjects = '';

constructor() {
this.showButton = -1;
Expand Down