fix(console): show loginname suffix correctly (#4649)

fix: suffix in user-create
This commit is contained in:
Max Peintner
2022-11-07 07:43:41 +00:00
committed by GitHub
parent b3d2892e4c
commit 5c807a0660
3 changed files with 4 additions and 7 deletions
@@ -46,8 +46,6 @@ export class UserCreateComponent implements OnDestroy {
public languages: string[] = ['de', 'en', 'it', 'fr'];
public userForm!: UntypedFormGroup;
public pwdForm!: UntypedFormGroup;
public envSuffixLabel: string = '';
private destroyed$: Subject<void> = new Subject();
public userLoginMustBeDomain: boolean = false;
@@ -84,14 +82,12 @@ export class UserCreateComponent implements OnDestroy {
}
this.initForm();
this.loading = false;
this.envSuffixLabel = this.envSuffix();
this.changeDetRef.detectChanges();
})
.catch((error) => {
console.error(error);
this.initForm();
this.loading = false;
this.envSuffixLabel = this.envSuffix();
this.changeDetRef.detectChanges();
});
@@ -249,7 +245,8 @@ export class UserCreateComponent implements OnDestroy {
public get confirmPassword(): AbstractControl | null {
return this.pwdForm.get('confirmPassword');
}
private envSuffix(): string {
public get envSuffix(): string {
if (this.userLoginMustBeDomain && this.primaryDomain?.domainName) {
return `@${this.primaryDomain.domainName}`;
} else {