fix(qualifikation-form): prevent adding invalid employee ID
All checks were successful
Playwright Tests / test (pull_request) Successful in 2m26s
All checks were successful
Playwright Tests / test (pull_request) Successful in 2m26s
This commit is contained in:
parent
9be7a52f57
commit
3f61480e2f
1 changed files with 3 additions and 0 deletions
|
@ -55,6 +55,9 @@ export class QualifikationFormComponent {
|
|||
|
||||
addEmployee() {
|
||||
const employeeId = Number(this.skillForm.get("newEmployee")?.value);
|
||||
if (!employeeId) {
|
||||
return;
|
||||
}
|
||||
const employee = this.addableEmployees.find(emp => emp.id === employeeId);
|
||||
|
||||
if (employee) {
|
||||
|
|
Loading…
Add table
Reference in a new issue