feat: add createEmployee method and button click handler
This commit is contained in:
parent
582e115285
commit
ca26b84cc6
2 changed files with 5 additions and 1 deletions
|
@ -20,7 +20,7 @@
|
|||
</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>
|
||||
<button (click)="createEmployee()" class="add-button">Add employee</button>
|
||||
</div>
|
||||
|
||||
<table class="employee-table">
|
||||
|
|
|
@ -46,6 +46,10 @@ export class MitarbeiterverwaltungViewComponent implements OnInit {
|
|||
this.router.navigate([`/mitarbeiterbearbeiten/${id}`]);
|
||||
}
|
||||
|
||||
createEmployee() {
|
||||
this.router.navigate(['/mitarbeitererstellen']);
|
||||
}
|
||||
|
||||
deleteEmployee(id: number) {
|
||||
this.employeeService.deleteEmployee(id);
|
||||
this.employees = this.employees.filter(employee => employee.id != id);
|
||||
|
|
Loading…
Add table
Reference in a new issue