Fix selecting nothing #81
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