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() {
|
addSkill() {
|
||||||
const id = Number(this.mitarbeiterForm.get("newSkill")?.value);
|
const id = Number(this.mitarbeiterForm.get("newSkill")?.value);
|
||||||
|
if (!id) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.allSkills.subscribe(skills => {
|
this.allSkills.subscribe(skills => {
|
||||||
const newSkill = skills.filter(skill => skill.id == id)[0];
|
const newSkill = skills.filter(skill => skill.id == id)[0];
|
||||||
this.mitarbeiter.skillSet?.push(newSkill);
|
this.mitarbeiter.skillSet?.push(newSkill);
|
||||||
|
|
|
@ -55,6 +55,9 @@ export class QualifikationFormComponent {
|
||||||
|
|
||||||
addEmployee() {
|
addEmployee() {
|
||||||
const employeeId = Number(this.skillForm.get("newEmployee")?.value);
|
const employeeId = Number(this.skillForm.get("newEmployee")?.value);
|
||||||
|
if (!employeeId) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const employee = this.addableEmployees.find(emp => emp.id === employeeId);
|
const employee = this.addableEmployees.find(emp => emp.id === employeeId);
|
||||||
|
|
||||||
if (employee) {
|
if (employee) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue