feat(search): implement search functionality for employees
This commit is contained in:
parent
9219b92049
commit
d80f98f2a0
3 changed files with 42 additions and 9 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue