feat(user-update-form): Kommentareingabe hinzugefügt
This commit is contained in:
parent
4d38cce459
commit
16cc729373
@ -1,4 +1,5 @@
|
||||
<div class="dd-container">
|
||||
<!-- username, e-mail -->
|
||||
<div class="dd-row input-row">
|
||||
<mat-form-field>
|
||||
<mat-label>Benutzername</mat-label>
|
||||
@ -16,6 +17,7 @@
|
||||
}
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<!-- firstname, surname -->
|
||||
<div class="dd-row input-row">
|
||||
<mat-form-field>
|
||||
<mat-label>Vorname</mat-label>
|
||||
@ -32,6 +34,14 @@
|
||||
}
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<!-- comment -->
|
||||
<div class="dd-row input-row">
|
||||
<mat-form-field>
|
||||
<mat-label>Kommentar</mat-label>
|
||||
<input matInput [formControl]="comment" />
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<!-- save-button, delete-button -->
|
||||
<div class="dd-row button-row">
|
||||
<button mat-fab extended (click)="update()">
|
||||
<mat-icon>save</mat-icon>
|
||||
|
||||
@ -32,6 +32,7 @@ export class UserUpdateFormComponent {
|
||||
readonly name = new FormControl(this.user.prename, [Validators.required]);
|
||||
readonly surname = new FormControl(this.user.name, [Validators.required]);
|
||||
readonly email = new FormControl(this.user.email, [Validators.required, Validators.email]);
|
||||
readonly comment = new FormControl(this.user.comment);
|
||||
|
||||
mailErrorMessage = signal('');
|
||||
errorMessage = signal('');
|
||||
@ -74,6 +75,7 @@ export class UserUpdateFormComponent {
|
||||
this.user.prename = this.name.value!;
|
||||
this.user.username = this.username.value!;
|
||||
this.user.name = this.surname.value!;
|
||||
this.user.comment = this.comment.value!;
|
||||
|
||||
this.uService.update(this.user).subscribe({
|
||||
next: () => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user