Merge pull request 'Fix selecting nothing' (#81) from fix/fix-selecting-nothing-as-skill into main
All checks were successful
Playwright Tests / test (push) Successful in 1m55s

Reviewed-on: #81
This commit is contained in:
Jan Gleytenhoover 2025-01-22 11:17:44 +00:00
commit 6efe952831
2 changed files with 6 additions and 0 deletions

View file

@ -82,6 +82,9 @@ export class MitarbeiterFormComponent {
addSkill() {
const id = Number(this.mitarbeiterForm.get("newSkill")?.value);
if (!id) {
return;
}
this.allSkills.subscribe(skills => {
const newSkill = skills.filter(skill => skill.id == id)[0];
this.mitarbeiter.skillSet?.push(newSkill);

View file

@ -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) {