add search bar

This commit is contained in:
2025-01-15 13:31:19 +01:00
parent c41eceb51d
commit 7b88bc090a
2 changed files with 34 additions and 6 deletions

View File

@ -1,4 +1,10 @@
<section class="!space-y-6 mb-6">
<mat-form-field>
<input matInput
placeholder="Search employees"
class="!rounded-lg !bg-gray-50 !p-2 !text-gray-800"
(input)="filterEmployees($event)">
</mat-form-field>
@defer {
@if (employees$ | async; as employees) {
<div class="!space-y-6">
@ -38,14 +44,14 @@
<th mat-header-cell *matHeaderCellDef class="!text-right !w-[120px]"> Actions</th>
<td mat-cell *matCellDef="let employee" class="!text-right !py-4 !whitespace-nowrap">
<div class="!flex !justify-end !items-center !gap-1">
<button mat-icon-button
color="primary"
<button mat-icon-button
color="primary"
[matTooltip]="'Edit employee'"
(click)="showEditEmployeeModal(employee)">
<mat-icon>edit</mat-icon>
</button>
<button mat-icon-button
color="warn"
<button mat-icon-button
color="warn"
[matTooltip]="'Delete employee'"
(click)="openDeleteDialogue(employee)">
<mat-icon>delete</mat-icon>