Skip to content

Commit f4b586c

Browse files
committed
#3 added search in time clock view
1 parent 56247f6 commit f4b586c

File tree

3 files changed

+7
-15
lines changed

3 files changed

+7
-15
lines changed

src/app/components/options-sidebar/time-clock/time-clock.component.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ <h3>00:00</h3>
3131
</div>
3232
</div>
3333
<h6 class="text-left"><strong>Projects</strong></h6>
34-
<app-search-project></app-search-project>
3534
<p class="text-left"><i class="fas fa-folder"></i><strong> Top</strong></p>
3635
<ul class="list-group">
3736
<app-project-list-hover [projects]="projects" (showFields)="setShowFields($event)"></app-project-list-hover>
Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,9 @@
1+
<app-search-project (changeFilterProject)="filterProjects = $event"></app-search-project>
12
<ul class="list-group content-projects">
2-
<li
3-
class="list-group-item list-group-item-action d-flex justify-content-between align-items-center"
4-
*ngFor="let item of projects; let i = index"
5-
(mouseenter)="showButton = i"
6-
(mouseleave)="showButton = -1"
7-
(click)="clockIn(item.id)"
8-
[ngClass]="{ active: selectedId === item.id }"
9-
>
10-
{{ item.name }}
11-
<span
12-
*ngIf="showButton === i && selectedId !== item.id"
13-
class="badge badge-light"
14-
>Clock In</span
3+
<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)"
4+
[ngClass]="{ active: selectedId === item.id }">
5+
{{ item.name }}
6+
<span *ngIf="showButton === i && selectedId !== item.id" class="badge badge-light">Clock In</span
157
>
168
</li>
17-
</ul>
9+
</ul>

src/app/components/shared/project-list-hover/project-list-hover.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export class ProjectListHoverComponent implements OnInit {
1111

1212
selectedId: string;
1313
showButton: number;
14+
filterProjects = '';
1415

1516
constructor() {
1617
this.showButton = -1;

0 commit comments

Comments
 (0)