feat(user-update-form): Eingabe des Datumsformats hinzugefügt
This commit is contained in:
parent
b7f4ed7597
commit
2800392be3
@ -40,6 +40,14 @@
|
||||
<mat-label>Kürzel</mat-label>
|
||||
<input matInput [formControl]="shortname" />
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<mat-label>Datumsformat</mat-label>
|
||||
<mat-select [(value)]="user.dateFormat" [(ngModel)]="user.dateFormat">
|
||||
<mat-option value="dd.MM.yyyy">dd.MM.yyyy</mat-option>
|
||||
<mat-option value="MM.dd.yyyy">MM.dd.yyyy</mat-option>
|
||||
<mat-option value="yyyy-MM-dd">yyyy-MM-dd</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<!-- comment -->
|
||||
<div class="dd-row input-row">
|
||||
|
||||
@ -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();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user