feat(search): implement search functionality for employees

This commit is contained in:
Jan K9f 2025-01-15 13:29:30 +01:00
parent 9219b92049
commit d80f98f2a0
Signed by: jank
GPG key ID: 50620ADD22CD330B
3 changed files with 42 additions and 9 deletions

View file

@ -13,10 +13,13 @@
</div>
<div class="header-actions">
<div class="search-bar">
<input type="text" placeholder="Search employee">
<button>Search</button>
</div>
<form [formGroup]="searchForm">
<div class="search-bar">
<input type="text" placeholder="Search employee" formControlName="search">
<button (click)="submit()">Search</button>
</div>
<p class="text-body-tertiary">Search for a propertiy of an Employee. eg. First Name</p>
</form>
<button class="add-button">Add employee</button>
</div>
@ -33,7 +36,8 @@
</tr>
</thead>
<tbody>
@for (employee of employees | async; track employee) {
@if (employees) {
@for (employee of employees; track employee) {
<tr>
<td>{{ employee.firstName }}</td>
<td>{{ employee.lastName }}</td>
@ -47,6 +51,7 @@
</td>
</tr>
}
}
</tbody>
</table>
</div>