feature/addQualifications #23

Merged
SZUT-Ole merged 2 commits from feature/addQualifications into trunk 2025-01-21 11:54:54 +00:00
2 changed files with 12 additions and 2 deletions
Showing only changes of commit 76541fa2a8 - Show all commits

View file

@ -2,9 +2,9 @@
<div class="qualifications__action-row">
<mat-form-field>
<mat-label>Qualification</mat-label>
<input matInput>
<input matInput #qualificationInput minlength="1" maxlength="25">
</mat-form-field>
<button mat-fab class="shadowless">
<button mat-fab class="shadowless" (click)="onAdd(qualificationInput)">
<mat-icon>add</mat-icon>
</button>
</div>

View file

@ -79,6 +79,16 @@ export class QualificationsComponent {
this.qualificationEdits.set(id, true);
}
onAdd(qualificationField: HTMLInputElement){
this.qualificationService.createQualification({requestBody: {skill: qualificationField.value}}).subscribe((qualification)=>{
const data = this.qualificationDataSource.data;
data.push(qualification);
this.qualificationDataSource = new MatTableDataSource<Qualification>(data);
this.notifications.publish(`Added ${qualification.skill}`);
qualificationField.value='';
});
}
endEdit(oldQualification: Qualification, save: boolean) {
const qualificationFormGroup = this.qualificationSkillFormGroups.get(oldQualification.id);