update angular

This commit is contained in:
2025-01-02 15:01:59 +01:00
parent 73d3ecfd42
commit 802c309679
199 changed files with 13745 additions and 11691 deletions

View File

@@ -11,7 +11,7 @@ describe('InfoComponent', () => {
void TestBed.configureTestingModule({
declarations: [InfoComponent],
}).compileComponents();
})
}),
);
beforeEach(() => {

View File

@@ -11,12 +11,14 @@ import {roles} from '../../../services/user/roles';
selector: 'app-info',
templateUrl: './info.component.html',
styleUrls: ['./info.component.less'],
standalone: false,
})
export class InfoComponent implements OnInit {
public user$: Observable<User | null> | null = null;
public faSignOut = faSignOutAlt;
public constructor(private userService: UserService) {}
public constructor(private userService: UserService) {
}
public ngOnInit(): void {
this.user$ = this.userService.user$;

View File

@@ -3,6 +3,7 @@ import {roles} from '../../../services/user/roles';
@Pipe({
name: 'role',
standalone: false,
})
export class RolePipe implements PipeTransform {
public transform(role: roles): string {

View File

@@ -1,7 +1,7 @@
<div *ngIf="edit" class="users">
<mat-form-field appearance="outline">
<mat-label>Name</mat-label>
<input (change)="onNameChanged(id, $event)" [ngModel]="name" matInput/>
<input (change)="onNameChanged(id, $event)" [ngModel]="name" matInput />
</mat-form-field>
<mat-form-field appearance="outline">
@@ -12,8 +12,9 @@
multiple
>
<mat-option *ngFor="let role of ROLE_TYPES" [value]="role">{{
role | role
}}</mat-option>
role | role
}}
</mat-option>
</mat-select>
</mat-form-field>

View File

@@ -11,7 +11,7 @@ describe('UserComponent', () => {
void TestBed.configureTestingModule({
declarations: [UserComponent],
}).compileComponents();
})
}),
);
beforeEach(() => {

View File

@@ -8,6 +8,7 @@ import {faTimes} from '@fortawesome/free-solid-svg-icons';
selector: 'app-user',
templateUrl: './user.component.html',
styleUrls: ['./user.component.less'],
standalone: false,
})
export class UserComponent {
public id = '';
@@ -17,7 +18,8 @@ export class UserComponent {
public edit = false;
public faClose = faTimes;
public constructor(private userService: UserService) {}
public constructor(private userService: UserService) {
}
@Input()
public set user(value: User) {

View File

@@ -11,7 +11,7 @@ describe('UsersComponent', () => {
void TestBed.configureTestingModule({
declarations: [UsersComponent],
}).compileComponents();
})
}),
);
beforeEach(() => {

View File

@@ -7,6 +7,7 @@ import {User} from '../../../../services/user/user';
selector: 'app-users',
templateUrl: './users.component.html',
styleUrls: ['./users.component.less'],
standalone: false,
})
export class UsersComponent {
public users$: Observable<User[]>;

View File

@@ -2,6 +2,7 @@ import {Pipe, PipeTransform} from '@angular/core';
@Pipe({
name: 'authMessage',
standalone: false,
})
export class AuthMessagePipe implements PipeTransform {
public transform(code: string): string {

View File

@@ -4,7 +4,7 @@
<div [formGroup]="form" class="form">
<mat-form-field appearance="outline">
<mat-label>E-Mail Addresse</mat-label>
<input (keyup.enter)="onLogin()" formControlName="user" matInput/>
<input (keyup.enter)="onLogin()" formControlName="user" matInput />
</mat-form-field>
<mat-form-field appearance="outline">

View File

@@ -11,7 +11,7 @@ describe('LoginComponent', () => {
void TestBed.configureTestingModule({
declarations: [LoginComponent],
}).compileComponents();
})
}),
);
beforeEach(() => {

View File

@@ -8,6 +8,7 @@ import {faSignInAlt, faUserPlus} from '@fortawesome/free-solid-svg-icons';
selector: 'app-login',
templateUrl: './login.component.html',
styleUrls: ['./login.component.less'],
standalone: false,
})
export class LoginComponent implements OnInit {
public form: UntypedFormGroup = new UntypedFormGroup({
@@ -18,7 +19,8 @@ export class LoginComponent implements OnInit {
public faSignIn = faSignInAlt;
public faNewUser = faUserPlus;
public constructor(private userService: UserService, private router: Router) {}
public constructor(private userService: UserService, private router: Router) {
}
public ngOnInit(): void {
this.form.reset;

View File

@@ -11,7 +11,7 @@ describe('LogoutComponent', () => {
void TestBed.configureTestingModule({
declarations: [LogoutComponent],
}).compileComponents();
})
}),
);
beforeEach(() => {

View File

@@ -6,9 +6,11 @@ import {UserService} from '../../../services/user/user.service';
selector: 'app-logout',
templateUrl: './logout.component.html',
styleUrls: ['./logout.component.less'],
standalone: false,
})
export class LogoutComponent implements AfterViewInit {
public constructor(private userService: UserService, private router: Router) {}
public constructor(private userService: UserService, private router: Router) {
}
public async ngAfterViewInit(): Promise<void> {
await this.userService.logout();

View File

@@ -1,15 +1,15 @@
<app-card [formGroup]="form" closeLink="../" heading="neuen Benutzer anlegen">
<mat-form-field appearance="outline">
<mat-label>Name</mat-label>
<input formControlName="name" matInput/>
<input formControlName="name" matInput />
</mat-form-field>
<mat-form-field appearance="outline">
<mat-label>E-Mail Adresse</mat-label>
<input formControlName="email" matInput/>
<input formControlName="email" matInput />
</mat-form-field>
<mat-form-field appearance="outline">
<mat-label>Passwort</mat-label>
<input formControlName="password" matInput type="password"/>
<input formControlName="password" matInput type="password" />
</mat-form-field>
<app-button-row>

View File

@@ -11,7 +11,7 @@ describe('NewComponent', () => {
void TestBed.configureTestingModule({
declarations: [NewComponent],
}).compileComponents();
})
}),
);
beforeEach(() => {

View File

@@ -7,6 +7,7 @@ import {faUserPlus} from '@fortawesome/free-solid-svg-icons';
selector: 'app-new',
templateUrl: './new.component.html',
styleUrls: ['./new.component.less'],
standalone: false,
})
export class NewComponent implements OnInit {
public form: UntypedFormGroup = this.fb.group({
@@ -16,7 +17,8 @@ export class NewComponent implements OnInit {
});
public faNewUser = faUserPlus;
public constructor(private fb: UntypedFormBuilder, private userService: UserService) {}
public constructor(private fb: UntypedFormBuilder, private userService: UserService) {
}
public ngOnInit(): void {
this.form.reset();

View File

@@ -11,7 +11,7 @@ describe('PasswordSendComponent', () => {
void TestBed.configureTestingModule({
declarations: [PasswordSendComponent],
}).compileComponents();
})
}),
);
beforeEach(() => {

View File

@@ -4,5 +4,7 @@ import {Component} from '@angular/core';
selector: 'app-password-send',
templateUrl: './password-send.component.html',
styleUrls: ['./password-send.component.less'],
standalone: false,
})
export class PasswordSendComponent {}
export class PasswordSendComponent {
}

View File

@@ -11,7 +11,7 @@ describe('PasswordComponent', () => {
void TestBed.configureTestingModule({
declarations: [PasswordComponent],
}).compileComponents();
})
}),
);
beforeEach(() => {

View File

@@ -8,6 +8,7 @@ import {faWindowRestore} from '@fortawesome/free-solid-svg-icons';
selector: 'app-password',
templateUrl: './password.component.html',
styleUrls: ['./password.component.less'],
standalone: false,
})
export class PasswordComponent implements OnInit {
public form: UntypedFormGroup = new UntypedFormGroup({
@@ -17,7 +18,8 @@ export class PasswordComponent implements OnInit {
public errorMessage = '';
public faNewPassword = faWindowRestore;
public constructor(public userService: UserService, private router: Router) {}
public constructor(public userService: UserService, private router: Router) {
}
public ngOnInit(): void {
this.form.reset();

View File

@@ -44,4 +44,5 @@ import {SortByModule} from '../../widget-modules/pipes/sort-by/sort-by.module';
SortByModule,
],
})
export class UserModule {}
export class UserModule {
}