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
All checks were successful
Playwright Tests / test (push) Successful in 1m55s
Reviewed-on: #81
This commit is contained in:
commit
6efe952831
2 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||
|
|
|
@ -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