feat(user-update-form): Eingabe von Kurznamen hinzugefügt

This commit is contained in:
Developer 02 2024-10-31 07:19:46 +01:00
parent 16cc729373
commit b7f4ed7597
2 changed files with 9 additions and 0 deletions

View File

@ -34,6 +34,13 @@
} }
</mat-form-field> </mat-form-field>
</div> </div>
<!-- shortname -->
<div class="dd-row input-row">
<mat-form-field>
<mat-label>Kürzel</mat-label>
<input matInput [formControl]="shortname" />
</mat-form-field>
</div>
<!-- comment --> <!-- comment -->
<div class="dd-row input-row"> <div class="dd-row input-row">
<mat-form-field> <mat-form-field>

View File

@ -31,6 +31,7 @@ export class UserUpdateFormComponent {
readonly username = new FormControl(this.user.username, [Validators.required]); readonly username = new FormControl(this.user.username, [Validators.required]);
readonly name = new FormControl(this.user.prename, [Validators.required]); readonly name = new FormControl(this.user.prename, [Validators.required]);
readonly surname = new FormControl(this.user.name, [Validators.required]); readonly surname = new FormControl(this.user.name, [Validators.required]);
readonly shortname = new FormControl(this.user.shortname);
readonly email = new FormControl(this.user.email, [Validators.required, Validators.email]); readonly email = new FormControl(this.user.email, [Validators.required, Validators.email]);
readonly comment = new FormControl(this.user.comment); readonly comment = new FormControl(this.user.comment);
@ -75,6 +76,7 @@ export class UserUpdateFormComponent {
this.user.prename = this.name.value!; this.user.prename = this.name.value!;
this.user.username = this.username.value!; this.user.username = this.username.value!;
this.user.name = this.surname.value!; this.user.name = this.surname.value!;
this.user.shortname = this.shortname.value!;
this.user.comment = this.comment.value!; this.user.comment = this.comment.value!;
this.uService.update(this.user).subscribe({ this.uService.update(this.user).subscribe({