From 2800392be3a9181be083dbd98be24043960deb71 Mon Sep 17 00:00:00 2001 From: Developer 02 Date: Thu, 31 Oct 2024 07:45:30 +0100 Subject: [PATCH] =?UTF-8?q?feat(user-update-form):=20Eingabe=20des=20Datum?= =?UTF-8?q?sformats=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../user-update-form/user-update-form.component.html | 8 ++++++++ .../forms/user-update-form/user-update-form.component.ts | 7 ++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/components/forms/user-update-form/user-update-form.component.html b/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/components/forms/user-update-form/user-update-form.component.html index 9413201..3e4ca95 100644 --- a/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/components/forms/user-update-form/user-update-form.component.html +++ b/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/components/forms/user-update-form/user-update-form.component.html @@ -40,6 +40,14 @@ Kürzel + + Datumsformat + + dd.MM.yyyy + MM.dd.yyyy + yyyy-MM-dd + +
diff --git a/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/components/forms/user-update-form/user-update-form.component.ts b/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/components/forms/user-update-form/user-update-form.component.ts index 206e7a4..eaa8485 100644 --- a/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/components/forms/user-update-form/user-update-form.component.ts +++ b/DigitalData.UserManager.API/ClientApp/user_manager_ui/src/app/components/forms/user-update-form/user-update-form.component.ts @@ -14,11 +14,12 @@ import { UserGroupDirImportComponent } from "../../user-group-dir-import/user-gr import { UserService } from '../../../services/api/user.service'; import { RefreshService } from '../../../services/button/refresh.service'; import Swal from 'sweetalert2'; +import { MatSelectModule } from '@angular/material/select'; @Component({ selector: 'app-user-update-form', standalone: true, - imports: [MatFormFieldModule, MatInputModule, FormsModule, ReactiveFormsModule, MatIconModule, MatButtonModule, CommonModule, MatTabsModule, UserGroupDirImportComponent], + imports: [MatFormFieldModule, MatInputModule, FormsModule, ReactiveFormsModule, MatIconModule, MatButtonModule, CommonModule, MatTabsModule, UserGroupDirImportComponent, MatSelectModule], templateUrl: './user-update-form.component.html', styleUrl: './user-update-form.component.scss' }) @@ -29,10 +30,10 @@ export class UserUpdateFormComponent { readonly user: User = inject(MAT_DIALOG_DATA); readonly username = new FormControl(this.user.username, [Validators.required]); + readonly email = new FormControl(this.user.email, [Validators.required, Validators.email]); readonly name = new FormControl(this.user.prename, [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 comment = new FormControl(this.user.comment); mailErrorMessage = signal(''); @@ -78,7 +79,7 @@ export class UserUpdateFormComponent { this.user.name = this.surname.value!; this.user.shortname = this.shortname.value!; this.user.comment = this.comment.value!; - + this.uService.update(this.user).subscribe({ next: () => { this.rService.executeAll();